103 lines
3.0 KiB
Vue
103 lines
3.0 KiB
Vue
<template>
|
|
<client-only>
|
|
<div class="user-dashboard-layout">
|
|
<site-header />
|
|
<div class="topBG">
|
|
<div class="user-name">
|
|
<nuxt-link :to="{ name: 'account' }" exact>
|
|
<i class="fas fa-user"></i>
|
|
<span class="singleLineTxt" :title="fullName">{{ fullName }}</span>
|
|
</nuxt-link>
|
|
</div>
|
|
</div>
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<user-aside-menu class="col-12 col-lg-3 col-xxl-2" />
|
|
<nuxt class="col-12 col-lg-9 col-xxl-10" />
|
|
</div>
|
|
</div>
|
|
<!-- <site-footer /> -->
|
|
<mobile-menu />
|
|
<AppInstallDialog />
|
|
</div>
|
|
</client-only>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'UserLayout',
|
|
middleware: 'auth-user',
|
|
head() {
|
|
return {
|
|
title: 'آسان سرویس | حساب کاربری',
|
|
htmlAttrs: {
|
|
lang: 'fa'
|
|
}
|
|
}
|
|
},
|
|
computed: {
|
|
user() {
|
|
return this.$auth.user
|
|
},
|
|
fullName() {
|
|
return this.user.first_name + ' ' + this.user.last_name
|
|
}
|
|
},
|
|
async mounted() {
|
|
if (this.user.confirmed) {
|
|
if (!this.user.email_confirmed) {
|
|
this.$notify({
|
|
type: 'warning',
|
|
title: 'توجه',
|
|
message:
|
|
'کاربر گرامی آدرس ایمیل خود را تایید نکرده اید، لطفا هرچه سریع تر نسبت به تایید آدرس ایمیل خود از "منوی تایید اطلاعات" اقدام نمایید.',
|
|
position: 'top-left',
|
|
offset: 60,
|
|
duration: 0
|
|
})
|
|
}
|
|
if (!this.user.mobile_confirmed) {
|
|
this.$notify({
|
|
type: 'warning',
|
|
title: 'توجه',
|
|
message:
|
|
'کاربر گرامی شماره تلفن همراه خود را تایید نکرده اید، لطفا هرچه سریع تر نسبت به تایید شماره تلفن همراه خود از منوی "تایید اطلاعات" اقدام نمایید.',
|
|
position: 'top-left',
|
|
offset: 60,
|
|
duration: 0
|
|
})
|
|
}
|
|
}
|
|
|
|
/// /// get products list
|
|
try {
|
|
// verity request info
|
|
const verityData = {
|
|
url: `/api/GetItem?UserGroupID=${this.$config.VerityUserGroupId}`,
|
|
db: 'verity'
|
|
}
|
|
// panatech request info
|
|
const panatechData = {
|
|
url: `/api/GetItem?UserGroupID=${this.$config.PanatechUserGroupId}`,
|
|
db: 'panatech'
|
|
}
|
|
|
|
const allData = await Promise.all([
|
|
// fetch verity products
|
|
this.$axios.post('/api/cross/getRouteManager', verityData),
|
|
// fetch panatech products
|
|
this.$axios.post('/api/cross/getRouteManager', panatechData)
|
|
])
|
|
|
|
const verityProducts = allData[0]
|
|
const panatechProducts = allData[1]
|
|
|
|
this.$store.commit('front/set', ['verityProducts', verityProducts.data.data])
|
|
this.$store.commit('front/set', ['panatechProducts', panatechProducts.data.data])
|
|
} catch (e) {
|
|
this.$arpaError()
|
|
}
|
|
}
|
|
}
|
|
</script>
|