Add 'assign-reviewer' action and related functionality for license review process

This commit is contained in:
Nati
2026-08-26 13:34:06 +00:00
parent 207994df69
commit b5f1ffa6b8
6 changed files with 63 additions and 3 deletions

View File

@@ -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,