feat: export resource data to csv, xlsx

This commit is contained in:
Ahmed Bouhuolia
2024-04-29 23:45:11 +02:00
parent 4a713980bf
commit 8a96c41258
9 changed files with 345 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import { Inject, Service } from 'typedi';
import { ExportResourceService } from './ExportService';
@Service()
export class ExportApplication {
@Inject()
private exportResource: ExportResourceService;
/**
* Exports the given resource to csv, xlsx or pdf format.
* @param {string} reosurce
* @param {string} format
*/
public export(tenantId: number, resource: string, format: string) {
return this.exportResource.export(tenantId, resource, format);
}
}