added kashkool
This commit is contained in:
+3
-3
@@ -2,7 +2,7 @@
|
||||
//import router from '@/core/router/index'
|
||||
import { useRouterStore } from '@core/stores/router'
|
||||
import type { Router, RouteRecordRaw } from 'vue-router'
|
||||
import { getConfigApp } from '@/utils/config'
|
||||
import { getConfigApp, isStoreApp } from '@/utils/config'
|
||||
//const _router = useRouter()
|
||||
//import { cloneDeep } from 'lodash'
|
||||
|
||||
@@ -48,10 +48,10 @@ export function setupRoutes(permissionsKeys: string[], router?: Router) {
|
||||
if (!routes.children) return
|
||||
routes.children = routes.children.filter((item) => {
|
||||
|
||||
if (item.name === 'discounts' && appName !== 'goldsun') return false
|
||||
if (item.name === 'discounts' && (isStoreApp() || appName !== 'goldsun')) return false
|
||||
if (item.name === 'banners' && appName !== 'garoosi') return false
|
||||
if (item.name === 'authentication' && appName !== 'garoosi') return false
|
||||
if (item.name === 'giftCardMain' && appName !== 'garoosi') return false
|
||||
if (item.name === 'giftCardMain' && !isStoreApp() && appName !== 'garoosi') return false
|
||||
|
||||
|
||||
return true
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
import {getConfigApp} from "@/utils/config";
|
||||
import { getConfigApp, isStoreApp } from '@/utils/config'
|
||||
|
||||
const Orders: RouteRecordRaw = {
|
||||
name: 'giftCard',
|
||||
@@ -9,9 +9,9 @@ const Orders: RouteRecordRaw = {
|
||||
meta: {
|
||||
icon: 'vuesax-linear:gift',
|
||||
permissionsKey: 'giftCard',
|
||||
title: 'کارت هدیه',
|
||||
title: isStoreApp() ? 'کارت هدیه و تخفیف' : 'کارت هدیه',
|
||||
disabled: false,
|
||||
hideMenu: getConfigApp('name')!='garoosi',
|
||||
hideMenu: !isStoreApp() && getConfigApp('name') != 'garoosi',
|
||||
hideChildren: true,
|
||||
order: 7
|
||||
},
|
||||
@@ -24,7 +24,7 @@ const Orders: RouteRecordRaw = {
|
||||
permissionsKey: 'project',
|
||||
icon: 'vuesax-linear:empty-wallet-time',
|
||||
order: 3,
|
||||
title: 'کارت هدیه',
|
||||
title: isStoreApp() ? 'کارت هدیه و تخفیف' : 'کارت هدیه',
|
||||
disabled: false,
|
||||
hideMenu: false
|
||||
//hideChildren: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
import {getConfigApp} from "@/utils/config";
|
||||
import { getConfigApp, isStoreApp } from '@/utils/config'
|
||||
const Setting: RouteRecordRaw = {
|
||||
name: 'settings',
|
||||
path: '/settings',
|
||||
@@ -70,7 +70,7 @@ const Setting: RouteRecordRaw = {
|
||||
permissionsKey: 'discounts',
|
||||
icon: 'vuesax-linear:discount-shape',
|
||||
title: 'تخفیفات',
|
||||
hideMenu: getConfigApp('name') !== "goldsun"
|
||||
hideMenu: isStoreApp() || getConfigApp('name') !== 'goldsun'
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user