mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
refactor(nestjs): exportable modules
This commit is contained in:
@@ -1,45 +1,45 @@
|
||||
// import { Inject, Service } from 'typedi';
|
||||
// import { Knex } from 'knex';
|
||||
// import { ISaleEstimateDTO } from '@/interfaces';
|
||||
// import { CreateSaleEstimate } from './commands/CreateSaleEstimate.service';
|
||||
// import { Importable } from '@/services/Import/Importable';
|
||||
// import { SaleEstimatesSampleData } from './constants';
|
||||
import { Knex } from 'knex';
|
||||
import { CreateSaleEstimate } from './commands/CreateSaleEstimate.service';
|
||||
import { SaleEstimatesSampleData } from './constants';
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CreateSaleEstimateDto } from './dtos/SaleEstimate.dto';
|
||||
import { Importable } from '../Import/Importable';
|
||||
|
||||
// @Service()
|
||||
// export class SaleEstimatesImportable extends Importable {
|
||||
// @Inject()
|
||||
// private createEstimateService: CreateSaleEstimate;
|
||||
@Injectable()
|
||||
export class SaleEstimatesImportable extends Importable{
|
||||
constructor(
|
||||
private readonly createEstimateService: CreateSaleEstimate
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Importing to account service.
|
||||
// * @param {number} tenantId
|
||||
// * @param {IAccountCreateDTO} createAccountDTO
|
||||
// * @returns
|
||||
// */
|
||||
// public importable(
|
||||
// tenantId: number,
|
||||
// createEstimateDTO: ISaleEstimateDTO,
|
||||
// trx?: Knex.Transaction
|
||||
// ) {
|
||||
// return this.createEstimateService.createEstimate(
|
||||
// tenantId,
|
||||
// createEstimateDTO,
|
||||
// trx
|
||||
// );
|
||||
// }
|
||||
/**
|
||||
* Importing to account service.
|
||||
* @param {CreateSaleEstimateDto} createAccountDTO
|
||||
* @returns
|
||||
*/
|
||||
public importable(
|
||||
createEstimateDTO: CreateSaleEstimateDto,
|
||||
trx?: Knex.Transaction
|
||||
) {
|
||||
return this.createEstimateService.createEstimate(
|
||||
createEstimateDTO,
|
||||
trx
|
||||
);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Concurrrency controlling of the importing process.
|
||||
// * @returns {number}
|
||||
// */
|
||||
// public get concurrency() {
|
||||
// return 1;
|
||||
// }
|
||||
/**
|
||||
* Concurrrency controlling of the importing process.
|
||||
* @returns {number}
|
||||
*/
|
||||
public get concurrency() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Retrieves the sample data that used to download accounts sample sheet.
|
||||
// */
|
||||
// public sampleData(): any[] {
|
||||
// return SaleEstimatesSampleData;
|
||||
// }
|
||||
// }
|
||||
/**
|
||||
* Retrieves the sample data that used to download accounts sample sheet.
|
||||
*/
|
||||
public sampleData(): any[] {
|
||||
return SaleEstimatesSampleData;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user