mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: Pdf templates customer/company addresses
This commit is contained in:
@@ -203,3 +203,28 @@ export const useAssignPdfTemplateAsDefault = (
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
// Retrieve organization branding state.
|
||||
// --------------------------------------------------
|
||||
export interface GetPdfTemplateBrandingStateResponse {
|
||||
companyName: string;
|
||||
companyAddress: string;
|
||||
companyLogoUri: string;
|
||||
companyLogoKey: string;
|
||||
primaryColor: string;
|
||||
}
|
||||
|
||||
export const useGetPdfTemplateBrandingState = (
|
||||
options?: UseQueryOptions<GetPdfTemplateBrandingStateResponse, Error>,
|
||||
): UseQueryResult<GetPdfTemplateBrandingStateResponse, Error> => {
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useQuery<GetPdfTemplateBrandingStateResponse, Error>(
|
||||
[PdfTemplatesQueryKey, 'state'],
|
||||
() =>
|
||||
apiRequest
|
||||
.get('/pdf-templates/state')
|
||||
.then((res) => transformToCamelCase(res.data?.data)),
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user