mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
refactor: split the services to multiple service classes (#202)
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import { Inject, Service } from 'typedi';
|
||||
import { map, head } from 'lodash';
|
||||
|
||||
import events from '@/subscribers/events';
|
||||
import TenancyService from '@/services/Tenancy/TenancyService';
|
||||
import SaleInvoicesCost from '@/services/Sales/SalesInvoicesCost';
|
||||
import InventoryItemsQuantitySync from '@/services/Inventory/InventoryItemsQuantitySync';
|
||||
import InventoryService from '@/services/Inventory/Inventory';
|
||||
import {
|
||||
@@ -12,23 +9,21 @@ import {
|
||||
IInventoryTransactionsDeletedPayload,
|
||||
} from '@/interfaces';
|
||||
import { runAfterTransaction } from '@/services/UnitOfWork/TransactionsHooks';
|
||||
import { SaleInvoicesCost } from '@/services/Sales/Invoices/SalesInvoicesCost';
|
||||
|
||||
@Service()
|
||||
export default class InventorySubscriber {
|
||||
@Inject()
|
||||
saleInvoicesCost: SaleInvoicesCost;
|
||||
private saleInvoicesCost: SaleInvoicesCost;
|
||||
|
||||
@Inject()
|
||||
tenancy: TenancyService;
|
||||
private itemsQuantitySync: InventoryItemsQuantitySync;
|
||||
|
||||
@Inject()
|
||||
itemsQuantitySync: InventoryItemsQuantitySync;
|
||||
|
||||
@Inject()
|
||||
inventoryService: InventoryService;
|
||||
private inventoryService: InventoryService;
|
||||
|
||||
@Inject('agenda')
|
||||
agenda: any;
|
||||
private agenda: any;
|
||||
|
||||
/**
|
||||
* Attaches events with handlers.
|
||||
|
||||
Reference in New Issue
Block a user