Filter
This commit is contained in:
parent
0c20791179
commit
6dfca55de5
|
@ -65,4 +65,3 @@ function logout() {
|
||||||
router.push({ name: 'Login' })
|
router.push({ name: 'Login' })
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@/store/appStore
|
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
|
@ -112,4 +112,3 @@ async function login() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@/store/appStore
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user