/** * 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 { ReportsComponent } from './reports.component'; import { RunReportComponent } from './run-report/run-report.component'; import { SanctionsLogsComponent } from './sanctions-logs/sanctions-logs.component'; /** Custom Resolvers */ import { ReportsResolver } from './common-resolvers/reports.resolver'; import { RunReportResolver } from './common-resolvers/run-report.resolver'; import { GlAccountsResolver } from '../accounting/common-resolvers/gl-accounts.resolver'; import { GlobalConfigurationsResolver } from 'app/system/configurations/global-configurations-tab/global-configurations.resolver'; /** Reports Routes */ const routes: Routes = [ Route.withShell([ { path: 'reports', data: { title: 'Reports', breadcrumb: 'Reports' }, resolve: { reports: ReportsResolver }, children: [ { path: '', component: ReportsComponent }, { path: 'sanctions-logs', data: { title: 'Sanctions Logs', breadcrumb: 'Sanctions Logs' }, component: SanctionsLogsComponent }, { path: 'dip-lookups', data: { title: 'DIP / MNRL Lookups', breadcrumb: 'DIP / MNRL Lookups' }, loadComponent: () => import('./dip-lookups/dip-lookups.component').then((m) => m.DipLookupsComponent) }, // Must sit above ':filter', which would otherwise match this path and // render an empty report category instead. { path: 'form-97-98', data: { title: 'Form 97 / 98 Transaction Report', breadcrumb: 'Form 97 / 98 Transaction Report' }, loadComponent: () => import('../form-declarations/form-declaration-report.component').then( (m) => m.FormDeclarationReportComponent ) }, { path: 'risk-review', data: { title: 'Risk Review Report', breadcrumb: 'Risk Review Report' }, loadComponent: () => import('../risk-review/risk-review-report.component').then((m) => m.RiskReviewReportComponent) }, { path: 'kyc-expiry', data: { title: 'Re-KYC Expiry & Outreach', breadcrumb: 'Re-KYC Expiry & Outreach' }, loadComponent: () => import('../kyc-expiry/kyc-expiry.component').then((m) => m.KycExpiryComponent) }, { path: 'savings-interest', data: { title: 'Savings Interest Posted', breadcrumb: 'Savings Interest Posted' }, loadComponent: () => import('../interest-report/interest-report.component').then((m) => m.InterestReportComponent) }, { path: 'dormancy', data: { title: 'Inactive, Dormant & DEAF', breadcrumb: 'Inactive, Dormant & DEAF' }, loadComponent: () => import('../dormancy-report/dormancy-report.component').then((m) => m.DormancyReportComponent) }, { path: 'tds-interest', data: { title: 'Deposit Interest & TDS', breadcrumb: 'Deposit Interest & TDS' }, loadComponent: () => import('../tds-reports/tds-interest-report.component').then((m) => m.TdsInterestReportComponent) }, { path: 'tds-remittance', data: { title: 'TDS Remitted to Government', breadcrumb: 'TDS Remitted to Government' }, loadComponent: () => import('../tds-reports/tds-remittance-report.component').then((m) => m.TdsRemittanceReportComponent) }, { path: 'bor', data: { title: 'BOR Register — Share Capital', breadcrumb: 'BOR Register' }, loadComponent: () => import('../board-resolution/bor-report.component').then((m) => m.BorReportComponent) }, { path: ':filter', data: { routeParamBreadcrumb: 'filter' }, component: ReportsComponent }, { path: 'run/:name', data: { title: 'Reports', routeParamBreadcrumb: 'name' }, component: RunReportComponent, resolve: { reportParameters: RunReportResolver, configurations: GlobalConfigurationsResolver } } ] } ]) ]; /** * Reports Routing Module * * Configures the reports routes. */ @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule], providers: [ ReportsResolver, RunReportResolver, GlAccountsResolver ] }) export class ReportsRoutingModule {}