tanshu
5ea09df272
Now all that is needed is to make it ready for strict compiling. Removed eslint-plugin-prettier as it is not recommended and causes errors for both eslint and prettier Bumped to v8.0.0
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import { CommonModule } from '@angular/common';
|
|
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
|
|
import { AuthGuard } from '../auth/auth-guard.service';
|
|
import { CostCentreListResolver } from '../cost-centre/cost-centre-list-resolver.service';
|
|
|
|
import { IssueResolver } from './issue-resolver.service';
|
|
import { IssueComponent } from './issue.component';
|
|
|
|
const issueRoutes: Routes = [
|
|
{
|
|
path: '',
|
|
component: IssueComponent,
|
|
canActivate: [AuthGuard],
|
|
data: {
|
|
permission: 'Issue',
|
|
},
|
|
resolve: {
|
|
voucher: IssueResolver,
|
|
costCentres: CostCentreListResolver,
|
|
},
|
|
runGuardsAndResolvers: 'always',
|
|
},
|
|
{
|
|
path: ':id',
|
|
component: IssueComponent,
|
|
canActivate: [AuthGuard],
|
|
data: {
|
|
permission: 'Issue',
|
|
},
|
|
resolve: {
|
|
voucher: IssueResolver,
|
|
costCentres: CostCentreListResolver,
|
|
},
|
|
runGuardsAndResolvers: 'always',
|
|
},
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [CommonModule, RouterModule.forChild(issueRoutes)],
|
|
exports: [RouterModule],
|
|
providers: [IssueResolver],
|
|
})
|
|
export class IssueRoutingModule {}
|