src/features/inbox/types.ts
Linked repository file from this build.
import type { InboxResponse } from "@/lib/db/inbox-store";
export type { EventsResponse, InboxResponse } from "@/lib/db/inbox-store";
/** One review row in an inbox list. Only Recent rows carry touchedAt. */
export type InboxReview = InboxResponse["newReviews"][number] & { touchedAt?: string | null };
export type InboxEvent = InboxResponse["events"][number];
export const eventLabels: Record<string, string> = {
distributed: "Assigned",
document_added: "Document added",
changes_requested: "Needs correction",
approved: "Approved",
dropped: "Dropped",
pec_decision: "PEC decision",
appointment_changed: "Appointment changed",
};
export function eventTime(value: string) {
return new Date(value).toLocaleString(undefined, {
month: "short",
day: "numeric",
hour: "numeric",
minute: "2-digit",
});
}