This commit is contained in:
Douglas Barone 2023-06-29 15:35:35 -04:00
parent 0c20791179
commit 6dfca55de5
4 changed files with 7 additions and 4 deletions

View File

@ -65,4 +65,3 @@ function logout() {
router.push({ name: 'Login' })
}
</script>
@/store/appStore

View File

@ -44,6 +44,8 @@ export const useAppStore = defineStore('app', {
filteredPrinters(state): Printer[] {
const filter = this.printerFilter?.trim()
console.log(filter)
if (!filter) {
return state.printers
}

View File

@ -1,7 +1,11 @@
<template>
<v-container fluid>
<v-row>
<v-col cols="6" v-for="printer in appStore.printers" :key="printer.id">
<v-col
cols="6"
v-for="printer in appStore.filteredPrinters"
:key="printer.id"
>
<printer-card :printer="printer" />
</v-col>
</v-row>
@ -21,4 +25,3 @@ onMounted(async () => {
await appStore.fetchPrinters()
})
</script>
@/store/appStore

View File

@ -112,4 +112,3 @@ async function login() {
}
}
</script>
@/store/appStore