Include payment status labels in invoice search
This commit is contained in:
@@ -19,6 +19,7 @@ import { testToast } from '@/lib/utils'
|
|||||||
import SelectSeparator from '@/components/ui/select/SelectSeparator.vue'
|
import SelectSeparator from '@/components/ui/select/SelectSeparator.vue'
|
||||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
|
||||||
import { Kbd, KbdGroup } from '@/components/ui/kbd'
|
import { Kbd, KbdGroup } from '@/components/ui/kbd'
|
||||||
|
import { statusBadgeLabels } from '@/components/ui/status-badge'
|
||||||
|
|
||||||
const breadcrumbs: BreadcrumbItem[] = [{
|
const breadcrumbs: BreadcrumbItem[] = [{
|
||||||
title: 'Rechnungsstellung',
|
title: 'Rechnungsstellung',
|
||||||
@@ -68,8 +69,16 @@ const years = computed((): number[] => {
|
|||||||
|
|
||||||
const fuse = computed(() => {
|
const fuse = computed(() => {
|
||||||
const options = {
|
const options = {
|
||||||
keys: ['customer.companyName', 'paymentStatus', 'title', 'nr'],
|
keys: [
|
||||||
threshold: 0.4,
|
'customer.companyName',
|
||||||
|
{
|
||||||
|
name: 'paymentStatus',
|
||||||
|
getFn: (invoice: Invoice) => statusBadgeLabels[invoice.paymentStatus] || invoice.paymentStatus
|
||||||
|
},
|
||||||
|
'title',
|
||||||
|
'nr'
|
||||||
|
],
|
||||||
|
threshold: 0.3,
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Fuse(invoicesData.value, options);
|
return new Fuse(invoicesData.value, options);
|
||||||
|
|||||||
Reference in New Issue
Block a user