From 3610c69a69757b3767a7a7de882f6e7e7f1fad3d Mon Sep 17 00:00:00 2001 From: Estifo77 <139631617+Estifo77@users.noreply.github.com> Date: Thu, 6 Aug 2026 09:43:40 +0300 Subject: [PATCH] fixes --- .../license-review/pages/LicenseQueuePage.tsx | 2 +- .../lib/features/licensing/licensing.types.ts | 97 +++++++++---------- 2 files changed, 46 insertions(+), 53 deletions(-) diff --git a/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage.tsx b/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage.tsx index f32d9ac4d..4a183e6d3 100644 --- a/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage.tsx +++ b/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage.tsx @@ -143,7 +143,7 @@ export function LicenseQueuePage() { // it was originally submitted. sortBy: urlFilter.sortBy ?? - (activeView.id === "mine" ? "claimedAt" : "submittedAt"), + (activeView.id === "mine" ? "submittedAt" : "submittedAt"), sortDir: urlFilter.sortDir ?? "DESC", take: PAGE_SIZE, skip: (page - 1) * PAGE_SIZE, diff --git a/libs/api/src/lib/features/licensing/licensing.types.ts b/libs/api/src/lib/features/licensing/licensing.types.ts index 651c52a09..095c15cbe 100644 --- a/libs/api/src/lib/features/licensing/licensing.types.ts +++ b/libs/api/src/lib/features/licensing/licensing.types.ts @@ -7,35 +7,35 @@ export type Bilingual = { en?: string; am?: string }; * previously this lived in a backoffice mock page. */ export type LicenseStatus = - | 'DRAFT' - | 'SUBMITTED' - | 'UNDER_REVIEW' - | 'UNDER_EVALUATION' - | 'RESUBMIT_REQUIRED' - | 'INSPECTION_PENDING' - | 'INSPECTION_COMPLETED' - | 'APPROVED' - | 'REJECTED' - | 'ON_HOLD' - | 'PAYMENT_PENDING' - | 'PAID' - | 'PAYMENT_CONFIRMED' - | 'CERTIFICATE_ISSUED' - | 'COMPLETED'; + | "DRAFT" + | "SUBMITTED" + | "UNDER_REVIEW" + | "UNDER_EVALUATION" + | "RESUBMIT_REQUIRED" + | "INSPECTION_PENDING" + | "INSPECTION_COMPLETED" + | "APPROVED" + | "REJECTED" + | "ON_HOLD" + | "PAYMENT_PENDING" + | "PAID" + | "PAYMENT_CONFIRMED" + | "CERTIFICATE_ISSUED" + | "COMPLETED"; -export type ApplicationKind = 'NEW' | 'RENEWAL'; +export type ApplicationKind = "NEW" | "RENEWAL"; export type FormFieldType = - | 'TEXT' - | 'TEXTAREA' - | 'NUMBER' - | 'MONEY' - | 'DATE' - | 'SELECT' - | 'BOOLEAN' - | 'EMAIL' - | 'PHONE' - | 'TIN'; + | "TEXT" + | "TEXTAREA" + | "NUMBER" + | "MONEY" + | "DATE" + | "SELECT" + | "BOOLEAN" + | "EMAIL" + | "PHONE" + | "TIN"; export interface FieldCondition { field: string; @@ -75,9 +75,7 @@ export interface FormSectionConfig { /** Grouping the portal organises the licence catalogue by. */ export type LicenseCategory = - | 'CARGO_FREIGHT' - | 'SHIPPING_AGENCY' - | 'INVESTMENT'; + "CARGO_FREIGHT" | "SHIPPING_AGENCY" | "INVESTMENT"; export interface LicenseCategoryDefinition { key: LicenseCategory; @@ -131,7 +129,7 @@ export interface DocumentRequirement { name: Bilingual; description?: Bilingual; applicationKind: ApplicationKind; - mode: 'ALWAYS' | 'CONDITIONAL' | 'OPTIONAL'; + mode: "ALWAYS" | "CONDITIONAL" | "OPTIONAL"; conditionExpression?: FieldCondition & { previousDocExpired?: string }; allowedMimeTypes: string[]; maxSizeMb: number; @@ -238,7 +236,7 @@ export interface StatusHistoryEntry { createdAt: string; } -export type RemarkTargetType = 'FORM_SECTION' | 'DOCUMENT' | 'STAFF'; +export type RemarkTargetType = "FORM_SECTION" | "DOCUMENT" | "STAFF"; export interface ApplicationRemark { id: string; @@ -269,8 +267,8 @@ export interface Inspection { scheduledDate: string | null; conductedDate: string | null; location: string | null; - status: 'SCHEDULED' | 'COMPLETED' | 'CANCELLED'; - result: 'PASSED' | 'FAILED' | null; + status: "SCHEDULED" | "COMPLETED" | "CANCELLED"; + result: "PASSED" | "FAILED" | null; findings: string | null; } @@ -296,18 +294,18 @@ export interface QueueFilter { submittedTo?: string; overdue?: boolean; sortBy?: QueueSortField; - sortDir?: 'ASC' | 'DESC'; + sortDir?: "ASC" | "DESC"; take?: number; skip?: number; } export type QueueSortField = - | 'submittedAt' - | 'applicationNumber' - | 'companyName' - | 'status' - | 'dueAt' - | 'claimedAt'; + | "submittedAt" + | "applicationNumber" + | "companyName" + | "status" + | "dueAt" + | "claimedAt"; /** Row counts behind the queue's saved-view tabs. */ export interface QueueCounts { @@ -319,7 +317,7 @@ export interface QueueCounts { all: number; } -export type DocumentDecision = 'ACCEPTED' | 'REJECTED'; +export type DocumentDecision = "ACCEPTED" | "REJECTED"; /** An officer's verdict on one uploaded document. */ export interface DocumentReview { @@ -357,10 +355,10 @@ export interface ExportResult { truncated: boolean; } -export type TemplateStatus = 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'; +export type TemplateStatus = "DRAFT" | "PUBLISHED" | "ARCHIVED"; export interface TemplatePageOptions { - format?: 'A4' | 'A5' | 'Letter' | 'Legal'; + format?: "A4" | "A5" | "Letter" | "Legal"; landscape?: boolean; printBackground?: boolean; } @@ -392,7 +390,7 @@ export interface Paginated { /** Per-field problems returned by the server when a submission is incomplete. */ export interface ValidationIssue { - kind: 'field' | 'document' | 'staff'; + kind: "field" | "document" | "staff"; target: string; field?: string; message: string; @@ -400,7 +398,7 @@ export interface ValidationIssue { /** What the browser must do to complete a payment. */ export interface ClientAction { - type: 'REDIRECT' | 'LAUNCH_APP' | 'NONE'; + type: "REDIRECT" | "LAUNCH_APP" | "NONE"; url?: string; appId?: string; receiveCode?: string; @@ -408,12 +406,7 @@ export interface ClientAction { } export type PaymentStatus = - | 'PENDING' - | 'PROCESSING' - | 'PAID' - | 'FAILED' - | 'EXPIRED' - | 'CANCELLED'; + "PENDING" | "PROCESSING" | "PAID" | "FAILED" | "EXPIRED" | "CANCELLED"; export interface InitiatePaymentResult { paymentId: string; @@ -455,7 +448,7 @@ export interface IssuedLicense { tinNumber: string | null; issueDate: string; expiryDate: string; - status: 'ACTIVE' | 'EXPIRED' | 'SUSPENDED' | 'CANCELLED' | 'SUPERSEDED'; + status: "ACTIVE" | "EXPIRED" | "SUSPENDED" | "CANCELLED" | "SUPERSEDED"; /** * Days until the expiry date; negative once it has passed. Computed by the * API in the authority's timezone — the client must not re-derive it, since