feat: disabled menu
This commit is contained in:
parent
8cb6a87be1
commit
17bf0737eb
3 changed files with 51 additions and 8 deletions
|
|
@ -7,7 +7,9 @@ const router = useRouter();
|
|||
|
||||
const currentRoute = ref<string>('');
|
||||
|
||||
const labelMenu = ref<{ label: string; icon: string; route: string }[]>([
|
||||
const labelMenu = ref<
|
||||
{ label: string; icon: string; route: string; disabled?: boolean }[]
|
||||
>([
|
||||
{
|
||||
label: 'drawerDashboard',
|
||||
icon: 'img:/file-account-outline.png',
|
||||
|
|
@ -33,16 +35,43 @@ const labelMenu = ref<{ label: string; icon: string; route: string }[]>([
|
|||
icon: 'raphael:package',
|
||||
route: '/product-service',
|
||||
},
|
||||
{ label: 'drawerQuotation', icon: 'raphael:package', route: '' },
|
||||
{ label: 'drawerRequestList', icon: 'raphael:package', route: '' },
|
||||
{ label: 'drawerWorkOrder', icon: 'raphael:package', route: '' },
|
||||
{ label: 'drawerInvoice', icon: 'raphael:package', route: '' },
|
||||
{
|
||||
label: 'drawerQuotation',
|
||||
icon: 'raphael:package',
|
||||
route: '',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerRequestList',
|
||||
icon: 'raphael:package',
|
||||
route: '',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerWorkOrder',
|
||||
icon: 'raphael:package',
|
||||
route: '',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerInvoice',
|
||||
icon: 'raphael:package',
|
||||
route: '',
|
||||
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerAccountingLedger',
|
||||
icon: 'mdi-account-cash-outline',
|
||||
route: '',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
label: 'drawerReport',
|
||||
icon: 'mdi-file-chart-outline',
|
||||
route: '',
|
||||
disabled: true,
|
||||
},
|
||||
{ label: 'drawerReport', icon: 'mdi-file-chart-outline', route: '' },
|
||||
]);
|
||||
|
||||
const leftDrawerOpen = defineModel<boolean>('leftDrawerOpen', {
|
||||
|
|
@ -83,6 +112,7 @@ function navigateTo(label: string, destination: string) {
|
|||
v-for="v in labelMenu"
|
||||
:key="v.label"
|
||||
clickable
|
||||
:disable="!!v.disabled"
|
||||
@click="navigateTo(v.label, v.route)"
|
||||
class="no-padding"
|
||||
:class="{ active: currentRoute === v.label, dark: $q.dark.isActive }"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue