From 6ebb101e4939c0f6f94e6b2a24c9de7eebb6f582 Mon Sep 17 00:00:00 2001 From: Yashas Date: Tue, 27 Oct 2026 13:56:58 +0530 Subject: [PATCH] Hide ignored noise from the inbox; open an enquiry by its BNK reference from notification links Co-Authored-By: Claude Fable 5.1 --- src/screens/Enquiry.tsx | 3 ++- src/screens/Inbox.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/screens/Enquiry.tsx b/src/screens/Enquiry.tsx index 0392920..dc73c8f 100644 --- a/src/screens/Enquiry.tsx +++ b/src/screens/Enquiry.tsx @@ -91,7 +91,8 @@ function fmtWindow(from: string, to: string): string { const STOCK_LABEL: Record = { available: 'Available', partial: 'Partially available', not_available: 'Not available' }; export function EnquiryPage() { - const { id } = useParams(); + // Notification emails link by reference (BNK-71772); the record is keyed by the number. + const id = (useParams().id ?? '').replace(/^BNK-/i, ''); const { client } = useZino(); const q = useQuery(async () => { const r = await client.page(RV_ENQUIRIES, { limit: 1, filters: [{ field_key: 'instance_id', value: String(id), data_type: 'number' }] }); diff --git a/src/screens/Inbox.tsx b/src/screens/Inbox.tsx index dcddfea..8dab48c 100644 --- a/src/screens/Inbox.tsx +++ b/src/screens/Inbox.tsx @@ -21,7 +21,8 @@ export function Inbox() { const [state, setState] = useState('Mine'); const [q, setQ] = useState(''); const { data, error, loading } = useQuery(() => client.page(RV_ENQUIRIES, { limit: 200, sortBy: 'instance_id', sortDir: 'desc' }), [], 5000); - const rows = (data?.rows ?? []) as unknown as Enquiry[]; + // Noise the desk never answered (automated senders, newsletters) stays out of sight. + const rows = ((data?.rows ?? []) as unknown as Enquiry[]).filter((r) => r.intake_status !== 'ignored'); const counts = useMemo(() => { const c: Record = { Mine: 0, All: rows.length };