mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 05:12:14 +00:00
URL-backed facets (q / kind / episode / year) parse and serialise through one pure helper pair so deep links round-trip byte-stable; the API search builder pins the timeline sort. Month bucketing + row chunking feed the virtualized grid as a flat item list. The upload-response parser owns the duplicate contract: HTTP 200 with envelope-level meta.duplicate returns the existing row, every 413/415 reason maps to a translated-copy class, and proxy-stripped bodies fall back to the HTTP status. Query keys move to the vault filter shape and gain the usage read. Plan-Task: W2-T1 (URL state), W2-T5 (keys)
49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
/**
|
|
* The vault's kind vocabulary: one Lucide glyph per document kind, in the
|
|
* fixed display order the type-chip rail and the cards share. Icons are
|
|
* passed as components — the consuming primitive owns size and colour per
|
|
* the design standards.
|
|
*/
|
|
import type { ComponentType } from "react";
|
|
import {
|
|
ArrowRightLeft,
|
|
File,
|
|
FileText,
|
|
FlaskConical,
|
|
Pill,
|
|
ScanLine,
|
|
ShieldCheck,
|
|
Stethoscope,
|
|
Syringe,
|
|
} from "lucide-react";
|
|
|
|
import type { InboundDocumentKindValue } from "@/lib/validations/inbound-documents";
|
|
|
|
/** Display order for the type-chip rail (everyday kinds first, OTHER last). */
|
|
export const DOCUMENT_KIND_ORDER: readonly InboundDocumentKindValue[] = [
|
|
"DOCTOR_REPORT",
|
|
"LAB_RESULT",
|
|
"IMAGING",
|
|
"DISCHARGE_LETTER",
|
|
"PRESCRIPTION",
|
|
"REFERRAL",
|
|
"VACCINATION",
|
|
"INSURANCE",
|
|
"OTHER",
|
|
];
|
|
|
|
export const DOCUMENT_KIND_ICONS: Record<
|
|
InboundDocumentKindValue,
|
|
ComponentType<{ className?: string }>
|
|
> = {
|
|
DOCTOR_REPORT: Stethoscope,
|
|
DISCHARGE_LETTER: FileText,
|
|
LAB_RESULT: FlaskConical,
|
|
IMAGING: ScanLine,
|
|
PRESCRIPTION: Pill,
|
|
REFERRAL: ArrowRightLeft,
|
|
INSURANCE: ShieldCheck,
|
|
VACCINATION: Syringe,
|
|
OTHER: File,
|
|
};
|