mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
19 lines
532 B
TypeScript
19 lines
532 B
TypeScript
import { Inject, Service } from 'typedi';
|
|
import { ExportResourceService } from './ExportService';
|
|
import { ExportFormat } from './common';
|
|
|
|
@Service()
|
|
export class ExportApplication {
|
|
@Inject()
|
|
private exportResource: ExportResourceService;
|
|
|
|
/**
|
|
* Exports the given resource to csv, xlsx or pdf format.
|
|
* @param {string} reosurce
|
|
* @param {ExportFormat} format
|
|
*/
|
|
public export(tenantId: number, resource: string, format: ExportFormat) {
|
|
return this.exportResource.export(tenantId, resource, format);
|
|
}
|
|
}
|