Changed STore Type and corrected all Pages

Added HistoryDisplay.vue
Added NumberRanges
This commit is contained in:
2023-12-27 21:52:55 +01:00
parent 9e092823e4
commit c41b99f29d
33 changed files with 1094 additions and 812 deletions

View File

@@ -20,7 +20,7 @@
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
>
<template #customer-data="{row}">
{{customers.find(customer => customer.id === row.customer) ? customers.find(customer => customer.id === row.customer).name : row.customer }}
{{dataStore.customers.find(customer => customer.id === row.customer) ? dataStore.customers.find(customer => customer.id === row.customer).name : row.customer }}
</template>
</UTable>
@@ -33,9 +33,8 @@ definePageMeta({
middleware: "auth"
})
const dataStore = useDataStore()
const router = useRouter()
const {contracts, customers } = storeToRefs(useDataStore())
const mode = ref("show")
const itemColumns = [
@@ -65,10 +64,10 @@ const searchString = ref('')
const filteredRows = computed(() => {
if(!searchString.value) {
return contracts.value
return dataStore.contracts
}
return contracts.value.filter(item => {
return dataStore.contracts.filter(item => {
return Object.values(item).some((value) => {
return String(value).toLowerCase().includes(searchString.value.toLowerCase())
})