2020-10-01 15:21:22 +00:00
|
|
|
import { CommonModule } from '@angular/common';
|
2020-10-10 03:15:05 +00:00
|
|
|
import { NgModule } from '@angular/core';
|
2020-10-01 15:21:22 +00:00
|
|
|
import { RouterModule, Routes } from '@angular/router';
|
2020-10-10 03:15:05 +00:00
|
|
|
|
2020-10-01 15:21:22 +00:00
|
|
|
import { AuthGuard } from '../auth/auth-guard.service';
|
2021-10-31 13:11:06 +00:00
|
|
|
import { CostCentreListResolver } from '../cost-centre/cost-centre-list-resolver.service';
|
2020-10-10 03:15:05 +00:00
|
|
|
|
|
|
|
import { ClosingStockResolver } from './closing-stock-resolver.service';
|
2020-10-01 15:21:22 +00:00
|
|
|
import { ClosingStockComponent } from './closing-stock.component';
|
2018-05-25 13:49:00 +00:00
|
|
|
|
|
|
|
const closingStockRoutes: Routes = [
|
|
|
|
{
|
2019-06-12 14:04:50 +00:00
|
|
|
path: '',
|
2018-05-25 13:49:00 +00:00
|
|
|
component: ClosingStockComponent,
|
|
|
|
canActivate: [AuthGuard],
|
|
|
|
data: {
|
2020-10-01 15:21:22 +00:00
|
|
|
permission: 'Closing Stock',
|
2018-05-25 13:49:00 +00:00
|
|
|
},
|
|
|
|
resolve: {
|
2020-10-01 15:21:22 +00:00
|
|
|
info: ClosingStockResolver,
|
2021-10-31 13:11:06 +00:00
|
|
|
costCentres: CostCentreListResolver,
|
2020-10-01 15:21:22 +00:00
|
|
|
},
|
2021-10-31 13:11:06 +00:00
|
|
|
runGuardsAndResolvers: 'always',
|
2018-05-25 13:49:00 +00:00
|
|
|
},
|
|
|
|
{
|
2019-06-12 14:04:50 +00:00
|
|
|
path: ':date',
|
2018-05-25 13:49:00 +00:00
|
|
|
component: ClosingStockComponent,
|
|
|
|
canActivate: [AuthGuard],
|
|
|
|
data: {
|
2020-10-01 15:21:22 +00:00
|
|
|
permission: 'Closing Stock',
|
2018-05-25 13:49:00 +00:00
|
|
|
},
|
|
|
|
resolve: {
|
2020-10-01 15:21:22 +00:00
|
|
|
info: ClosingStockResolver,
|
2021-10-31 13:11:06 +00:00
|
|
|
costCentres: CostCentreListResolver,
|
2020-10-01 15:21:22 +00:00
|
|
|
},
|
2021-10-31 13:11:06 +00:00
|
|
|
runGuardsAndResolvers: 'always',
|
2020-10-01 15:21:22 +00:00
|
|
|
},
|
2018-05-25 13:49:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
2020-10-01 15:21:22 +00:00
|
|
|
imports: [CommonModule, RouterModule.forChild(closingStockRoutes)],
|
|
|
|
exports: [RouterModule],
|
|
|
|
providers: [ClosingStockResolver],
|
2018-05-25 13:49:00 +00:00
|
|
|
})
|
2020-10-01 15:21:22 +00:00
|
|
|
export class ClosingStockRoutingModule {}
|