0
0
Fork 0

feat: refs #7889 added shortcuts to modules

This commit is contained in:
Jon Elias 2024-09-06 09:19:38 +02:00
parent a48c293a9a
commit 585919a4d9
15 changed files with 29 additions and 2 deletions

View File

@ -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]);

View File

@ -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>

View File

@ -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' },

View File

@ -5,8 +5,10 @@ export default {
name: 'Account',
meta: {
title: 'users',
subtitle: 'U',
icon: 'face',
moduleName: 'Account',
keyBinding: 'u',
},
component: RouterView,
redirect: { name: 'AccountMain' },

View File

@ -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' },

View File

@ -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' },

View File

@ -5,8 +5,10 @@ export default {
name: 'Entry',
meta: {
title: 'entries',
subtitle: 'E',
icon: 'vn:entry',
moduleName: 'Entry',
keyBinding: '€',
},
component: RouterView,
redirect: { name: 'EntryMain' },

View File

@ -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' },

View File

@ -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' },

View File

@ -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' },

View File

@ -7,7 +7,6 @@ export default {
title: 'routes',
icon: 'vn:delivery',
moduleName: 'Route',
keyBinding: 'r',
},
component: RouterView,
redirect: { name: 'RouteMain' },

View File

@ -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' },

View File

@ -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' },

View File

@ -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' },

View File

@ -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);