feat: add Current Account module, DIP verification, charges integration, and translations
- Current Account module with full CRUD, transactions, charges, hold/release, block/unblock - Current Products management under Products module - DIP mobile number verification with real API call to /lookup/check - Sanctions verification dialog - Charges support for Current Account (chargeAppliesTo=5) in create/edit - Fixed permissions from SAVINGSACCOUNT to CURRENTACCOUNT across all current account components - Added all missing translation keys for Current Account in en-US.json Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
73aa69ee02
commit
0a32d7135e
@@ -0,0 +1,272 @@
|
||||
/**
|
||||
* Copyright since 2025 Mifos Initiative
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
/** Angular Imports */
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
/** Custom Components */
|
||||
import { CurrentAccountViewComponent } from './current-account-view/current-account-view.component';
|
||||
import { TransactionsTabComponent } from './current-account-view/transactions-tab/transactions-tab.component';
|
||||
import { DatatableTransactionTabComponent } from './current-account-view/transactions/view-transaction/datatable-transaction-tab/datatable-transaction-tab.component';
|
||||
import { CurrentAccountActionsComponent } from './current-account-actions/current-account-actions.component';
|
||||
import { ChargesTabComponent } from './current-account-view/charges-tab/charges-tab.component';
|
||||
import { StandingInstructionsTabComponent } from './current-account-view/standing-instructions-tab/standing-instructions-tab.component';
|
||||
import { DatatableTabsComponent } from './current-account-view/datatable-tabs/datatable-tabs.component';
|
||||
import { CreateCurrentAccountComponent } from './create-current-account/create-current-account.component';
|
||||
import { EditCurrentAccountComponent } from './edit-current-account/edit-current-account.component';
|
||||
import { ViewTransactionComponent } from './current-account-view/transactions/view-transaction/view-transaction.component';
|
||||
import { ViewChargeComponent } from './current-account-view/view-charge/view-charge.component';
|
||||
import { ViewRecieptComponent } from './current-account-view/transactions/view-reciept/view-reciept.component';
|
||||
import { ExportTransactionsComponent } from './current-account-view/transactions-tab/export-transactions/export-transactions.component';
|
||||
import { EditTransactionComponent } from './current-account-view/transactions/edit-transaction/edit-transaction.component';
|
||||
|
||||
/** Custom Resolvers */
|
||||
import { CurrentAccountViewResolver } from './common-resolvers/current-account-view.resolver';
|
||||
import { CurrentAccountDatatableResolver } from './common-resolvers/current-accounts-datatable.resolver';
|
||||
import { CurrentAccountDatatablesResolver } from './common-resolvers/current-accounts-datatables.resolver';
|
||||
import { TransactionDatatableResolver } from './common-resolvers/transaction-datatable.resolver';
|
||||
import { TransactionDatatablesResolver } from './common-resolvers/transaction-datatables.resolver';
|
||||
import { CurrentAccountTemplateResolver } from './common-resolvers/current-account-template.resolver';
|
||||
import { CurrentAccountAndTemplateResolver } from './common-resolvers/current-account-and-template.resolver';
|
||||
import { CurrentAccountTransactionResolver } from './common-resolvers/current-account-transaction.resolver';
|
||||
import { CurrentAccountChargeResolver } from './common-resolvers/current-account-charge.resolver';
|
||||
import { CurrentAccountActionsResolver } from './common-resolvers/current-account-actions.resolver';
|
||||
import { CurrentAccountTransactionRecieptResolver } from './common-resolvers/current-accounts-transaction-reciept.resolver';
|
||||
import { CurrentAccountTransactionTemplateResolver } from './common-resolvers/current-account-transaction-template.resolver';
|
||||
import { CurrentAccountDocumentsTabComponent } from './current-account-view/current-accounts-documents-tab/current-accounts-documents-tab.component';
|
||||
import { NotesTabComponent } from './current-account-view/notes-tab/notes-tab.component';
|
||||
import { CurrentAccountNotesResolver } from './common-resolvers/current-accounts-notes.resolver';
|
||||
import { CurrentAccountDocumentsResolver } from './common-resolvers/current-accounts-documents.resolver';
|
||||
import { CurrentAccountTransactionGeneralTabComponent } from './current-account-view/transactions/view-transaction/current-accounts-transaction-general-tab/current-accounts-transaction-general-tab.component';
|
||||
import { GeneralTabComponent } from './current-account-view/general-tab/general-tab.component';
|
||||
import { PassbookTabComponent } from './current-account-view/passbook-tab/passbook-tab.component';
|
||||
|
||||
/** Current Account Routes */
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
data: {
|
||||
title: 'All Current Accounts',
|
||||
breadcrumb: 'Current Accounts',
|
||||
routeParamBreadcrumb: false,
|
||||
addBreadcrumbLink: false
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'create',
|
||||
data: { title: 'Create Current Account', breadcrumb: 'Create Current Account' },
|
||||
component: CreateCurrentAccountComponent,
|
||||
resolve: {
|
||||
currentAccountTemplate: CurrentAccountTemplateResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':currentAccountId',
|
||||
data: { title: 'Current Account View', routeParamBreadcrumb: 'currentAccountId' },
|
||||
component: CurrentAccountViewComponent,
|
||||
resolve: {
|
||||
currentAccountData: CurrentAccountViewResolver,
|
||||
currentAccountDatatables: CurrentAccountDatatablesResolver
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'general',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: 'general',
|
||||
data: { title: 'Current Account Details', breadcrumb: 'General', routeParamBreadcrumb: false },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: GeneralTabComponent
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'transactions',
|
||||
data: { title: 'Current Account Transactions', breadcrumb: 'Transactions', routeParamBreadcrumb: false },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: TransactionsTabComponent
|
||||
},
|
||||
{
|
||||
path: 'export',
|
||||
component: ExportTransactionsComponent
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'passbook',
|
||||
component: PassbookTabComponent,
|
||||
data: { title: 'Passbook', breadcrumb: 'Passbook', routeParamBreadcrumb: false }
|
||||
},
|
||||
{
|
||||
path: 'charges',
|
||||
component: ChargesTabComponent,
|
||||
data: { title: 'Current Account Charges', breadcrumb: 'Charges', routeParamBreadcrumb: false }
|
||||
},
|
||||
{
|
||||
path: 'standing-instructions',
|
||||
component: StandingInstructionsTabComponent,
|
||||
data: { title: 'Current Account SIH', breadcrumb: 'Standing Instructions', routeParamBreadcrumb: false }
|
||||
},
|
||||
{
|
||||
path: 'notes',
|
||||
component: NotesTabComponent,
|
||||
data: { title: 'Current Account Notes', breadcrumb: 'Notes', routeParamBreadcrumb: false },
|
||||
resolve: {
|
||||
currentAccountNotes: CurrentAccountNotesResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'documents',
|
||||
component: CurrentAccountDocumentsTabComponent,
|
||||
data: { title: 'Current Account Documents', breadcrumb: 'Documents', routeParamBreadcrumb: false },
|
||||
resolve: {
|
||||
currentAccountDocuments: CurrentAccountDocumentsResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'datatables',
|
||||
children: [
|
||||
{
|
||||
path: ':datatableName',
|
||||
component: DatatableTabsComponent,
|
||||
data: { title: 'View Data Table', routeParamBreadcrumb: 'datatableName' },
|
||||
resolve: {
|
||||
currentAccountDatatable: CurrentAccountDatatableResolver
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: ':currentAccountId/edit',
|
||||
data: { title: 'Edit Current Account', breadcrumb: 'Edit', routeParamBreadcrumb: false },
|
||||
component: EditCurrentAccountComponent,
|
||||
resolve: {
|
||||
currentAccountAndTemplate: CurrentAccountAndTemplateResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':currentAccountId/transactions/:id',
|
||||
data: { title: 'Current Account Transactions', breadcrumb: 'Transactions', routeParamBreadcrumb: false },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: ViewTransactionComponent,
|
||||
resolve: {
|
||||
transactionDatatables: TransactionDatatablesResolver
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'general',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: 'general',
|
||||
component: CurrentAccountTransactionGeneralTabComponent,
|
||||
resolve: {
|
||||
currentAccountTransaction: CurrentAccountTransactionResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'datatables',
|
||||
children: [
|
||||
{
|
||||
path: ':datatableName',
|
||||
component: DatatableTransactionTabComponent,
|
||||
data: { title: 'View Data table', routeParamBreadcrumb: 'datatableName' },
|
||||
resolve: {
|
||||
transactionDatatable: TransactionDatatableResolver
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'edit',
|
||||
component: EditTransactionComponent,
|
||||
data: { breadcrumb: 'Edit', routeParamBreadcrumb: false },
|
||||
resolve: {
|
||||
currentAccountTransactionTemplate: CurrentAccountTransactionTemplateResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'reciept',
|
||||
component: ViewRecieptComponent,
|
||||
data: { breadcrumb: 'Reciept', routeParamBreadcrumb: false },
|
||||
resolve: {
|
||||
currentAccountTransactionReciept: CurrentAccountTransactionRecieptResolver
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: ':currentAccountId/charges',
|
||||
data: { title: 'Current Account Charges', breadcrumb: 'Charges', routeParamBreadcrumb: false },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: '../charges',
|
||||
pathMatch: 'prefix'
|
||||
},
|
||||
{
|
||||
path: ':id',
|
||||
data: { routeParamBreadcrumb: 'id' },
|
||||
component: ViewChargeComponent,
|
||||
resolve: {
|
||||
currentAccountData: CurrentAccountViewResolver,
|
||||
currentAccountCharge: CurrentAccountChargeResolver
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: ':currentAccountId/actions/:name',
|
||||
data: { title: 'Current Account Actions', breadcrumb: 'Current Account Actions', routeParamBreadcrumb: 'name' },
|
||||
component: CurrentAccountActionsComponent,
|
||||
resolve: {
|
||||
currentAccountActionData: CurrentAccountActionsResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':currentAccountId/transfer-funds',
|
||||
loadChildren: () =>
|
||||
import('../account-transfers/account-transfers.module').then((m) => m.AccountTransfersModule)
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
declarations: [],
|
||||
providers: [
|
||||
CurrentAccountViewResolver,
|
||||
CurrentAccountDatatablesResolver,
|
||||
CurrentAccountDatatableResolver,
|
||||
TransactionDatatableResolver,
|
||||
TransactionDatatablesResolver,
|
||||
CurrentAccountTemplateResolver,
|
||||
CurrentAccountAndTemplateResolver,
|
||||
CurrentAccountTransactionResolver,
|
||||
CurrentAccountChargeResolver,
|
||||
CurrentAccountActionsResolver,
|
||||
CurrentAccountTransactionRecieptResolver,
|
||||
CurrentAccountTransactionTemplateResolver
|
||||
]
|
||||
})
|
||||
export class CurrentAccountsRoutingModule {}
|
||||
Reference in New Issue
Block a user