Changed STore Type and corrected all Pages
Added HistoryDisplay.vue Added NumberRanges
This commit is contained in:
@@ -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())
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user