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' }) router.push({ name: 'Login' })
} }
</script> </script>
@/store/appStore

View File

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

View File

@ -1,7 +1,11 @@
<template> <template>
<v-container fluid> <v-container fluid>
<v-row> <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" /> <printer-card :printer="printer" />
</v-col> </v-col>
</v-row> </v-row>
@ -21,4 +25,3 @@ onMounted(async () => {
await appStore.fetchPrinters() await appStore.fetchPrinters()
}) })
</script> </script>
@/store/appStore

View File

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