mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix: pdf template customization
This commit is contained in:
@@ -36,7 +36,7 @@ export class CreatePdfTemplate {
|
||||
tenantId,
|
||||
});
|
||||
|
||||
await PdfTemplate.query(trx).insert({
|
||||
const pdfTemplate = await PdfTemplate.query(trx).insert({
|
||||
templateName,
|
||||
resource,
|
||||
attributes,
|
||||
@@ -45,6 +45,7 @@ export class CreatePdfTemplate {
|
||||
await this.eventPublisher.emitAsync(events.pdfTemplate.onCreated, {
|
||||
tenantId,
|
||||
});
|
||||
return pdfTemplate;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Inject, Service } from 'typedi';
|
||||
import { ICreateInvoicePdfTemplateDTO } from './types';
|
||||
import { ICreateInvoicePdfTemplateDTO, IEditPdfTemplateDTO } from './types';
|
||||
import { CreatePdfTemplate } from './CreatePdfTemplate';
|
||||
import { DeletePdfTemplate } from './DeletePdfTemplate';
|
||||
import { GetPdfTemplate } from './GetPdfTemplate';
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
export enum ERRORS {
|
||||
CANNOT_DELETE_PREDEFINED_PDF_TEMPLATE = 'CANNOT_DELETE_PREDEFINED_PDF_TEMPLATE',
|
||||
}
|
||||
|
||||
export interface IEditPdfTemplateDTO {
|
||||
templateName: string;
|
||||
attributes: Record<string, any>;
|
||||
}
|
||||
|
||||
export interface ICreateInvoicePdfTemplateDTO {
|
||||
// Colors
|
||||
primaryColor?: string;
|
||||
|
||||
Reference in New Issue
Block a user