diff --git a/apps/backoffice/src/app/features/license-review/config/actions.ts b/apps/backoffice/src/app/features/license-review/config/actions.ts index 6a5bf7118..4bd1d9446 100644 --- a/apps/backoffice/src/app/features/license-review/config/actions.ts +++ b/apps/backoffice/src/app/features/license-review/config/actions.ts @@ -155,7 +155,9 @@ export const ACTIONS: ActionDefinition[] = [ id: 'final-approve', tier: 'primary', labelKey: 'review.actions.finalApprove', - from: ['INSPECTION_COMPLETED', 'UNDER_EVALUATION'], + // ELIGIBILITY_PAID: an examined certificate (CoC/CoP) is decided straight + // off the eligibility queue — no assignment step. + from: ['INSPECTION_COMPLETED', 'UNDER_EVALUATION', 'ELIGIBILITY_PAID'], permissions: ['can:approve:license-application'], emphasis: 'filled', color: 'teal', @@ -165,7 +167,7 @@ export const ACTIONS: ActionDefinition[] = [ id: 'request-adjustment', tier: 'primary', labelKey: 'review.actions.requestAdjustment', - from: ['UNDER_REVIEW', 'UNDER_EVALUATION', 'INSPECTION_COMPLETED'], + from: ['UNDER_REVIEW', 'UNDER_EVALUATION', 'INSPECTION_COMPLETED', 'ELIGIBILITY_PAID'], permissions: ['can:request-adjustment:license-application'], emphasis: 'light', color: 'orange', @@ -180,6 +182,7 @@ export const ACTIONS: ActionDefinition[] = [ 'UNDER_EVALUATION', 'INSPECTION_PENDING', 'INSPECTION_COMPLETED', + 'ELIGIBILITY_PAID', ], permissions: ['can:reject:license-application'], emphasis: 'light', diff --git a/apps/backoffice/src/app/i18n/locales/am.ts b/apps/backoffice/src/app/i18n/locales/am.ts index c4d5459b3..40aab6f6e 100644 --- a/apps/backoffice/src/app/i18n/locales/am.ts +++ b/apps/backoffice/src/app/i18n/locales/am.ts @@ -998,6 +998,7 @@ export const am: Translations = { actions: { claim: "ውሰድ", assign: "መድብ", + assignReviewer: "ገምጋሚ መድብ", escalate: "ወደ ላይ አሳድግ", hold: "አግድ", resume: "ቀጥል", @@ -1056,6 +1057,7 @@ export const am: Translations = { hold: "ለ{{applicant}} ማመልከቻ {{number}} ያግዳል። ለእርስዎ ተመድቦ ይቆያል።", resume: "ማመልከቻ {{number}} ወደ ታገደበት ደረጃ ይመልሳል።", escalate: "ማመልከቻ {{number}} ለውሳኔ ወደ የበላይ ኃላፊ ያሳድጋል።", + "assign-reviewer": "ማመልከቻ {{number}} ለተመረጠው ሹም ሰጥቶ ግምገማውን ያስጀምራል።", "confirm-payment": "ለማመልከቻ {{number}} ክፍያ ያረጋግጣል።", "schedule-exam": "ለማመልከቻ {{number}} {{applicant}}ን ለፈተና ክፍለ ጊዜ ይመድባል።", }, @@ -1150,6 +1152,7 @@ export const am: Translations = { resume: "ማመልከቻው ቀጥሏል", escalate: "ወደ ላይ አድጓል", assign: "እንደገና ተመድቧል", + assignReviewer: "ግምገማ ተመድቧል", scheduled: "ምርመራ ተይዟል", inspectionPassed: "ምርመራ አልፏል", inspectionFailed: "ምርመራ ወድቋል", diff --git a/apps/backoffice/src/app/i18n/locales/en.ts b/apps/backoffice/src/app/i18n/locales/en.ts index 3e8ff4f59..ac4ae177d 100644 --- a/apps/backoffice/src/app/i18n/locales/en.ts +++ b/apps/backoffice/src/app/i18n/locales/en.ts @@ -1007,6 +1007,7 @@ export const en = { actions: { claim: 'Claim', assign: 'Assign', + assignReviewer: 'Assign reviewer', escalate: 'Escalate', hold: 'Put on hold', resume: 'Resume', @@ -1064,6 +1065,8 @@ export const en = { hold: 'Parks application {{number}} for {{applicant}}. It stays assigned to you.', resume: 'Returns application {{number}} to the stage it was held from.', escalate: 'Raises application {{number}} to a supervisor for a decision.', + 'assign-reviewer': + 'Hands application {{number}} to the chosen officer and starts the review.', 'confirm-payment': 'Confirms settlement for application {{number}}.', 'schedule-exam': 'Assigns {{applicant}} to an exam session for application {{number}}.', }, @@ -1155,6 +1158,7 @@ export const en = { resume: 'Application resumed', escalate: 'Escalated', assign: 'Reassigned', + assignReviewer: 'Review assigned', scheduled: 'Inspection scheduled', inspectionPassed: 'Inspection passed', inspectionFailed: 'Inspection failed', diff --git a/libs/api/src/lib/features/licensing/licensing-api.ts b/libs/api/src/lib/features/licensing/licensing-api.ts index 3e17464ff..665aaf8ab 100644 --- a/libs/api/src/lib/features/licensing/licensing-api.ts +++ b/libs/api/src/lib/features/licensing/licensing-api.ts @@ -856,6 +856,23 @@ export const licensingApi = baseApi error ? [] : [itemTag('LicenseApplication', id), listTag('ApplicationQueue')], }), + /** + * Starts the review: the team leader hands the file to an employee. + * `assign` above only re-points an application already in flight. + */ + assignReviewer: builder.mutation< + LicenseApplication, + { id: string; officerId: string; remark?: string } + >({ + query: ({ id, ...body }) => ({ + url: `/license-application-review/${id}/assign-reviewer`, + method: 'POST', + body, + }), + invalidatesTags: (_r, error, { id }) => + error ? [] : [itemTag('LicenseApplication', id), listTag('ApplicationQueue')], + }), + holdApplication: builder.mutation< LicenseApplication, { id: string; reason: string } @@ -1050,6 +1067,7 @@ export const { useRevokeLicenseMutation, useReinstateLicenseMutation, useAssignApplicationMutation, + useAssignReviewerMutation, useHoldApplicationMutation, useResumeApplicationMutation, useEscalateApplicationMutation,