Reffractored vendors,vehicles,services,servicecategories,products,productcategories, projects, plants, customers, contracts, contacts

This commit is contained in:
2024-12-20 20:00:08 +01:00
parent acf5d1c2ea
commit 0d849f5fcb
20 changed files with 361 additions and 1161 deletions

View File

@@ -1,5 +1,11 @@
<template>
<UDashboardNavbar title="Lieferanten" :badge="filteredRows.length">
<EntityList
:items="items"
type="vendors"
/>
<!-- <UDashboardNavbar title="Lieferanten" :badge="filteredRows.length">
<template #right>
<UInput
id="searchinput"
@@ -53,7 +59,7 @@
<template #address-data="{row}">
{{row.infoData.street ? `${row.infoData.street}, ` : ''}}{{row.infoData.special ? `${row.infoData.special},` : ''}} {{(row.infoData.zip || row.infoData.city) ? `${row.infoData.zip} ${row.infoData.city}, ` : ''}} {{row.infoData.country}}
</template>
</UTable>
</UTable>-->
</template>
@@ -62,35 +68,7 @@ definePageMeta({
middleware: "auth"
})
defineShortcuts({
'/': () => {
//console.log(searchinput)
//searchinput.value.focus()
document.getElementById("searchinput").focus()
},
'+': () => {
router.push("/vendors/create")
},
'Enter': {
usingInput: true,
handler: () => {
router.push(`/vendors/show/${filteredRows.value[selectedItem.value].id}`)
}
},
'arrowdown': () => {
selectedItem.value += 1
},
'arrowup': () => {
selectedItem.value -= 1
}
})
const dataStore = useDataStore()
const router = useRouter()
const mode = ref("show")
const items = ref([])
const selectedItem = ref(0)
const setupPage = async () => {
items.value = await useSupabaseSelect("vendors","*","vendorNumber")
@@ -100,30 +78,8 @@ setupPage()
const templateColumns = [
{
key: 'vendorNumber',
label: "Lieferantennr.",
sortable: true
},
{
key: "name",
label: "Name",
sortable: true
},
{
key: "address",
label: "Adresse",
sortable: true
}
]
const selectedColumns = ref(templateColumns)
const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column)))
const searchString = ref('')
const filteredRows = computed(() => {
return useSearch(searchString.value, items.value)
})
</script>
<style scoped>