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 { 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);
|
||||
|
||||
Reference in New Issue
Block a user