105 lines
3.7 KiB
TypeScript
105 lines
3.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/.
|
|
*/
|
|
|
|
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { Route } from '../core/route/route.service';
|
|
|
|
const routes: Routes = [
|
|
Route.withShell([
|
|
{
|
|
path: 'election',
|
|
data: { title: 'Election Management' },
|
|
children: [
|
|
{
|
|
path: '',
|
|
loadComponent: () =>
|
|
import('./components/election-dashboard/election-dashboard.component').then(
|
|
(m) => m.ElectionDashboardComponent
|
|
),
|
|
data: { title: 'Elections Dashboard' }
|
|
},
|
|
{
|
|
path: 'config/new',
|
|
loadComponent: () =>
|
|
import('./components/election-config/election-config.component').then((m) => m.ElectionConfigComponent),
|
|
data: { title: 'Create Election' }
|
|
},
|
|
{
|
|
path: 'config/:electionId/edit',
|
|
loadComponent: () =>
|
|
import('./components/election-config/election-config.component').then((m) => m.ElectionConfigComponent),
|
|
data: { title: 'Edit Election' }
|
|
},
|
|
{
|
|
path: ':electionId/nominations',
|
|
loadComponent: () =>
|
|
import('./components/nomination-list/nomination-list.component').then((m) => m.NominationListComponent),
|
|
data: { title: 'Nominations' }
|
|
},
|
|
{
|
|
path: ':electionId/nomination/apply',
|
|
loadComponent: () =>
|
|
import('./components/nomination-apply/nomination-apply.component').then((m) => m.NominationApplyComponent),
|
|
data: { title: 'Apply for Nomination' }
|
|
},
|
|
{
|
|
path: ':electionId/nomination/:nominationId',
|
|
loadComponent: () =>
|
|
import('./components/nomination-detail/nomination-detail.component').then(
|
|
(m) => m.NominationDetailComponent
|
|
),
|
|
data: { title: 'Nomination Detail' }
|
|
},
|
|
{
|
|
path: ':electionId/candidates',
|
|
loadComponent: () =>
|
|
import('./components/candidate-board/candidate-board.component').then((m) => m.CandidateBoardComponent),
|
|
data: { title: 'Candidate Board' }
|
|
},
|
|
{
|
|
path: ':electionId/results',
|
|
loadComponent: () =>
|
|
import('./components/election-results/election-results.component').then((m) => m.ElectionResultsComponent),
|
|
data: { title: 'Election Results' }
|
|
},
|
|
{
|
|
path: ':electionId/audit-log',
|
|
loadComponent: () =>
|
|
import('./components/election-audit-log/election-audit-log.component').then(
|
|
(m) => m.ElectionAuditLogComponent
|
|
),
|
|
data: { title: 'Election Audit Log' }
|
|
},
|
|
{
|
|
path: ':electionId/candidates/:candidateId/analysis',
|
|
loadComponent: () =>
|
|
import('./components/candidate-analysis/candidate-analysis.component').then(
|
|
(m) => m.CandidateAnalysisComponent
|
|
),
|
|
data: { title: 'Candidate Voter Analysis' }
|
|
},
|
|
{
|
|
path: ':electionId/shareholders/analysis',
|
|
loadComponent: () =>
|
|
import('./components/shareholder-analysis/shareholder-analysis.component').then(
|
|
(m) => m.ShareholderAnalysisComponent
|
|
),
|
|
data: { title: 'Overall Shareholder Analysis' }
|
|
}
|
|
]
|
|
}
|
|
])
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forChild(routes)],
|
|
exports: [RouterModule]
|
|
})
|
|
export class ElectionRoutingModule {}
|