mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-09-07 22:25:43 +00:00
feat: add certificate regeneration functionality to LicenseReviewPage
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user