forked from verdnatura/salix-front
feat: refs #7889 added shortcuts to modules
This commit is contained in:
parent
a48c293a9a
commit
585919a4d9
|
@ -15,7 +15,6 @@ export default {
|
|||
|
||||
const handleKeyDown = (event) => {
|
||||
const { ctrlKey, altKey, key } = event;
|
||||
|
||||
if (ctrlKey && altKey && keyBindingMap[key] && !isNotified) {
|
||||
event.preventDefault();
|
||||
router.push(keyBindingMap[key]);
|
||||
|
|
|
@ -55,6 +55,12 @@ const pinnedModules = computed(() => navigation.getPinnedModules());
|
|||
>
|
||||
<div class="text-center text-primary button-text">
|
||||
{{ t(item.title) }}
|
||||
<div v-if="item.subtitle">
|
||||
{{ '(' + item.subtitle + ')' }}
|
||||
<QTooltip>
|
||||
{{ 'Ctrl + Alt + ' + item.subtitle }}
|
||||
</QTooltip>
|
||||
</div>
|
||||
</div>
|
||||
</QBtn>
|
||||
</div>
|
||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
|||
name: 'Supplier',
|
||||
meta: {
|
||||
title: 'suppliers',
|
||||
subtitle: 'P',
|
||||
icon: 'vn:supplier',
|
||||
moduleName: 'Supplier',
|
||||
keyBinding: 'p',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'SupplierMain' },
|
||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
|||
name: 'Account',
|
||||
meta: {
|
||||
title: 'users',
|
||||
subtitle: 'U',
|
||||
icon: 'face',
|
||||
moduleName: 'Account',
|
||||
keyBinding: 'u',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'AccountMain' },
|
||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
|||
path: '/claim',
|
||||
meta: {
|
||||
title: 'claims',
|
||||
subtitle: 'R',
|
||||
icon: 'vn:claims',
|
||||
moduleName: 'Claim',
|
||||
keyBinding: 'r',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'ClaimMain' },
|
||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
|||
name: 'Customer',
|
||||
meta: {
|
||||
title: 'customers',
|
||||
subtitle: 'C',
|
||||
icon: 'vn:client',
|
||||
moduleName: 'Customer',
|
||||
keyBinding: 'c',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'CustomerMain' },
|
||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
|||
name: 'Entry',
|
||||
meta: {
|
||||
title: 'entries',
|
||||
subtitle: 'E',
|
||||
icon: 'vn:entry',
|
||||
moduleName: 'Entry',
|
||||
keyBinding: '€',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'EntryMain' },
|
||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
|||
name: 'Item',
|
||||
meta: {
|
||||
title: 'items',
|
||||
subtitle: 'A',
|
||||
icon: 'vn:item',
|
||||
moduleName: 'Item',
|
||||
keyBinding: 'a',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'ItemMain' },
|
||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
|||
name: 'Monitor',
|
||||
meta: {
|
||||
title: 'monitors',
|
||||
subtitle: 'M',
|
||||
icon: 'grid_view',
|
||||
moduleName: 'Monitor',
|
||||
keyBinding: 'm',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'MonitorMain' },
|
||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
|||
name: 'Order',
|
||||
meta: {
|
||||
title: 'order',
|
||||
subtitle: 'O',
|
||||
icon: 'vn:basket',
|
||||
moduleName: 'Order',
|
||||
keyBinding: 'o',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'OrderMain' },
|
||||
|
|
|
@ -7,7 +7,6 @@ export default {
|
|||
title: 'routes',
|
||||
icon: 'vn:delivery',
|
||||
moduleName: 'Route',
|
||||
keyBinding: 'r',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'RouteMain' },
|
||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
|||
path: '/ticket',
|
||||
meta: {
|
||||
title: 'tickets',
|
||||
subtitle: 'T',
|
||||
icon: 'vn:ticket',
|
||||
moduleName: 'Ticket',
|
||||
keyBinding: 't',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'TicketMain' },
|
||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
|||
name: 'Worker',
|
||||
meta: {
|
||||
title: 'workers',
|
||||
subtitle: 'W',
|
||||
icon: 'vn:worker',
|
||||
moduleName: 'Worker',
|
||||
keyBinding: 'w',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'WorkerMain' },
|
||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
|||
name: 'Zone',
|
||||
meta: {
|
||||
title: 'zones',
|
||||
subtitle: 'Z',
|
||||
icon: 'vn:zone',
|
||||
moduleName: 'Zone',
|
||||
keyBinding: 'z',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'ZoneMain' },
|
||||
|
|
|
@ -72,6 +72,7 @@ export const useNavigationStore = defineStore('navigationStore', () => {
|
|||
if (meta) {
|
||||
item.title = `globals.pageTitles.${meta.title}`;
|
||||
item.icon = meta.icon;
|
||||
item.subtitle = meta.subtitle;
|
||||
}
|
||||
|
||||
parent.push(item);
|
||||
|
|
Loading…
Reference in New Issue