diff --git a/packages/server-nest/src/modules/Accounts/Accounts.controller.ts b/packages/server-nest/src/modules/Accounts/Accounts.controller.ts index 505fffc76..2d1e7ca4e 100644 --- a/packages/server-nest/src/modules/Accounts/Accounts.controller.ts +++ b/packages/server-nest/src/modules/Accounts/Accounts.controller.ts @@ -24,6 +24,7 @@ export class AccountsController { constructor(private readonly accountsApplication: AccountsApplication) {} @Post() + @ApiOperation({ summary: 'Create an account' }) async createAccount(@Body() accountDTO: CreateAccountDTO) { return this.accountsApplication.createAccount(accountDTO); } diff --git a/packages/server-nest/src/modules/BankingAccounts/BankAccounts.module.ts b/packages/server-nest/src/modules/BankingAccounts/BankAccounts.module.ts index 3e9face3e..df8c601af 100644 --- a/packages/server-nest/src/modules/BankingAccounts/BankAccounts.module.ts +++ b/packages/server-nest/src/modules/BankingAccounts/BankAccounts.module.ts @@ -10,9 +10,17 @@ import { BankAccountsController } from './BankAccounts.controller'; import { BankingPlaidModule } from '../BankingPlaid/BankingPlaid.module'; import { PlaidModule } from '../Plaid/Plaid.module'; import { BankRulesModule } from '../BankRules/BankRules.module'; +import { BankingTransactionsRegonizeModule } from '../BankingTranasctionsRegonize/BankingTransactionsRegonize.module'; +import { BankingTransactionsModule } from '../BankingTransactions/BankingTransactions.module'; @Module({ - imports: [BankingPlaidModule, PlaidModule, BankRulesModule], + imports: [ + BankingPlaidModule, + PlaidModule, + BankRulesModule, + BankingTransactionsRegonizeModule, + BankingTransactionsModule, + ], providers: [ DisconnectBankAccountService, RefreshBankAccountService, @@ -20,7 +28,7 @@ import { BankRulesModule } from '../BankRules/BankRules.module'; PauseBankAccountFeeds, DeleteUncategorizedTransactionsOnAccountDeleting, DisconnectPlaidItemOnAccountDeleted, - BankAccountsApplication + BankAccountsApplication, ], exports: [BankAccountsApplication], controllers: [BankAccountsController], diff --git a/packages/server-nest/src/modules/BankingTransactions/queries/GetBankAccounts.service.ts b/packages/server-nest/src/modules/BankingTransactions/queries/GetBankAccounts.service.ts index f1094f0fd..ec1adcd6b 100644 --- a/packages/server-nest/src/modules/BankingTransactions/queries/GetBankAccounts.service.ts +++ b/packages/server-nest/src/modules/BankingTransactions/queries/GetBankAccounts.service.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { Injectable, Inject } from '@nestjs/common'; import { BankAccount } from '../models/BankAccount'; import { DynamicListService } from '@/modules/DynamicListing/DynamicList.service'; diff --git a/packages/server-nest/src/modules/Bills/commands/BillInventoryTransactions.ts b/packages/server-nest/src/modules/Bills/commands/BillInventoryTransactions.ts index a4c621f12..1c670642f 100644 --- a/packages/server-nest/src/modules/Bills/commands/BillInventoryTransactions.ts +++ b/packages/server-nest/src/modules/Bills/commands/BillInventoryTransactions.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { Knex } from 'knex'; import { Bill } from '../models/Bill'; import { Inject, Injectable } from '@nestjs/common'; diff --git a/packages/server-nest/src/modules/CreditNotes/CreditNotes.module.ts b/packages/server-nest/src/modules/CreditNotes/CreditNotes.module.ts index f6789bc19..0a1e5bafb 100644 --- a/packages/server-nest/src/modules/CreditNotes/CreditNotes.module.ts +++ b/packages/server-nest/src/modules/CreditNotes/CreditNotes.module.ts @@ -22,6 +22,8 @@ import { CreditNoteGLEntries } from './commands/CreditNoteGLEntries'; import { CreditNoteGLEntriesSubscriber } from './subscribers/CreditNoteGLEntriesSubscriber'; import { LedgerModule } from '../Ledger/Ledger.module'; import { AccountsModule } from '../Accounts/Accounts.module'; +import { GetCreditNotesService } from './queries/GetCreditNotes.service'; +import { DynamicListModule } from '../DynamicListing/DynamicList.module'; @Module({ imports: [ @@ -33,7 +35,8 @@ import { AccountsModule } from '../Accounts/Accounts.module'; TemplateInjectableModule, AutoIncrementOrdersModule, LedgerModule, - AccountsModule + AccountsModule, + DynamicListModule ], providers: [ CreateCreditNoteService, @@ -43,6 +46,7 @@ import { AccountsModule } from '../Accounts/Accounts.module'; OpenCreditNoteService, DeleteCreditNoteService, GetCreditNotePdf, + GetCreditNotesService, CreditNoteAutoIncrementService, GetCreditNoteState, CreditNoteApplication, diff --git a/packages/server-nest/src/modules/CreditNotes/commands/CreditNotesInventoryTransactions.ts b/packages/server-nest/src/modules/CreditNotes/commands/CreditNotesInventoryTransactions.ts index fb6c3be2c..95a1fc758 100644 --- a/packages/server-nest/src/modules/CreditNotes/commands/CreditNotesInventoryTransactions.ts +++ b/packages/server-nest/src/modules/CreditNotes/commands/CreditNotesInventoryTransactions.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { Injectable } from '@nestjs/common'; import { InventoryTransactionsService } from '@/modules/InventoryCost/InventoryTransactions.service'; import { ItemsEntriesService } from '@/modules/Items/ItemsEntries.service'; diff --git a/packages/server-nest/src/modules/DynamicListing/DynamicFilter/DynamicFilterAbstractor.ts b/packages/server-nest/src/modules/DynamicListing/DynamicFilter/DynamicFilterAbstractor.ts index 35da303be..296af1868 100644 --- a/packages/server-nest/src/modules/DynamicListing/DynamicFilter/DynamicFilterAbstractor.ts +++ b/packages/server-nest/src/modules/DynamicListing/DynamicFilter/DynamicFilterAbstractor.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { IDynamicFilter } from './DynamicFilter.types'; import { MetableModel } from '../types/DynamicList.types'; diff --git a/packages/server-nest/src/modules/DynamicListing/DynamicFilter/DynamicFilterRoleAbstractor.ts b/packages/server-nest/src/modules/DynamicListing/DynamicFilter/DynamicFilterRoleAbstractor.ts index 66509d298..47453caa3 100644 --- a/packages/server-nest/src/modules/DynamicListing/DynamicFilter/DynamicFilterRoleAbstractor.ts +++ b/packages/server-nest/src/modules/DynamicListing/DynamicFilter/DynamicFilterRoleAbstractor.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import moment from 'moment'; import * as R from 'ramda'; import { IFilterRole, IDynamicFilter } from './DynamicFilter.types'; diff --git a/packages/server-nest/src/modules/InventoryAdjutments/InventoryAdjustments.module.ts b/packages/server-nest/src/modules/InventoryAdjutments/InventoryAdjustments.module.ts index 057b3341c..3b0605992 100644 --- a/packages/server-nest/src/modules/InventoryAdjutments/InventoryAdjustments.module.ts +++ b/packages/server-nest/src/modules/InventoryAdjutments/InventoryAdjustments.module.ts @@ -18,13 +18,20 @@ import { InventoryAdjustmentInventoryTransactions } from './inventory/InventoryA import { DynamicListModule } from '../DynamicListing/DynamicList.module'; import { LedgerModule } from '../Ledger/Ledger.module'; import { TenancyContext } from '../Tenancy/TenancyContext.service'; +import { InventoryCostModule } from '../InventoryCost/InventoryCost.module'; const models = [ RegisterTenancyModel(InventoryAdjustment), RegisterTenancyModel(InventoryAdjustmentEntry), ]; @Module({ - imports: [BranchesModule, WarehousesModule, LedgerModule, DynamicListModule], + imports: [ + BranchesModule, + WarehousesModule, + LedgerModule, + DynamicListModule, + InventoryCostModule, + ], controllers: [InventoryAdjustmentsController], providers: [ ...models, @@ -38,7 +45,7 @@ const models = [ InventoryAdjustmentsGLEntries, TenancyContext, InventoryAdjustmentInventoryTransactionsSubscriber, - InventoryAdjustmentInventoryTransactions + InventoryAdjustmentInventoryTransactions, ], exports: [...models], }) diff --git a/packages/server-nest/src/modules/InventoryCost/InventoryCost.module.ts b/packages/server-nest/src/modules/InventoryCost/InventoryCost.module.ts index 956529597..07700195e 100644 --- a/packages/server-nest/src/modules/InventoryCost/InventoryCost.module.ts +++ b/packages/server-nest/src/modules/InventoryCost/InventoryCost.module.ts @@ -22,8 +22,8 @@ const models = [ InventoryCostGLStorage, InventoryItemsQuantitySyncService, InventoryCostMethod, - InventoryTransactionsService + InventoryTransactionsService, ], - exports: [...models], + exports: [...models, InventoryTransactionsService], }) export class InventoryCostModule {} diff --git a/packages/server-nest/src/modules/InventoryCost/InventoryTransactions.service.ts b/packages/server-nest/src/modules/InventoryCost/InventoryTransactions.service.ts index 4bff64639..82357b66c 100644 --- a/packages/server-nest/src/modules/InventoryCost/InventoryTransactions.service.ts +++ b/packages/server-nest/src/modules/InventoryCost/InventoryTransactions.service.ts @@ -1,14 +1,18 @@ -import { IInventoryTransactionsDeletedPayload, TInventoryTransactionDirection } from './types/InventoryCost.types'; +// @ts-nocheck +import { Knex } from 'knex'; +import { Inject } from '@nestjs/common'; import { EventEmitter2 } from '@nestjs/event-emitter'; +import { + IInventoryTransactionsDeletedPayload, + TInventoryTransactionDirection, +} from './types/InventoryCost.types'; import { InventoryCostLotTracker } from './models/InventoryCostLotTracker'; import { InventoryTransaction } from './models/InventoryTransaction'; -import { Knex } from 'knex'; import { events } from '@/common/events/events'; import { IInventoryTransactionsCreatedPayload } from './types/InventoryCost.types'; -import { transformItemEntriesToInventory } from "./utils"; +import { transformItemEntriesToInventory } from './utils'; import { IItemEntryTransactionType } from '../TransactionItemEntry/ItemEntry.types'; import { ItemEntry } from '../TransactionItemEntry/models/ItemEntry'; -import { Inject } from '@nestjs/common'; export class InventoryTransactionsService { constructor( diff --git a/packages/server-nest/src/modules/InventoryCost/utils.ts b/packages/server-nest/src/modules/InventoryCost/utils.ts index 156ac55aa..530820fc0 100644 --- a/packages/server-nest/src/modules/InventoryCost/utils.ts +++ b/packages/server-nest/src/modules/InventoryCost/utils.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { chain } from 'lodash'; import { pick } from 'lodash'; import { IItemEntryTransactionType } from '../TransactionItemEntry/ItemEntry.types'; diff --git a/packages/server-nest/src/modules/PaymentReceived/PaymentsReceived.module.ts b/packages/server-nest/src/modules/PaymentReceived/PaymentsReceived.module.ts index 4a2f8a1cb..80214e128 100644 --- a/packages/server-nest/src/modules/PaymentReceived/PaymentsReceived.module.ts +++ b/packages/server-nest/src/modules/PaymentReceived/PaymentsReceived.module.ts @@ -27,9 +27,13 @@ import { PaymentReceivedInvoiceSync } from './commands/PaymentReceivedInvoiceSyn import { LedgerModule } from '../Ledger/Ledger.module'; import { AccountsModule } from '../Accounts/Accounts.module'; import { SendPaymentReceiveMailNotification } from './commands/PaymentReceivedMailNotification'; +import { GetPaymentsReceivedService } from './queries/GetPaymentsReceived.service'; +import { MailNotificationModule } from '../MailNotification/MailNotification.module'; +import { DynamicListModule } from '../DynamicListing/DynamicList.module'; +import { MailModule } from '../Mail/Mail.module'; @Module({ - controllers: [PaymentReceivesController], + controllers: [PaymentReceivesController,], providers: [ PaymentReceivesApplication, CreatePaymentReceivedService, @@ -49,7 +53,8 @@ import { SendPaymentReceiveMailNotification } from './commands/PaymentReceivedMa PaymentReceivedAutoIncrementSubscriber, PaymentReceivedGLEntriesSubscriber, PaymentReceivedSyncInvoicesSubscriber, - SendPaymentReceiveMailNotification + SendPaymentReceiveMailNotification, + GetPaymentsReceivedService ], exports: [PaymentReceivesApplication, CreatePaymentReceivedService], imports: [ @@ -60,7 +65,10 @@ import { SendPaymentReceiveMailNotification } from './commands/PaymentReceivedMa PdfTemplatesModule, AutoIncrementOrdersModule, LedgerModule, - AccountsModule + AccountsModule, + MailNotificationModule, + DynamicListModule, + MailModule ], }) export class PaymentsReceivedModule {} diff --git a/packages/server-nest/src/modules/PaymentReceived/queries/GetPaymentsReceived.service.ts b/packages/server-nest/src/modules/PaymentReceived/queries/GetPaymentsReceived.service.ts index 5297e1ee0..ebf1b4d97 100644 --- a/packages/server-nest/src/modules/PaymentReceived/queries/GetPaymentsReceived.service.ts +++ b/packages/server-nest/src/modules/PaymentReceived/queries/GetPaymentsReceived.service.ts @@ -41,7 +41,7 @@ export class GetPaymentsReceivedService { builder.withGraphFetched('depositAccount'); dynamicList.buildQuery()(builder); - filterDTO?.filterQuery && filterDTO.filterQuery(builder); + filterDTO?.filterQuery && filterDTO.filterQuery(builder as any); }) .pagination(filter.page - 1, filter.pageSize); diff --git a/packages/server-nest/src/modules/SaleEstimates/SaleEstimates.module.ts b/packages/server-nest/src/modules/SaleEstimates/SaleEstimates.module.ts index b5de377fb..aa112aab9 100644 --- a/packages/server-nest/src/modules/SaleEstimates/SaleEstimates.module.ts +++ b/packages/server-nest/src/modules/SaleEstimates/SaleEstimates.module.ts @@ -31,6 +31,8 @@ import { MailNotificationModule } from '../MailNotification/MailNotification.mod import { MailModule } from '../Mail/Mail.module'; import { ChromiumlyTenancyModule } from '../ChromiumlyTenancy/ChromiumlyTenancy.module'; import { TemplateInjectableModule } from '../TemplateInjectable/TemplateInjectable.module'; +import { SaleEstimatePdfTemplate } from '../SaleInvoices/queries/SaleEstimatePdfTemplate.service'; +import { PdfTemplatesModule } from '../PdfTemplate/PdfTemplates.module'; // import { SaleEstimateNotifyBySms } from './commands/SaleEstimateSmsNotify'; @Module({ @@ -40,7 +42,8 @@ import { TemplateInjectableModule } from '../TemplateInjectable/TemplateInjectab MailNotificationModule, MailModule, ChromiumlyTenancyModule, - TemplateInjectableModule + TemplateInjectableModule, + PdfTemplatesModule ], controllers: [SaleEstimatesController], providers: [ @@ -69,6 +72,7 @@ import { TemplateInjectableModule } from '../TemplateInjectable/TemplateInjectab SaleEstimatesApplication, SendSaleEstimateMail, GetSaleEstimatePdf, + SaleEstimatePdfTemplate // SaleEstimateNotifyBySms, ], }) diff --git a/packages/server-nest/src/modules/SaleInvoices/SaleInvoices.module.ts b/packages/server-nest/src/modules/SaleInvoices/SaleInvoices.module.ts index e39569ceb..372a7775d 100644 --- a/packages/server-nest/src/modules/SaleInvoices/SaleInvoices.module.ts +++ b/packages/server-nest/src/modules/SaleInvoices/SaleInvoices.module.ts @@ -33,11 +33,17 @@ import { InvoiceGLEntriesSubscriber } from './subscribers/InvoiceGLEntriesSubscr import { SaleInvoiceGLEntries } from './ledger/InvoiceGLEntries'; import { LedgerModule } from '../Ledger/Ledger.module'; import { AccountsModule } from '../Accounts/Accounts.module'; -import SaleInvoiceWriteoffSubscriber from './subscribers/SaleInvoiceWriteoffSubscriber'; +import { SaleInvoiceWriteoffSubscriber } from './subscribers/SaleInvoiceWriteoffSubscriber'; import { SaleInvoiceWriteoffGLStorage } from './commands/writeoff/SaleInvoiceWriteoffGLStorage'; import { InvoiceInventoryTransactions } from './commands/inventory/InvoiceInventoryTransactions'; -import { SendSaleEstimateMail } from '../SaleEstimates/commands/SendSaleEstimateMail'; import { MailModule } from '../Mail/Mail.module'; +import { GetSaleInvoicesService } from './queries/GetSaleInvoices'; +import { SendSaleInvoiceMail } from './commands/SendSaleInvoiceMail'; +import { GetSaleInvoiceMailState } from './queries/GetSaleInvoiceMailState.service'; +import { InventoryCostModule } from '../InventoryCost/InventoryCost.module'; +import { SendSaleInvoiceMailCommon } from './commands/SendInvoiceInvoiceMailCommon.service'; +import { DynamicListModule } from '../DynamicListing/DynamicList.module'; +import { MailNotificationModule } from '../MailNotification/MailNotification.module'; @Module({ imports: [ @@ -51,6 +57,9 @@ import { MailModule } from '../Mail/Mail.module'; LedgerModule, AccountsModule, MailModule, + MailNotificationModule, + InventoryCostModule, + DynamicListModule ], controllers: [SaleInvoicesController], providers: [ @@ -82,7 +91,10 @@ import { MailModule } from '../Mail/Mail.module'; SaleInvoiceWriteoffGLStorage, SaleInvoiceWriteoffSubscriber, InvoiceInventoryTransactions, - SendSaleEstimateMail, + SendSaleInvoiceMail, + GetSaleInvoicesService, + GetSaleInvoiceMailState, + SendSaleInvoiceMailCommon ], }) export class SaleInvoicesModule {} diff --git a/packages/server-nest/src/modules/SaleInvoices/commands/inventory/InvoiceInventoryTransactions.ts b/packages/server-nest/src/modules/SaleInvoices/commands/inventory/InvoiceInventoryTransactions.ts index b322fb477..05b71669e 100644 --- a/packages/server-nest/src/modules/SaleInvoices/commands/inventory/InvoiceInventoryTransactions.ts +++ b/packages/server-nest/src/modules/SaleInvoices/commands/inventory/InvoiceInventoryTransactions.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { InventoryTransactionsService } from '@/modules/InventoryCost/InventoryTransactions.service'; import { ItemsEntriesService } from '@/modules/Items/ItemsEntries.service'; import { Injectable } from '@nestjs/common'; diff --git a/packages/server-nest/src/modules/SaleInvoices/subscribers/SaleInvoiceWriteoffSubscriber.ts b/packages/server-nest/src/modules/SaleInvoices/subscribers/SaleInvoiceWriteoffSubscriber.ts index ee48546f6..290b89be5 100644 --- a/packages/server-nest/src/modules/SaleInvoices/subscribers/SaleInvoiceWriteoffSubscriber.ts +++ b/packages/server-nest/src/modules/SaleInvoices/subscribers/SaleInvoiceWriteoffSubscriber.ts @@ -8,7 +8,7 @@ import { SaleInvoiceWriteoffGLStorage } from '../commands/writeoff/SaleInvoiceWr import { events } from '@/common/events/events'; @Injectable() -export default class SaleInvoiceWriteoffSubscriber { +export class SaleInvoiceWriteoffSubscriber { constructor(private readonly writeGLStorage: SaleInvoiceWriteoffGLStorage) {} /** diff --git a/packages/server-nest/src/modules/SaleReceipts/SaleReceipts.module.ts b/packages/server-nest/src/modules/SaleReceipts/SaleReceipts.module.ts index df8a10123..60f9242ad 100644 --- a/packages/server-nest/src/modules/SaleReceipts/SaleReceipts.module.ts +++ b/packages/server-nest/src/modules/SaleReceipts/SaleReceipts.module.ts @@ -27,6 +27,11 @@ import { AccountsModule } from '../Accounts/Accounts.module'; import { SaleReceiptInventoryTransactionsSubscriber } from './inventory/SaleReceiptWriteInventoryTransactions'; import { GetSaleReceiptsService } from './queries/GetSaleReceipts.service'; import { SaleReceiptMailNotification } from './commands/SaleReceiptMailNotification'; +import { SaleReceiptInventoryTransactions } from './inventory/SaleReceiptInventoryTransactions'; +import { InventoryCostModule } from '../InventoryCost/InventoryCost.module'; +import { DynamicListModule } from '../DynamicListing/DynamicList.module'; +import { MailModule } from '../Mail/Mail.module'; +import { MailNotificationModule } from '../MailNotification/MailNotification.module'; @Module({ controllers: [SaleReceiptsController], @@ -39,7 +44,11 @@ import { SaleReceiptMailNotification } from './commands/SaleReceiptMailNotificat PdfTemplatesModule, AutoIncrementOrdersModule, LedgerModule, - AccountsModule + AccountsModule, + InventoryCostModule, + DynamicListModule, + MailModule, + MailNotificationModule ], providers: [ TenancyContext, @@ -57,9 +66,10 @@ import { SaleReceiptMailNotification } from './commands/SaleReceiptMailNotificat SaleReceiptIncrement, SaleReceiptGLEntries, SaleReceiptGLEntriesSubscriber, - SaleReceiptInventoryTransactionsSubscriber, GetSaleReceiptsService, - SaleReceiptMailNotification + SaleReceiptMailNotification, + SaleReceiptInventoryTransactions, + SaleReceiptInventoryTransactionsSubscriber, ], }) export class SaleReceiptsModule {} diff --git a/packages/server-nest/src/modules/SaleReceipts/inventory/SaleReceiptInventoryTransactions.ts b/packages/server-nest/src/modules/SaleReceipts/inventory/SaleReceiptInventoryTransactions.ts index 64cb2546f..c7fe01871 100644 --- a/packages/server-nest/src/modules/SaleReceipts/inventory/SaleReceiptInventoryTransactions.ts +++ b/packages/server-nest/src/modules/SaleReceipts/inventory/SaleReceiptInventoryTransactions.ts @@ -1,14 +1,15 @@ +// @ts-nocheck import { Injectable } from '@nestjs/common'; import { Knex } from 'knex'; -import { InventoryService } from '@/modules/InventoryCost/Inventory'; -import { ItemsEntriesService } from '@/modules/Items/ItemsEntries.service'; import { SaleReceipt } from '../models/SaleReceipt'; +import { InventoryTransactionsService } from '@/modules/InventoryCost/InventoryTransactions.service'; +import { ItemsEntriesService } from '@/modules/Items/ItemsEntries.service'; @Injectable() export class SaleReceiptInventoryTransactions { constructor( private readonly itemsEntriesService: ItemsEntriesService, - private readonly inventoryService: InventoryService, + private readonly inventoryService: InventoryTransactionsService, ) {} /** diff --git a/packages/server-nest/src/modules/TransactionsLocking/TransactionsLocking.controller.ts b/packages/server-nest/src/modules/TransactionsLocking/TransactionsLocking.controller.ts index e99db4cad..40a55cdda 100644 --- a/packages/server-nest/src/modules/TransactionsLocking/TransactionsLocking.controller.ts +++ b/packages/server-nest/src/modules/TransactionsLocking/TransactionsLocking.controller.ts @@ -6,8 +6,11 @@ import { ICancelTransactionsLockingDTO } from './types/TransactionsLocking.types import { ITransactionLockingPartiallyDTO } from './types/TransactionsLocking.types'; import { QueryTransactionsLocking } from './queries/QueryTransactionsLocking'; import { PublicRoute } from '../Auth/Jwt.guard'; +import { ApiOperation } from '@nestjs/swagger'; +import { ApiTags } from '@nestjs/swagger'; @Controller('transactions-locking') +@ApiTags('Transactions Locking') @PublicRoute() export class TransactionsLockingController { constructor( @@ -16,6 +19,7 @@ export class TransactionsLockingController { ) {} @Put('lock') + @ApiOperation({ summary: 'Lock all transactions for a module or all modules' }) async commandTransactionsLocking( @Body('module') module: TransactionsLockingGroup, @Body() transactionLockingDTO: ITransactionsLockingAllDTO, @@ -32,6 +36,7 @@ export class TransactionsLockingController { } @Put('cancel-lock') + @ApiOperation({ summary: 'Cancel all transactions locking for a module or all modules' }) async cancelTransactionLocking( @Body('module') module: TransactionsLockingGroup, @Body() cancelLockingDTO: ICancelTransactionsLockingDTO, @@ -47,6 +52,7 @@ export class TransactionsLockingController { } @Put('unlock-partial') + @ApiOperation({ summary: 'Partial unlock all transactions locking for a module or all modules' }) async unlockTransactionsLockingBetweenPeriod( @Body('module') module: TransactionsLockingGroup, @Body() unlockDTO: ITransactionLockingPartiallyDTO, @@ -63,6 +69,7 @@ export class TransactionsLockingController { } @Put('cancel-unlock-partial') + @ApiOperation({ summary: 'Cancel partial unlocking all transactions locking for a module or all modules' }) async cancelPartialUnlocking( @Body('module') module: TransactionsLockingGroup, ) { @@ -77,11 +84,13 @@ export class TransactionsLockingController { } @Get('/') + @ApiOperation({ summary: 'Get all transactions locking meta' }) async getTransactionLockingMetaList() { return await this.queryTransactionsLocking.getTransactionsLockingAll(); } @Get(':module') + @ApiOperation({ summary: 'Get transactions locking meta for a module' }) async getTransactionLockingMeta(@Param('module') module: string) { return await this.queryTransactionsLocking.getTransactionsLockingModuleMeta( module as TransactionsLockingGroup, diff --git a/packages/server-nest/src/modules/VendorCredit/VendorCredits.module.ts b/packages/server-nest/src/modules/VendorCredit/VendorCredits.module.ts index 6434bcdc7..d7d81c3ec 100644 --- a/packages/server-nest/src/modules/VendorCredit/VendorCredits.module.ts +++ b/packages/server-nest/src/modules/VendorCredit/VendorCredits.module.ts @@ -23,6 +23,8 @@ import { AccountsModule } from '../Accounts/Accounts.module'; import VendorCreditInventoryTransactionsSubscriber from './subscribers/VendorCreditInventoryTransactionsSusbcriber'; import { VendorCreditInventoryTransactions } from './commands/VendorCreditInventoryTransactions'; import { GetVendorCreditsService } from './queries/GetVendorCredits.service'; +import { DynamicListModule } from '../DynamicListing/DynamicList.module'; +import { InventoryCostModule } from '../InventoryCost/InventoryCost.module'; @Module({ imports: [ @@ -34,7 +36,9 @@ import { GetVendorCreditsService } from './queries/GetVendorCredits.service'; BranchesModule, WarehousesModule, LedgerModule, - AccountsModule + AccountsModule, + DynamicListModule, + InventoryCostModule ], providers: [ CreateVendorCreditService, diff --git a/packages/server-nest/src/modules/VendorCredit/commands/VendorCreditInventoryTransactions.ts b/packages/server-nest/src/modules/VendorCredit/commands/VendorCreditInventoryTransactions.ts index c92ec751d..9b26e6395 100644 --- a/packages/server-nest/src/modules/VendorCredit/commands/VendorCreditInventoryTransactions.ts +++ b/packages/server-nest/src/modules/VendorCredit/commands/VendorCreditInventoryTransactions.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { Knex } from 'knex'; import { Injectable } from '@nestjs/common'; import { VendorCredit } from '../models/VendorCredit'; diff --git a/packages/server-nest/src/modules/Warehouses/Warehouses.controller.ts b/packages/server-nest/src/modules/Warehouses/Warehouses.controller.ts index 29307317b..bf2876d45 100644 --- a/packages/server-nest/src/modules/Warehouses/Warehouses.controller.ts +++ b/packages/server-nest/src/modules/Warehouses/Warehouses.controller.ts @@ -10,7 +10,7 @@ import { import { WarehousesApplication } from './WarehousesApplication.service'; import { ICreateWarehouseDTO, IEditWarehouseDTO } from './Warehouse.types'; import { PublicRoute } from '../Auth/Jwt.guard'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; @Controller('warehouses') @ApiTags('warehouses') @@ -19,6 +19,7 @@ export class WarehousesController { constructor(private warehousesApplication: WarehousesApplication) {} @Post() + @ApiOperation({ summary: 'Create a warehouse' }) createWarehouse(@Body() createWarehouseDTO: ICreateWarehouseDTO) { return this.warehousesApplication.createWarehouse(createWarehouseDTO); } @@ -35,31 +36,37 @@ export class WarehousesController { } @Delete(':id') + @ApiOperation({ summary: 'Delete a warehouse' }) deleteWarehouse(@Param('id') warehouseId: string) { return this.warehousesApplication.deleteWarehouse(Number(warehouseId)); } @Get(':id') + @ApiOperation({ summary: 'Get a warehouse' }) getWarehouse(@Param('id') warehouseId: string) { return this.warehousesApplication.getWarehouse(Number(warehouseId)); } @Get() + @ApiOperation({ summary: 'Get all warehouses' }) getWarehouses() { return this.warehousesApplication.getWarehouses(); } @Post('activate') + @ApiOperation({ summary: 'Activate a warehouse' }) activateWarehouses() { return this.warehousesApplication.activateWarehouses(); } @Post(':id/mark-primary') + @ApiOperation({ summary: 'Mark a warehouse as primary' }) markWarehousePrimary(@Param('id') warehouseId: string) { return this.warehousesApplication.markWarehousePrimary(Number(warehouseId)); } @Get('items/:itemId') + @ApiOperation({ summary: 'Get item warehouses' }) getItemWarehouses(@Param('itemId') itemId: string) { return this.warehousesApplication.getItemWarehouses(Number(itemId)); }