116 lines
4.4 KiB
TypeScript
116 lines
4.4 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/.
|
|
*/
|
|
|
|
import { NgModule } from '@angular/core';
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
|
|
import { Route } from '../core/route/route.service';
|
|
import { AccountsListComponent } from './accounts-list/accounts-list.component';
|
|
import { PartyMasterComponent } from '../deposits/party-master/party-master.component';
|
|
import { CreatePartyComponent } from '../deposits/party-master/create-party/create-party.component';
|
|
import { DueForClosureComponent } from '../deposits/party-master/due-for-closure/due-for-closure.component';
|
|
import { DailyTransactionEntryComponent } from '../deposits/daily-transaction-entry/daily-transaction-entry.component';
|
|
import { DdsReportsComponent } from '../deposits/dds-reports/dds-reports.component';
|
|
import { ReportViewerComponent } from '../deposits/dds-reports/report-viewer/report-viewer.component';
|
|
import { DdsAccountsComponent } from '../deposits/dds-accounts/dds-accounts.component';
|
|
import { DdsAccountViewComponent } from '../deposits/dds-accounts/dds-account-view/dds-account-view.component';
|
|
|
|
const routes: Routes = [
|
|
Route.withShell([
|
|
{
|
|
path: 'accounts',
|
|
children: [
|
|
{ path: '', redirectTo: 'savings', pathMatch: 'full' },
|
|
{
|
|
path: 'savings',
|
|
component: AccountsListComponent,
|
|
data: { accountType: 'savings', title: 'Savings Accounts', breadcrumb: 'Savings Accounts' }
|
|
},
|
|
{
|
|
path: 'current',
|
|
component: AccountsListComponent,
|
|
data: { accountType: 'current', title: 'Current Accounts', breadcrumb: 'Current Accounts' }
|
|
},
|
|
{
|
|
path: 'fixed-deposits',
|
|
component: AccountsListComponent,
|
|
data: { accountType: 'fixed-deposits', title: 'Fixed Deposit Accounts', breadcrumb: 'Fixed Deposit Accounts' }
|
|
},
|
|
{
|
|
path: 'recurring-deposits',
|
|
component: AccountsListComponent,
|
|
data: {
|
|
accountType: 'recurring-deposits',
|
|
title: 'Recurring Deposit Accounts',
|
|
breadcrumb: 'Recurring Deposit Accounts'
|
|
}
|
|
},
|
|
{
|
|
path: 'dds',
|
|
data: { title: 'Daily Deposit Scheme — Party Master', breadcrumb: 'Party Master' },
|
|
children: [
|
|
{ path: '', component: PartyMasterComponent },
|
|
{
|
|
path: 'create',
|
|
component: CreatePartyComponent,
|
|
data: { title: 'Create Party', breadcrumb: 'Create' }
|
|
},
|
|
{
|
|
// Ahead of the :partyId routes, so "dueforclosure" is not read as a party id.
|
|
path: 'dueforclosure',
|
|
component: DueForClosureComponent,
|
|
data: { title: 'Accounts Due for Closure', breadcrumb: 'Due for Closure' }
|
|
},
|
|
{
|
|
path: ':partyId/edit',
|
|
component: CreatePartyComponent,
|
|
data: { title: 'Edit Party', breadcrumb: 'Edit' }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
// The DDS accounts listed like Savings Accounts, each opening onto its transactions.
|
|
path: 'dds-accounts',
|
|
data: { title: 'DDS Accounts', breadcrumb: 'DDS Accounts' },
|
|
children: [
|
|
{ path: '', component: DdsAccountsComponent },
|
|
{
|
|
path: ':partyId',
|
|
component: DdsAccountViewComponent,
|
|
data: { title: 'DDS Account', breadcrumb: 'Account', routeParamBreadcrumb: false }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: 'dds-collection',
|
|
component: DailyTransactionEntryComponent,
|
|
data: { title: 'Daily Transaction Entry', breadcrumb: 'Daily Transaction Entry' }
|
|
},
|
|
{
|
|
path: 'dds-reports',
|
|
data: { title: 'DDS Reports', breadcrumb: 'DDS Reports' },
|
|
children: [
|
|
{ path: '', component: DdsReportsComponent },
|
|
{
|
|
path: 'view/:reportName',
|
|
component: ReportViewerComponent,
|
|
data: { title: 'DDS Report', breadcrumb: 'reportName', routeParamBreadcrumb: 'reportName' }
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
])
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forChild(routes)],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AccountsRoutingModule {}
|