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

@@ -29,7 +29,7 @@
<span v-else>-</span>
</template>
<template #unit-data="{row}">
{{units.find(unit => unit.id === row.unit) ? units.find(unit => unit.id === row.unit).name : row.unit}}
{{dataStore.units.find(unit => unit.id === row.unit) ? dataStore.units.find(unit => unit.id === row.unit).name : row.unit}}
</template>
</UTable>
@@ -42,10 +42,9 @@
definePageMeta({
middleware: "auth"
})
const dataStore = useDataStore()
const supabase = useSupabaseClient()
const router = useRouter()
const {products,units} = storeToRefs(useDataStore())
const itemColumns = [
{
@@ -79,10 +78,10 @@ const searchString = ref('')
const filteredRows = computed(() => {
if(!searchString.value) {
return products.value
return dataStore.products
}
return products.value.filter(product => {
return dataStore.products.filter(product => {
return Object.values(product).some((value) => {
return String(value).toLowerCase().includes(searchString.value.toLowerCase())
})