146 lines
4.1 KiB
TypeScript
146 lines
4.1 KiB
TypeScript
import type { RouteRecordRaw } from 'vue-router'
|
|
import { isDeployAdmin } from '@/utils/deployAdmin'
|
|
import { useUserStore } from '@/store/userStore'
|
|
|
|
const Setting: RouteRecordRaw = {
|
|
name: 'settings',
|
|
path: '/settings',
|
|
component: () => import('@core/layouts/BasicLayout.vue'),
|
|
redirect: { name: 'settingMain' },
|
|
meta: {
|
|
icon: 'vuesax-linear:setting',
|
|
permissionsKey: 'config',
|
|
title: 'پیکربندی',
|
|
disabled: false,
|
|
hideMenu: false,
|
|
hideChildren: true,
|
|
order: 10
|
|
},
|
|
children: [
|
|
{
|
|
name: 'settingMain',
|
|
path: '',
|
|
component: () => import('@/pages/menuPages/setting/index.vue'),
|
|
redirect: { name: 'configuration' },
|
|
meta: {
|
|
permissionsKey: 'config',
|
|
icon: 'vuesax-linear:setting',
|
|
order: 5,
|
|
title: 'پیکربندی',
|
|
disabled: false,
|
|
hideMenu: true
|
|
},
|
|
children: [
|
|
{
|
|
name: 'configuration',
|
|
path: 'configuration',
|
|
component: () => import('@/pages/menuPages/configuration/index.vue'),
|
|
meta: {
|
|
icon: 'vuesax-linear:setting-2',
|
|
title: 'تنظیمات',
|
|
order: 1
|
|
}
|
|
},
|
|
{
|
|
name: 'advancedConfiguration',
|
|
path: 'advanced-configuration',
|
|
component: () => import('@/pages/menuPages/configuration/index.vue'),
|
|
props: { mode: 'system' },
|
|
meta: {
|
|
deployAdminOnly: true,
|
|
icon: 'vuesax-linear:code-circle',
|
|
title: 'تنظیمات پیشرفته',
|
|
order: 2
|
|
},
|
|
beforeEnter() {
|
|
const userStore = useUserStore()
|
|
if (!isDeployAdmin(userStore.userInfo?.mobile)) {
|
|
return { name: 'configuration' }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
name: 'banners',
|
|
path: 'banners',
|
|
component: () => import('@/pages/menuPages/banners/index.vue'),
|
|
meta: {
|
|
icon: 'vuesax-linear:image',
|
|
title: 'بنرها',
|
|
order: 3
|
|
}
|
|
},
|
|
{
|
|
name: 'settingMain_limitedOrder',
|
|
path: 'limitedOrder',
|
|
component: () => import('@/pages/menuPages/setting/limitedOrder/index.vue'),
|
|
meta: {
|
|
permissionsKey: 'config.limitedOrder',
|
|
icon: 'vuesax-linear:document-text',
|
|
title: 'محدودیت سفارش',
|
|
order: 4
|
|
}
|
|
},
|
|
{
|
|
name: 'priceTriggers',
|
|
path: 'priceTriggers',
|
|
component: () => import('@/pages/menuPages/priceTriggers/index.vue'),
|
|
meta: {
|
|
permissionsKey: 'priceTriggers',
|
|
icon: 'vuesax-linear:notification-bing',
|
|
title: 'هشدار قیمت',
|
|
order: 5
|
|
}
|
|
},
|
|
{
|
|
name: 'smsMain',
|
|
path: 'sms',
|
|
component: () => import('@/pages/menuPages/sms/index.vue'),
|
|
meta: {
|
|
permissionsKey: 'sms',
|
|
icon: 'vuesax-linear:sms',
|
|
title: 'پیامکها',
|
|
order: 6
|
|
}
|
|
},
|
|
{
|
|
name: 'giftCardMain',
|
|
path: 'giftCard',
|
|
component: () => import('@/pages/menuPages/giftCards/index.vue'),
|
|
meta: {
|
|
permissionsKey: 'project',
|
|
icon: 'vuesax-linear:gift',
|
|
title: 'کارت هدیه',
|
|
hideMenu: true,
|
|
order: 7
|
|
}
|
|
},
|
|
{
|
|
name: 'discounts',
|
|
path: 'discounts',
|
|
component: () => import('@/pages/menuPages/discount/index.vue'),
|
|
meta: {
|
|
permissionsKey: 'discounts',
|
|
icon: 'vuesax-linear:discount-shape',
|
|
title: 'تخفیفات',
|
|
hideMenu: true,
|
|
order: 8
|
|
}
|
|
},
|
|
{
|
|
name: 'usersMain',
|
|
path: 'admins',
|
|
component: () => import('@/pages/menuPages/users/index.vue'),
|
|
meta: {
|
|
permissionsKey: 'user',
|
|
icon: 'vuesax-linear:profile',
|
|
title: 'مدیران',
|
|
order: 9
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
|
|
export default Setting
|