- Clerk manually enters token no with today-date unique validation (backend enforced) - Cashier token lookup: auto-fill amount/account, lock amount field, status-specific errors - Confirm dialog shows CASH DISBURSEMENT (blue) with no balance re-deduction warning - Disbursement denomination saved to m_savings_txn_denomination for vault position update - Block direct cashier withdrawal without approved maker-checker token - DISBURSED status shown in My Requests and Checker inbox views with cashier/time info - Remove getNextToken() service method and m_daily_token_counter table (0326 migration) - Race condition protection: UPDATE WHERE status=APPROVED prevents double disbursement Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
157 lines
5.7 KiB
TypeScript
157 lines
5.7 KiB
TypeScript
/**
|
|
* 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';
|
|
|
|
/** Routing Imports */
|
|
import { Route } from '../core/route/route.service';
|
|
|
|
/** Custom Components */
|
|
import { CheckerInboxAndTasksComponent } from './checker-inbox-and-tasks/checker-inbox-and-tasks.component';
|
|
import { CheckerInboxComponent } from './checker-inbox-and-tasks-tabs/checker-inbox/checker-inbox.component';
|
|
import { WithdrawalRequestsComponent } from './checker-inbox-and-tasks-tabs/withdrawal-requests/withdrawal-requests.component';
|
|
import { ClientApprovalComponent } from './checker-inbox-and-tasks-tabs/client-approval/client-approval.component';
|
|
import { LoanApprovalComponent } from './checker-inbox-and-tasks-tabs/loan-approval/loan-approval.component';
|
|
import { LoanDisbursalComponent } from './checker-inbox-and-tasks-tabs/loan-disbursal/loan-disbursal.component';
|
|
import { RescheduleLoanComponent } from './checker-inbox-and-tasks-tabs/reschedule-loan/reschedule-loan.component';
|
|
import { PendingAccountComponent } from './checker-inbox-and-tasks-tabs/pending-account/pending-account.component';
|
|
import { RejectedAccountComponent } from './checker-inbox-and-tasks-tabs/rejected-account/rejected-account.component';
|
|
import { ViewCheckerInboxComponent } from './view-checker-inbox/view-checker-inbox.component';
|
|
|
|
/** Custom Resolvers */
|
|
import { GetMakerCheckers } from './common-resolvers/getmakercheckers.resolver';
|
|
import { GetGroupedClientsData } from './common-resolvers/getGroupedClientsData.resolver';
|
|
import { GetOffices } from './common-resolvers/getOffices.resolver';
|
|
import { GetLoansToBeApproved } from './common-resolvers/getLoansToBeApproved.resolver';
|
|
import { GetLoansToBeDisbursed } from './common-resolvers/getLoansToBeDisbursed.resolver';
|
|
import { GetRescheduleLoans } from './common-resolvers/getRescheduleLoans.resolver';
|
|
import { MakerCheckerTemplate } from './common-resolvers/makerCheckerTemplate.resolver';
|
|
import { GetCheckerInboxDetailResolver } from './common-resolvers/getCheckerInboxDetail.resolver';
|
|
import { GetPendingAccounts } from './common-resolvers/getPendingAccounts.resolver';
|
|
import { GetRejectedAccounts } from './common-resolvers/getRejectedAccounts.resolver';
|
|
|
|
/** Tasks Routes */
|
|
const routes: Routes = [
|
|
Route.withShell([
|
|
{
|
|
path: 'checker-inbox-and-tasks',
|
|
component: CheckerInboxAndTasksComponent,
|
|
data: { title: 'Checker Inbox & Tasks', breadcrumb: 'Checker Inbox & Tasks' },
|
|
children: [
|
|
{
|
|
path: 'checker-inbox',
|
|
component: CheckerInboxComponent,
|
|
data: { title: 'Checker Inbox' },
|
|
resolve: {
|
|
makerCheckerResource: GetMakerCheckers,
|
|
makerCheckerTemplate: MakerCheckerTemplate
|
|
}
|
|
},
|
|
{
|
|
path: 'client-approval',
|
|
component: ClientApprovalComponent,
|
|
data: { title: 'Client Approval' },
|
|
resolve: {
|
|
groupedClientData: GetGroupedClientsData
|
|
}
|
|
},
|
|
{
|
|
path: 'loan-approval',
|
|
component: LoanApprovalComponent,
|
|
data: { title: 'Laon Approval' },
|
|
resolve: {
|
|
officesData: GetOffices,
|
|
loansData: GetLoansToBeApproved
|
|
}
|
|
},
|
|
{
|
|
path: 'loan-disbursal',
|
|
component: LoanDisbursalComponent,
|
|
data: { title: 'Loan Disbursal' },
|
|
resolve: {
|
|
loansData: GetLoansToBeDisbursed
|
|
}
|
|
},
|
|
{
|
|
path: 'reschedule-loan',
|
|
component: RescheduleLoanComponent,
|
|
data: { title: 'Reschedule Loan' },
|
|
resolve: {
|
|
rescheduleLoansData: GetRescheduleLoans
|
|
}
|
|
},
|
|
{
|
|
path: 'pending-account',
|
|
component: PendingAccountComponent,
|
|
data: { title: 'Pending Account' },
|
|
resolve: {
|
|
pendingAccountsData: GetPendingAccounts
|
|
}
|
|
},
|
|
{
|
|
path: 'rejected-account',
|
|
component: RejectedAccountComponent,
|
|
data: { title: 'Rejected Account' },
|
|
resolve: {
|
|
rejectedAccountsData: GetRejectedAccounts
|
|
}
|
|
},
|
|
{
|
|
path: 'withdrawal-requests',
|
|
component: WithdrawalRequestsComponent,
|
|
data: { title: 'Withdrawal Requests' }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: 'checker-inbox-and-tasks/checker-inbox',
|
|
children: [
|
|
{
|
|
path: ':id/view',
|
|
component: ViewCheckerInboxComponent,
|
|
data: { title: 'View Checker Inbox Component', routeParamBreadcrumb: 'clientId' },
|
|
resolve: {
|
|
checkerInboxDetail: GetCheckerInboxDetailResolver
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: 'checker-inbox-and-tasks/withdrawal-requests',
|
|
children: [
|
|
{
|
|
path: ':id/review',
|
|
loadComponent: () =>
|
|
import('../clerk/withdrawal-review/withdrawal-review.component').then((m) => m.WithdrawalReviewComponent),
|
|
data: { title: 'Review Withdrawal Request', breadcrumb: 'Review Withdrawal' }
|
|
}
|
|
]
|
|
}
|
|
])
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forChild(routes)],
|
|
exports: [RouterModule],
|
|
providers: [
|
|
GetMakerCheckers,
|
|
GetGroupedClientsData,
|
|
GetOffices,
|
|
GetLoansToBeApproved,
|
|
GetLoansToBeDisbursed,
|
|
GetRescheduleLoans,
|
|
MakerCheckerTemplate,
|
|
GetCheckerInboxDetailResolver,
|
|
GetPendingAccounts,
|
|
GetRejectedAccounts
|
|
]
|
|
})
|
|
export class TasksRoutingModule {}
|