Files
boursecu_admin/src/pages/menuPages/customers/index.vue
T

45 lines
1.5 KiB
Vue
Raw Normal View History

2026-01-24 17:45:54 +03:30
<template>
2026-05-31 11:51:52 +03:30
<div class="h-full min-h-0">
2026-01-24 17:45:54 +03:30
<BasicMainCard>
2026-05-31 11:51:52 +03:30
<div class="flex h-full min-h-0 min-w-0 flex-col md:flex-row">
2026-01-24 17:45:54 +03:30
<!-- {{ menu }}-->
2026-05-31 11:51:52 +03:30
<BasicMenu width="11rem" :menu="menu" mode="horizontal" class="shrink-0 overflow-auto md:hidden" />
2026-01-24 17:45:54 +03:30
<BasicMenu
width="13rem"
:menu="menu"
2026-05-31 11:51:52 +03:30
class="hidden min-w-[13.5rem] shrink-0 overflow-auto md:inline"
2026-01-24 17:45:54 +03:30
/>
<!-- <component :is="selectedComponent" class="mr-5" />-->
2026-05-31 11:51:52 +03:30
<RouterView class="mt-5 min-h-0 min-w-0 w-full flex-1 overflow-hidden md:mr-5 md:mt-0" />
2026-01-24 17:45:54 +03:30
</div>
</BasicMainCard>
</div>
</template>
<script setup lang="ts">
2026-07-22 18:12:45 +03:30
import { computed } from 'vue'
2026-01-24 17:45:54 +03:30
import BasicMenu from '@/components/BasicMenu/index.vue'
import { useRouterStore } from '@core/stores/router'
import { get } from 'lodash'
2026-08-16 22:00:48 +03:30
import { customerSpecialPricingEnabledSetting, initWalletSettingsFromApi } from '@/utils/config'
initWalletSettingsFromApi()
2026-01-24 17:45:54 +03:30
const routerStore = useRouterStore()
const menu = computed(() => {
const item = routerStore.routes.find((item) => item.name === 'customers')
2026-08-16 22:00:48 +03:30
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))
2026-01-24 17:45:54 +03:30
})
</script>
<style></style>