Added Filter "nur offene anzeigen"
This commit is contained in:
@@ -57,6 +57,18 @@
|
|||||||
Spalten
|
Spalten
|
||||||
</template>
|
</template>
|
||||||
</USelectMenu>
|
</USelectMenu>
|
||||||
|
<USelectMenu
|
||||||
|
icon="i-heroicons-adjustments-horizontal-solid"
|
||||||
|
multiple
|
||||||
|
v-model="selectedFilters"
|
||||||
|
:options="['Nur offene anzeigen']"
|
||||||
|
:color="selectedFilters.length > 0 ? 'primary' : 'white'"
|
||||||
|
:ui-menu="{ width: 'min-w-max' }"
|
||||||
|
>
|
||||||
|
<template #label>
|
||||||
|
Filter
|
||||||
|
</template>
|
||||||
|
</USelectMenu>
|
||||||
</template>
|
</template>
|
||||||
</UDashboardToolbar>
|
</UDashboardToolbar>
|
||||||
|
|
||||||
@@ -256,6 +268,7 @@ const displayCurrency = (value, currency = "€") => {
|
|||||||
|
|
||||||
|
|
||||||
const searchString = ref('')
|
const searchString = ref('')
|
||||||
|
const selectedFilters = ref([])
|
||||||
const filteredRows = computed(() => {
|
const filteredRows = computed(() => {
|
||||||
|
|
||||||
let temp = items.value.filter(i => types.value.find(x => x.key === i.type))
|
let temp = items.value.filter(i => types.value.find(x => x.key === i.type))
|
||||||
@@ -267,6 +280,11 @@ const filteredRows = computed(() => {
|
|||||||
temp = temp.filter(i => i.state !== "Entwurf")
|
temp = temp.filter(i => i.state !== "Entwurf")
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
if(selectedFilters.value.includes("Nur offene anzeigen")){
|
||||||
|
temp = temp.filter(i => !isPaid(i))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return useSearch(searchString.value, temp.slice().reverse())
|
return useSearch(searchString.value, temp.slice().reverse())
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user