feat: implement license type management with creation and status toggling functionality

This commit is contained in:
estifanos
2026-09-02 11:10:27 +00:00
parent 3b5bdfb6d1
commit 5eeb9602b0
8 changed files with 767 additions and 17 deletions

View File

@@ -411,6 +411,18 @@ const ERROR_MESSAGES: Record<string, string> = {
'Candidates are currently waiting to pay this fee. Removing it would leave them unable to pay and unable to continue — set a different amount instead.',
form_schema_missing_protected_paths:
'The form for this licence type does not contain the field this setting depends on. Add the field to the form first.',
license_type_key_taken:
'A licence type with this key already exists (it may be archived). Choose a different key.',
license_type_key_in_use:
'Applications already reference this licence type, so its key can no longer be changed.',
invalid_form_schema:
'The form schema is not consistent — a condition or field reference points at something the form does not define.',
// Exam certification catalogue.
rank_not_found:
'That STCW rank is not in the ranks registry, or has been switched off. Pick a rank from the list.',
certification_in_use:
'Exam sessions or question-bank items still use this certification. Reassign or remove those first.',
};
export function extractErrorMessage(error: unknown, fallback = 'Something went wrong'): string {