feat: import customers/vendors

This commit is contained in:
Ahmed Bouhuolia
2024-03-28 00:05:02 +02:00
parent fc1d123c6b
commit 7a3e121942
12 changed files with 437 additions and 48 deletions

View File

@@ -3,6 +3,7 @@ import { Importable } from '@/services/Import/Importable';
import { CreateCustomer } from './CRUD/CreateCustomer';
import { Knex } from 'knex';
import { ICustomer, ICustomerNewDTO } from '@/interfaces';
import { CustomersSampleData } from './_SampleData';
@Service()
export class CustomersImportable extends Importable {
@@ -23,4 +24,11 @@ export class CustomersImportable extends Importable {
): Promise<void> {
await this.createCustomerService.createCustomer(tenantId, createDTO, trx);
}
/**
* Retrieves the sample data of customers used to download sample sheet.
*/
public sampleData(): any[] {
return CustomersSampleData;
}
}