tanshu
1350870f9e
Added prettier and also prettied all the typescript files using prettier ESLint is using the AirBnB rules which are the most strict to lint the files.
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import { NgModule } from '@angular/core';
|
|
import { CommonModule } from '@angular/common';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { IssueResolver } from './issue-resolver.service';
|
|
import { AuthGuard } from '../auth/auth-guard.service';
|
|
import { IssueComponent } from './issue.component';
|
|
import { CostCentreListResolver } from '../cost-centre/cost-centre-list-resolver.service';
|
|
|
|
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 {}
|