fix: company logo of the template

This commit is contained in:
Ahmed Bouhuolia
2024-11-09 23:44:40 +02:00
parent 1f46275bde
commit a7b6b7a03e
2 changed files with 8 additions and 4 deletions

View File

@@ -48,6 +48,7 @@ export const useBrandingTemplateFormInitialValues = <
const brandingAttributes = {
templateName: pdfTemplate?.templateName,
companyLogoUri: pdfTemplate?.companyLogoUri,
...pdfTemplate?.attributes,
};
return {
@@ -56,14 +57,16 @@ export const useBrandingTemplateFormInitialValues = <
};
};
export const useBrandingState = (state?: Partial<BrandingState>): BrandingState => {
export const useBrandingState = (
state?: Partial<BrandingState>,
): BrandingState => {
const { brandingTemplateState } = useBrandingTemplateBoot();
return {
...brandingTemplateState,
...state
}
}
...state,
};
};
export const getCustomizeDrawerNameFromResource = (resource: string) => {
const pairs = {

View File

@@ -38,6 +38,7 @@ export interface GetPdfTemplateValues {}
export interface GetPdfTemplateResponse {
templateName: string;
companyLogoUri?: string | null;
attributes: Record<string, any>;
predefined: boolean;
default: boolean;