refactor: split the services to multiple service classes (#202)

This commit is contained in:
Ahmed Bouhuolia
2023-08-10 20:29:39 +02:00
committed by GitHub
parent ffef627dc3
commit 26c6ca9e36
150 changed files with 7188 additions and 5007 deletions

View File

@@ -1,7 +1,5 @@
import { Inject, Service } from 'typedi';
import events from '@/subscribers/events';
import TenancyService from '@/services/Tenancy/TenancyService';
import BillsService from '@/services/Purchases/Bills';
import {
IBillCreatedPayload,
IBillEditedPayload,
@@ -12,15 +10,12 @@ import { BillGLEntries } from './BillGLEntries';
@Service()
export class BillGLEntriesSubscriber {
@Inject()
tenancy: TenancyService;
@Inject()
billGLEntries: BillGLEntries;
private billGLEntries: BillGLEntries;
/**
* Attachs events with handles.
*/
attach(bus) {
public attach(bus) {
bus.subscribe(
events.bill.onCreated,
this.handlerWriteJournalEntriesOnCreate