Include payment status labels in invoice search

This commit is contained in:
2025-11-10 16:08:02 +01:00
parent d531c0a935
commit 19f246a655
+11 -2
View File
@@ -19,6 +19,7 @@ import { testToast } from '@/lib/utils'
import SelectSeparator from '@/components/ui/select/SelectSeparator.vue'
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
import { Kbd, KbdGroup } from '@/components/ui/kbd'
import { statusBadgeLabels } from '@/components/ui/status-badge'
const breadcrumbs: BreadcrumbItem[] = [{
title: 'Rechnungsstellung',
@@ -68,8 +69,16 @@ const years = computed((): number[] => {
const fuse = computed(() => {
const options = {
keys: ['customer.companyName', 'paymentStatus', 'title', 'nr'],
threshold: 0.4,
keys: [
'customer.companyName',
{
name: 'paymentStatus',
getFn: (invoice: Invoice) => statusBadgeLabels[invoice.paymentStatus] || invoice.paymentStatus
},
'title',
'nr'
],
threshold: 0.3,
}
return new Fuse(invoicesData.value, options);