From 15a079c0e704071cd4b43a5ac1858f41e2cf10e8 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Mon, 28 Aug 2023 21:00:49 +0200 Subject: [PATCH] chore: remove un-used classes --- .../services/Cashflow/CommandCasflowValidator.ts | 11 +++-------- .../Cashflow/CommandCashflowTransaction.ts | 14 -------------- packages/server/src/services/Items/DeleteItem.ts | 4 ---- .../server/src/services/Items/ItemsCostService.ts | 5 ----- 4 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 packages/server/src/services/Cashflow/CommandCashflowTransaction.ts delete mode 100644 packages/server/src/services/Items/ItemsCostService.ts diff --git a/packages/server/src/services/Cashflow/CommandCasflowValidator.ts b/packages/server/src/services/Cashflow/CommandCasflowValidator.ts index 81c0aaffb..07722e50e 100644 --- a/packages/server/src/services/Cashflow/CommandCasflowValidator.ts +++ b/packages/server/src/services/Cashflow/CommandCasflowValidator.ts @@ -1,17 +1,12 @@ -import { Service, Inject } from 'typedi'; -import { includes, difference, camelCase, upperFirst } from 'lodash'; -import { ACCOUNT_TYPE } from '@/data/AccountTypes'; -import { IAccount, ICashflowTransactionLine } from '@/interfaces'; +import { Service } from 'typedi'; +import { includes, camelCase, upperFirst } from 'lodash'; +import { IAccount } from '@/interfaces'; import { getCashflowTransactionType } from './utils'; import { ServiceError } from '@/exceptions'; import { CASHFLOW_TRANSACTION_TYPE, ERRORS } from './constants'; -import HasTenancyService from '@/services/Tenancy/TenancyService'; @Service() export class CommandCashflowValidator { - @Inject() - private tenancy: HasTenancyService; - /** * Validates the lines accounts type should be cash or bank account. * @param {IAccount} accounts - diff --git a/packages/server/src/services/Cashflow/CommandCashflowTransaction.ts b/packages/server/src/services/Cashflow/CommandCashflowTransaction.ts deleted file mode 100644 index 9a562e404..000000000 --- a/packages/server/src/services/Cashflow/CommandCashflowTransaction.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { difference, includes } from 'lodash'; -import { ICashflowTransactionLine } from '@/interfaces'; -import { ServiceError } from '@/exceptions'; -import { Inject, Service } from 'typedi'; -import { CASHFLOW_TRANSACTION_TYPE, ERRORS } from './constants'; -import { IAccount } from '@/interfaces'; -import HasTenancyService from '@/services/Tenancy/TenancyService'; - -@Service() -export default class CommandCashflowTransaction { - @Inject() - private tenancy: HasTenancyService; - -} diff --git a/packages/server/src/services/Items/DeleteItem.ts b/packages/server/src/services/Items/DeleteItem.ts index dd27a80e5..900faca03 100644 --- a/packages/server/src/services/Items/DeleteItem.ts +++ b/packages/server/src/services/Items/DeleteItem.ts @@ -9,13 +9,9 @@ import HasTenancyService from '@/services/Tenancy/TenancyService'; import UnitOfWork from '@/services/UnitOfWork'; import events from '@/subscribers/events'; import { ERRORS } from './constants'; -import { ItemsValidators } from './ItemValidators'; @Service() export class DeleteItem { - @Inject() - private validators: ItemsValidators; - @Inject() private tenancy: HasTenancyService; diff --git a/packages/server/src/services/Items/ItemsCostService.ts b/packages/server/src/services/Items/ItemsCostService.ts deleted file mode 100644 index 6f028f808..000000000 --- a/packages/server/src/services/Items/ItemsCostService.ts +++ /dev/null @@ -1,5 +0,0 @@ - - -export default class ItemsCostService { - -} \ No newline at end of file