Fix
This commit is contained in:
@@ -82,14 +82,7 @@
|
|||||||
font-icon="fas fa-folder"
|
font-icon="fas fa-folder"
|
||||||
@update:show="val => setDropdownState('adminS_CustomerM_Dropdown', val)"
|
@update:show="val => setDropdownState('adminS_CustomerM_Dropdown', val)"
|
||||||
>
|
>
|
||||||
<CSidebarNavItem
|
|
||||||
v-if="hasPermission('contact-us')"
|
|
||||||
name="پیام های صفحه تماس با ما"
|
|
||||||
:to="{ name: 'admin-contact-us' }"
|
|
||||||
font-icon="fal fa-envelope"
|
|
||||||
:exact="false"
|
|
||||||
:badge="unreadCuMsgs ? { text: unreadCuMsgs, color: 'danger' } : null"
|
|
||||||
/>
|
|
||||||
<CSidebarNavItem
|
<CSidebarNavItem
|
||||||
v-if="hasPermission('customers')"
|
v-if="hasPermission('customers')"
|
||||||
name="لیست مشتریان"
|
name="لیست مشتریان"
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
<nuxt-link :to="{ name: 'about' }" tag="li">
|
<nuxt-link :to="{ name: 'about' }" tag="li">
|
||||||
<a>درباره ما</a>
|
<a>درباره ما</a>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
<nuxt-link :to="{ name: 'contact' }" tag="li">
|
<li>
|
||||||
<a>ارتباط با ما</a>
|
<a href="https://jobs.asan-service.com" >همکاری</a>
|
||||||
</nuxt-link>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<!-- <span>نمایندگی</span>-->
|
<!-- <span>نمایندگی</span>-->
|
||||||
|
|||||||
@@ -65,9 +65,9 @@
|
|||||||
<nuxt-link :to="{ name: 'about' }" tag="li">
|
<nuxt-link :to="{ name: 'about' }" tag="li">
|
||||||
<a>درباره ما</a>
|
<a>درباره ما</a>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
<nuxt-link :to="{ name: 'contact' }" tag="li">
|
<li>
|
||||||
<a>ارتباط با ما</a>
|
<a href="https://jobs.asan-service.com" >همکاری</a>
|
||||||
</nuxt-link>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<nav class="col-2 d-none d-lg-flex account">
|
<nav class="col-2 d-none d-lg-flex account">
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<SiteHeader />
|
<SiteHeader />
|
||||||
<nuxt class="default" />
|
<nuxt class="default" />
|
||||||
<SiteFooter v-if="$route.name !== 'index'" />
|
<SiteFooter />
|
||||||
<MobileMenu />
|
<MobileMenu />
|
||||||
<LotteryPopUp />
|
<LotteryPopUp />
|
||||||
<AppInstallDialog />
|
<AppInstallDialog />
|
||||||
|
|||||||
@@ -1,54 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<CustomSubHeader>
|
|
||||||
<CBreadcrumb class="border-0 mb-0">{{ title }}</CBreadcrumb>
|
|
||||||
<el-tag v-if="message.read_by && message.read_by.first_name" type="primary">
|
|
||||||
<span>خوانده شده توسط: </span>
|
|
||||||
<span> {{ message.read_by.first_name + ' ' + message.read_by.last_name }} </span>
|
|
||||||
</el-tag>
|
|
||||||
<CButton size="sm" color="primary" class="mr-auto" :to="{ name: 'admin-contact-us' }">برگشت به صفحه قبل</CButton>
|
|
||||||
</CustomSubHeader>
|
|
||||||
<CRow>
|
|
||||||
<CCol xl="6">
|
|
||||||
<CCard>
|
|
||||||
<CCardBody>
|
|
||||||
<CForm>
|
|
||||||
<CInput v-model="message.full_name" label="نام و نام خانوادگی" horizontal disabled />
|
|
||||||
<CInput label="ایمیل" horizontal disabled :value="message.email" />
|
|
||||||
|
|
||||||
<CTextarea label="پیام" horizontal disabled rows="20" :value="message.message" />
|
|
||||||
</CForm>
|
|
||||||
</CCardBody>
|
|
||||||
</CCard>
|
|
||||||
</CCol>
|
|
||||||
</CRow>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'AddminContactUsMsgDetails',
|
|
||||||
layout: 'admin',
|
|
||||||
async asyncData({ $axios, params, error }) {
|
|
||||||
try {
|
|
||||||
const message = await $axios.get(`/api/admin/contact/${params.message}`)
|
|
||||||
return {
|
|
||||||
message: message.data
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
error({ status: 404, message: 'Page not found' })
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
title: 'پیام',
|
|
||||||
message: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
head() {
|
|
||||||
return {
|
|
||||||
title: this.title
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<CustomSubHeader>
|
|
||||||
<CBreadcrumb class="border-0 mb-0">{{ title }}</CBreadcrumb>
|
|
||||||
<!-- <CButton size="sm" color="success" :to="{name: 'admin-FAQ-new'}" class="mr-auto">افزودن</CButton>-->
|
|
||||||
</CustomSubHeader>
|
|
||||||
<CRow>
|
|
||||||
<CCol col="col">
|
|
||||||
<CCard>
|
|
||||||
<CCardHeader>
|
|
||||||
<slot name="header">
|
|
||||||
<i class="fal fa-filter"></i>
|
|
||||||
<span>فیلتر</span>
|
|
||||||
</slot>
|
|
||||||
</CCardHeader>
|
|
||||||
<CCardBody>
|
|
||||||
<CButtonGroup>
|
|
||||||
<CButton color="primary" :class="filter === 'all' && 'selected'" @click="filter = 'all'">همه</CButton>
|
|
||||||
<CButton color="warning" :class="!filter && 'selected'" @click="filter = false">خوانده نشده</CButton>
|
|
||||||
<CButton color="success" :class="filter === true && 'selected'" @click="filter = true"
|
|
||||||
>خوانده شده</CButton
|
|
||||||
>
|
|
||||||
</CButtonGroup>
|
|
||||||
</CCardBody>
|
|
||||||
</CCard>
|
|
||||||
</CCol>
|
|
||||||
</CRow>
|
|
||||||
|
|
||||||
<CCard>
|
|
||||||
<CCardHeader>
|
|
||||||
<slot name="header">
|
|
||||||
<i class="fal fa-bars"></i>
|
|
||||||
<span>{{ list_title }}</span>
|
|
||||||
</slot>
|
|
||||||
</CCardHeader>
|
|
||||||
<CCardBody>
|
|
||||||
<el-table :data="filtered" :row-class-name="readStatus" style="width: 100%">
|
|
||||||
<el-table-column type="index" label="#"> </el-table-column>
|
|
||||||
|
|
||||||
<el-table-column prop="full_name" label="نام و نام خانوادگی" width=""> </el-table-column>
|
|
||||||
|
|
||||||
<el-table-column prop="email" label="ایمیل" width=""> </el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="مشاهده" width="70" align="left">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<CButton
|
|
||||||
:key="scope.row._id"
|
|
||||||
color="success"
|
|
||||||
variant="outline"
|
|
||||||
:to="`/admin/contact-us/${scope.row._id}`"
|
|
||||||
>
|
|
||||||
<i class="far fa-eye"></i>
|
|
||||||
</CButton>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</CCardBody>
|
|
||||||
</CCard>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'AdminContactUsMsgList',
|
|
||||||
layout: 'admin',
|
|
||||||
async asyncData({ $axios, error }) {
|
|
||||||
try {
|
|
||||||
const messages = await $axios.get(`/api/admin/contact`)
|
|
||||||
return {
|
|
||||||
messages: messages.data
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
error({ status: 404, message: 'There is a problem here' })
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
title: 'پیام ها',
|
|
||||||
list_title: 'لیست',
|
|
||||||
messages: null,
|
|
||||||
filter: 'all'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
head() {
|
|
||||||
return {
|
|
||||||
title: this.title
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
filtered() {
|
|
||||||
if (this.filter === 'all') return this.messages
|
|
||||||
else return this.messages.filter(item => item.read === this.filter)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
readStatus({ row, rowIndex }) {
|
|
||||||
return row.read ? null : 'unread'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.unread {
|
|
||||||
background: rgb(255, 173, 0, 0.12) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selected {
|
|
||||||
-webkit-transform: scale(1.1);
|
|
||||||
-moz-transform: scale(1.1);
|
|
||||||
-ms-transform: scale(1.1);
|
|
||||||
-o-transform: scale(1.1);
|
|
||||||
transform: scale(1.1);
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -68,6 +68,7 @@ export default {
|
|||||||
files: files.data
|
files: files.data
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
error({ status: 500, message: 'there is a problem here' })
|
error({ status: 500, message: 'there is a problem here' })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,109 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="contact--page page">
|
|
||||||
<section class="s1">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12 col-md-6 message">
|
|
||||||
<form class="form form_1" @submit.prevent="send">
|
|
||||||
<div class="title">
|
|
||||||
<p>برای ما پیام بگذارید:</p>
|
|
||||||
</div>
|
|
||||||
<div class="formRow" :class="validation.full_name ? 'err' : null">
|
|
||||||
<input v-model="formData.full_name" type="text" placeholder="نام و نام خانوادگی" />
|
|
||||||
<p v-if="validation.full_name">{{ validation.full_name.msg }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="formRow" :class="validation.email ? 'err' : null">
|
|
||||||
<input v-model="formData.email" type="text" class="email" placeholder="ایمیل" />
|
|
||||||
<p v-if="validation.email">{{ validation.email.msg }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="formRow" :class="validation.message ? 'err' : null">
|
|
||||||
<textarea v-model="formData.message" rows="3" placeholder="پیام"></textarea>
|
|
||||||
<p v-if="validation.message">{{ validation.message.msg }}</p>
|
|
||||||
</div>
|
|
||||||
<div class="btnRow">
|
|
||||||
<button class="btn btn-primary" type="submit">ارسال پیام</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-6 mt-5 mt-md-0 contact">
|
|
||||||
<div class="info">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<p>
|
|
||||||
<i class="fal fa-map-marker-alt"></i>
|
|
||||||
<span> {{ config.address }} </span>
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a :href="`tel: ${config.contactTel}`">
|
|
||||||
<i class="fal fa-phone"></i>
|
|
||||||
<span>{{ config.contactTel }}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a :href="`mailto: ${config.contactEmail}`">
|
|
||||||
<i class="fal fa-envelope"></i>
|
|
||||||
<span>{{ config.contactEmail }}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'ContactUsPage',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
formData: {
|
|
||||||
full_name: '',
|
|
||||||
email: '',
|
|
||||||
message: ''
|
|
||||||
},
|
|
||||||
validation: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
head() {
|
|
||||||
return {
|
|
||||||
title: 'آسان سرویس | ارتباط با ما'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
config() {
|
|
||||||
return this.$config
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
send() {
|
|
||||||
this.validation = {}
|
|
||||||
this.$axios
|
|
||||||
.post(`/api/public/contact`, this.formData)
|
|
||||||
.then(res => {
|
|
||||||
this.$message({
|
|
||||||
type: 'success',
|
|
||||||
message: 'پیام شما با موفقیت ارسال شد.'
|
|
||||||
})
|
|
||||||
this.formData = {
|
|
||||||
full_name: '',
|
|
||||||
email: '',
|
|
||||||
message: ''
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
if (err.response.status === 422) this.validation = err.response.data.validation
|
|
||||||
else {
|
|
||||||
this.$message({
|
|
||||||
type: 'error',
|
|
||||||
message: err.response.data.message
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -47,7 +47,10 @@ module.exports.addExel = [
|
|||||||
module.exports.getAllExels = [
|
module.exports.getAllExels = [
|
||||||
(req, res) => {
|
(req, res) => {
|
||||||
const type = req.query?.type
|
const type = req.query?.type
|
||||||
if (!type) return res500(res, 'choose type')
|
if (!type) {
|
||||||
|
res500(res, 'choose type')
|
||||||
|
console.log("dfd")
|
||||||
|
}
|
||||||
const validValues = ['guaranteeSerial', 'orginality']
|
const validValues = ['guaranteeSerial', 'orginality']
|
||||||
if (!validValues.includes(type)) return res500(res, 'choose type')
|
if (!validValues.includes(type)) return res500(res, 'choose type')
|
||||||
const path = type === 'guaranteeSerial' ? guaranteeSerialsPath : productSerialsPath
|
const path = type === 'guaranteeSerial' ? guaranteeSerialsPath : productSerialsPath
|
||||||
|
|||||||
Reference in New Issue
Block a user