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
54 lines
1.4 KiB
TypeScript
54 lines
1.4 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 { CostCentreDetailComponent } from './cost-centre-detail/cost-centre-detail.component';
|
|
import { CostCentreListResolver } from './cost-centre-list-resolver.service';
|
|
import { CostCentreListComponent } from './cost-centre-list/cost-centre-list.component';
|
|
import { CostCentreResolver } from './cost-centre-resolver.service';
|
|
|
|
const costCentreRoutes: Routes = [
|
|
{
|
|
path: '',
|
|
component: CostCentreListComponent,
|
|
canActivate: [AuthGuard],
|
|
data: {
|
|
permission: 'Cost Centres',
|
|
},
|
|
resolve: {
|
|
list: CostCentreListResolver,
|
|
},
|
|
},
|
|
{
|
|
path: 'new',
|
|
component: CostCentreDetailComponent,
|
|
canActivate: [AuthGuard],
|
|
data: {
|
|
permission: 'Cost Centres',
|
|
},
|
|
resolve: {
|
|
item: CostCentreResolver,
|
|
},
|
|
},
|
|
{
|
|
path: ':id',
|
|
component: CostCentreDetailComponent,
|
|
canActivate: [AuthGuard],
|
|
data: {
|
|
permission: 'Cost Centres',
|
|
},
|
|
resolve: {
|
|
item: CostCentreResolver,
|
|
},
|
|
},
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [CommonModule, RouterModule.forChild(costCentreRoutes)],
|
|
exports: [RouterModule],
|
|
providers: [CostCentreListResolver, CostCentreResolver],
|
|
})
|
|
export class CostCentreRoutingModule {}
|