feat: implement applicant name fallback logic in licensing helpers and update MyApplicationsPage

This commit is contained in:
estifanos
2026-08-12 07:18:43 +00:00
parent 829dfed999
commit 0633ecc165
3 changed files with 28 additions and 23 deletions

View File

@@ -21,6 +21,7 @@ import { notifications } from '@mantine/notifications';
import {
STATUS_COLORS,
STATUS_LABELS,
applicantOrCompanyName,
extractErrorMessage,
localized,
useBypassPaymentMutation,
@@ -120,7 +121,7 @@ export function MyApplicationsPage() {
const q = search.trim().toLowerCase();
return allItems.filter((app) => {
if (q) {
const haystack = `${app.applicationNumber} ${app.companyName ?? ''}`.toLowerCase();
const haystack = `${app.applicationNumber} ${applicantOrCompanyName(app) ?? ''}`.toLowerCase();
if (!haystack.includes(q)) return false;
}
if (statusFilter && app.status !== statusFilter) return false;
@@ -201,7 +202,7 @@ export function MyApplicationsPage() {
},
{
header: 'Company',
cell: ({ row }) => <Text size="sm">{row.original.companyName ?? '—'}</Text>,
cell: ({ row }) => <Text size="sm">{applicantOrCompanyName(row.original) ?? '—'}</Text>,
},
{
header: 'Status',