Added Reset in Inventory

Added Keyboard Controls for Tab Nav and Back to List
Added Select On Enter for First Entry in Search

for Customers and Vendors
This commit is contained in:
2024-05-01 21:55:41 +02:00
parent 86cd55102c
commit 7966173385
6 changed files with 107 additions and 9 deletions

View File

@@ -4,12 +4,28 @@ definePageMeta({
middleware: "auth"
})
defineShortcuts({
'backspace': () => {
router.push("/vendors")
},
'arrowleft': () => {
if(openTab.value > 0){
openTab.value -= 1
}
},
'arrowright': () => {
if(openTab.value < 1) {
openTab.value += 1
}
},
})
const dataStore = useDataStore()
const route = useRoute()
const router = useRouter()
const toast = useToast()
const id = ref(route.params.id ? route.params.id : null )
const openTab = ref(0)
let currentItem = ref(null)
@@ -92,6 +108,7 @@ setupPage()
:items="[{label: 'Informationen'},{label: 'Dokumente'}]"
v-if="currentItem && mode == 'show'"
class="p-5"
v-model="openTab"
>
<template #item="{item}">
<div v-if="item.label === 'Informationen'" class="mt-5 flex">