remove LicenseTypesTab component and associated creation logic from licensing configuration

This commit is contained in:
estifanos
2026-09-02 11:26:34 +00:00
parent f8ed067b9d
commit 90d1f6c462
6 changed files with 177 additions and 639 deletions

View File

@@ -29,8 +29,6 @@ import type {
DocumentDecision,
DocumentReview,
ExportResult,
FamilyKind,
LicenseCategory,
LicenseTemplate,
Paginated,
PickupAppointment,
@@ -113,28 +111,6 @@ const TAGS = [
const listTag = (type: (typeof TAGS)[number]) => ({ type, id: 'LIST' }) as const;
const itemTag = (type: (typeof TAGS)[number], id: string) => ({ type, id }) as const;
/** What `POST /license-types` accepts. Mirrors the server's create DTO. */
export interface CreateLicenseTypeInput {
key: string;
name: { en: string; am: string };
description?: { en: string; am: string };
category?: LicenseCategory;
familyKind?: FamilyKind;
serviceKind?: ServiceKind;
workflowProfile?: WorkflowProfile;
certificatePrefix: string;
feeNewApplication?: number;
feeRenewal?: number;
feeCurrency?: string;
capitalThreshold?: number;
validityMonths?: number;
inspectionRequired?: boolean;
issuesCertificate?: boolean;
renewalEnabled?: boolean;
sortOrder?: number;
isActive?: boolean;
}
/**
* Typed licensing endpoints, shared by the portal and the backoffice.
*
@@ -311,18 +287,6 @@ export const licensingApi = baseApi
error ? [] : [listTag('LicenseType'), itemTag('LicenseType', id)],
}),
/**
* Creates a licence type. The bare minimum a type needs to exist and
* be classified; its form, documents, fees and behaviour are configured
* afterwards on their own screens. The server upper-cases and trims the
* key, refuses a taken one with 409 `license_type_key_taken`, and lints
* a form schema if one is supplied.
*/
createLicenseType: builder.mutation<LicenseType, CreateLicenseTypeInput>({
query: (body) => ({ url: '/license-types', method: 'POST', body }),
invalidatesTags: (_r, error) => (error ? [] : [listTag('LicenseType')]),
}),
/**
* Opens or closes a type to new applications. Applications already in
* flight hold the type by id and keep running; only the portal