mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-09-08 07:45:47 +00:00
feat: implement applicant name fallback logic in licensing helpers and update MyApplicationsPage
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user