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 = { const brandingAttributes = {
templateName: pdfTemplate?.templateName, templateName: pdfTemplate?.templateName,
companyLogoUri: pdfTemplate?.companyLogoUri,
...pdfTemplate?.attributes, ...pdfTemplate?.attributes,
}; };
return { 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(); const { brandingTemplateState } = useBrandingTemplateBoot();
return { return {
...brandingTemplateState, ...brandingTemplateState,
...state ...state,
} };
} };
export const getCustomizeDrawerNameFromResource = (resource: string) => { export const getCustomizeDrawerNameFromResource = (resource: string) => {
const pairs = { const pairs = {

View File

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