mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-28 09:00:58 +00:00
feat(certificate-designer): add custom page size options and update related components
This commit is contained in:
@@ -436,6 +436,16 @@ export const licensingApi = baseApi
|
||||
query: (id) => ({ url: `/licenses/${id}/certificate` }),
|
||||
}),
|
||||
|
||||
/**
|
||||
* Same download link, backoffice side. Separate endpoint from
|
||||
* `getCertificateUrl`: the applicant route only ever hands the
|
||||
* certificate to its holder, and an officer reviewing what they just
|
||||
* issued is never the holder.
|
||||
*/
|
||||
getCertificateUrlForOfficer: builder.mutation<{ url: string }, string>({
|
||||
query: (id) => ({ url: `/licenses/${id}/certificate-backoffice` }),
|
||||
}),
|
||||
|
||||
// ------------------------------------------------------------- review
|
||||
getQueue: builder.query<Paginated<LicenseApplication>, QueueFilter | void>({
|
||||
query: (params) => ({
|
||||
@@ -902,7 +912,12 @@ export const licensingApi = baseApi
|
||||
// --------------------------------------------------------- inspection
|
||||
scheduleInspection: builder.mutation<
|
||||
Inspection,
|
||||
{ applicationId: string; scheduledDate: string; location?: string }
|
||||
{
|
||||
applicationId: string;
|
||||
scheduledDate: string;
|
||||
timeSlot: 'MORNING' | 'AFTERNOON';
|
||||
location?: string;
|
||||
}
|
||||
>({
|
||||
query: (body) => ({ url: '/inspections', method: 'POST', body }),
|
||||
invalidatesTags: (_r, error, { applicationId }) =>
|
||||
@@ -980,6 +995,7 @@ export const {
|
||||
useGetMyLicensesQuery,
|
||||
useGetLicensesQuery,
|
||||
useGetCertificateUrlMutation,
|
||||
useGetCertificateUrlForOfficerMutation,
|
||||
useGetApplicationPaymentQuery,
|
||||
usePatchSectionMutation,
|
||||
useAddStaffMutation,
|
||||
|
||||
@@ -443,6 +443,8 @@ export interface Inspection {
|
||||
inspectorId: string | null;
|
||||
inspectorName: string | null;
|
||||
scheduledDate: string | null;
|
||||
/** Half-day slot the site visit is booked into. */
|
||||
timeSlot: "MORNING" | "AFTERNOON" | null;
|
||||
conductedDate: string | null;
|
||||
location: string | null;
|
||||
status: "SCHEDULED" | "COMPLETED" | "CANCELLED";
|
||||
@@ -540,6 +542,13 @@ export type TemplateStatus = "DRAFT" | "PUBLISHED" | "ARCHIVED";
|
||||
|
||||
export interface TemplatePageOptions {
|
||||
format?: "A4" | "A5" | "Letter" | "Legal";
|
||||
/**
|
||||
* Explicit page dimensions (e.g. "4.92in"), for a size `format` has no
|
||||
* named preset for — an ID-3 passport-booklet page, for one. Takes
|
||||
* precedence over `format` when both are present.
|
||||
*/
|
||||
width?: string;
|
||||
height?: string;
|
||||
landscape?: boolean;
|
||||
printBackground?: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user