Skip to content

Commit

Permalink
fix: company logo of the template
Browse files Browse the repository at this point in the history
  • Loading branch information
abouolia committed Nov 9, 2024
1 parent 1f46275 commit a7b6b7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/webapp/src/containers/BrandingTemplates/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const useBrandingTemplateFormInitialValues = <

const brandingAttributes = {
templateName: pdfTemplate?.templateName,
companyLogoUri: pdfTemplate?.companyLogoUri,
...pdfTemplate?.attributes,
};
return {
Expand All @@ -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 = {
Expand Down
1 change: 1 addition & 0 deletions packages/webapp/src/hooks/query/pdf-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export interface GetPdfTemplateValues {}

export interface GetPdfTemplateResponse {
templateName: string;
companyLogoUri?: string | null;
attributes: Record<string, any>;
predefined: boolean;
default: boolean;
Expand Down

0 comments on commit a7b6b7a

Please sign in to comment.