mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
refactor: financial reports to nestjs
This commit is contained in:
@@ -10,10 +10,7 @@ import {
|
||||
import { FinancialPreviousYear } from '../FinancialPreviousYear';
|
||||
|
||||
export const BalanceSheetComparsionPreviousYear = (Base: any) =>
|
||||
class
|
||||
extends R.compose(FinancialPreviousYear)(Base)
|
||||
implements IBalanceSheetComparsions
|
||||
{
|
||||
class extends R.compose(FinancialPreviousYear)(Base) {
|
||||
// ------------------------------
|
||||
// # Account
|
||||
// ------------------------------
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
import Container, { Service } from 'typedi';
|
||||
import { ImportDeleteExpiredFiles } from '../ImportRemoveExpiredFiles';
|
||||
// import Container, { Service } from 'typedi';
|
||||
// import { ImportDeleteExpiredFiles } from '../ImportRemoveExpiredFiles';
|
||||
|
||||
@Service()
|
||||
export class ImportDeleteExpiredFilesJobs {
|
||||
/**
|
||||
* Constructor method.
|
||||
*/
|
||||
constructor(agenda) {
|
||||
agenda.define('delete-expired-imported-files', this.handler);
|
||||
}
|
||||
// @Service()
|
||||
// export class ImportDeleteExpiredFilesJobs {
|
||||
// /**
|
||||
// * Constructor method.
|
||||
// */
|
||||
// constructor(agenda) {
|
||||
// agenda.define('delete-expired-imported-files', this.handler);
|
||||
// }
|
||||
|
||||
/**
|
||||
* Triggers sending invoice mail.
|
||||
*/
|
||||
private handler = async (job, done: Function) => {
|
||||
const importDeleteExpiredFiles = Container.get(ImportDeleteExpiredFiles);
|
||||
// /**
|
||||
// * Triggers sending invoice mail.
|
||||
// */
|
||||
// private handler = async (job, done: Function) => {
|
||||
// const importDeleteExpiredFiles = Container.get(ImportDeleteExpiredFiles);
|
||||
|
||||
try {
|
||||
console.log('Delete expired import files has started.');
|
||||
await importDeleteExpiredFiles.deleteExpiredFiles();
|
||||
done();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
done(error);
|
||||
}
|
||||
};
|
||||
}
|
||||
// try {
|
||||
// console.log('Delete expired import files has started.');
|
||||
// await importDeleteExpiredFiles.deleteExpiredFiles();
|
||||
// done();
|
||||
// } catch (error) {
|
||||
// console.log(error);
|
||||
// done(error);
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
|
||||
@@ -771,4 +771,5 @@ export default {
|
||||
onSalesByItemViewed: 'onSalesByItemViewed',
|
||||
onPurchasesByItemViewed: 'onPurchasesByItemViewed',
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ from 'lodash';
|
||||
import deepdash from 'deepdash';
|
||||
import * as _ from 'lodash';
|
||||
import * as deepdash from 'deepdash';
|
||||
|
||||
const {
|
||||
condense,
|
||||
@@ -24,7 +24,7 @@ const {
|
||||
reduceDeep,
|
||||
someDeep,
|
||||
iteratee,
|
||||
} = deepdash(_);
|
||||
} = deepdash.default(_);
|
||||
|
||||
const mapValuesDeepReverse = (nodes, callback, config?) => {
|
||||
const clonedNodes = _.clone(nodes);
|
||||
|
||||
Reference in New Issue
Block a user