feat: add certificate regeneration functionality to LicenseReviewPage

This commit is contained in:
nati
2026-09-07 14:25:35 +00:00
parent 4c86b65e81
commit e807839d74
2 changed files with 70 additions and 0 deletions

View File

@@ -763,6 +763,17 @@ export const licensingApi = baseApi
query: (id) => ({ url: `/licenses/${id}/certificate-backoffice` }),
}),
/**
* Force re-renders a certificate that already has a stored PDF, from
* whatever design is published now — the two routes above only fill in
* a *missing* PDF, so a licence printed from a design that turns out to
* be wrong (a placeholder someone published, a broken background image)
* has no other way to pick up a fix once the design is corrected.
*/
regenerateCertificate: builder.mutation<{ url: string }, string>({
query: (id) => ({ url: `/licenses/${id}/regenerate-certificate`, method: 'POST' }),
}),
// ------------------------------------------------------------- review
getQueue: builder.query<Paginated<LicenseApplication>, QueueFilter | void>({
query: (params) => ({
@@ -1479,6 +1490,7 @@ export const {
useGetLicensesQuery,
useGetCertificateUrlMutation,
useGetCertificateUrlForOfficerMutation,
useRegenerateCertificateMutation,
useGetApplicationPaymentQuery,
usePatchSectionMutation,
useAddStaffMutation,