mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
chore: clean pdf templates code
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Service, Inject } from 'typedi';
|
||||
import { Knex } from 'knex';
|
||||
import HasTenancyService from '../Tenancy/TenancyService';
|
||||
import UnitOfWork from '../UnitOfWork';
|
||||
import { Knex } from 'knex';
|
||||
import { EventPublisher } from '@/lib/EventPublisher/EventPublisher';
|
||||
import events from '@/subscribers/events';
|
||||
|
||||
@@ -16,6 +16,13 @@ export class AssignPdfTemplateDefault {
|
||||
@Inject()
|
||||
private eventPublisher: EventPublisher;
|
||||
|
||||
/**
|
||||
* Assigns a default PDF template for a specific tenant.
|
||||
* @param {number} tenantId - The ID of the tenant for whom the default template is being assigned.
|
||||
* @param {number} templateId - The ID of the template to be set as the default.
|
||||
* @returns {Promise<void>} A promise that resolves when the operation is complete.
|
||||
* @throws {Error} Throws ddan error if the specified template is not found.
|
||||
*/
|
||||
public async assignDefaultTemplate(tenantId: number, templateId: number) {
|
||||
const { PdfTemplate } = this.tenancy.models(tenantId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user