added setting for users

This commit is contained in:
2026-08-16 22:00:48 +03:30
parent 84b0a4767a
commit 17dea2a52f
13 changed files with 635 additions and 29 deletions
+13 -4
View File
@@ -21,14 +21,23 @@ import { computed } from 'vue'
import BasicMenu from '@/components/BasicMenu/index.vue'
import { useRouterStore } from '@core/stores/router'
import { get } from 'lodash'
import { customerSpecialPricingEnabledSetting, initWalletSettingsFromApi } from '@/utils/config'
initWalletSettingsFromApi()
const routerStore = useRouterStore()
const menu = computed(() => {
const item = routerStore.routes.find((item) => item.name === 'customers')
const children = get(item, 'children[0].children', []) as Array<{ meta?: { order?: number } }>
return [...children].sort(
(a, b) => (a.meta?.order ?? 99) - (b.meta?.order ?? 99)
)
const children = get(item, 'children[0].children', []) as Array<{
name?: string
meta?: { order?: number }
}>
return [...children]
.filter(
(child) =>
child.name !== 'customerMain_specialPrice' || customerSpecialPricingEnabledSetting.value
)
.sort((a, b) => (a.meta?.order ?? 99) - (b.meta?.order ?? 99))
})
</script>