brewman/overlord/src/app/closing-stock/closing-stock-routing.module.ts
tanshu 0574f9df14 Chore: Changed the account_type and voucher_type enum.
The account type enum is not stored in the database as an enum.
The voucher_type enum is now a table in the database.

Feature: Closing stock can now be saved and in each department.
2021-10-31 18:41:06 +05:30

46 lines
1.2 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 { ClosingStockResolver } from './closing-stock-resolver.service';
import { ClosingStockComponent } from './closing-stock.component';
const closingStockRoutes: Routes = [
{
path: '',
component: ClosingStockComponent,
canActivate: [AuthGuard],
data: {
permission: 'Closing Stock',
},
resolve: {
info: ClosingStockResolver,
costCentres: CostCentreListResolver,
},
runGuardsAndResolvers: 'always',
},
{
path: ':date',
component: ClosingStockComponent,
canActivate: [AuthGuard],
data: {
permission: 'Closing Stock',
},
resolve: {
info: ClosingStockResolver,
costCentres: CostCentreListResolver,
},
runGuardsAndResolvers: 'always',
},
];
@NgModule({
imports: [CommonModule, RouterModule.forChild(closingStockRoutes)],
exports: [RouterModule],
providers: [ClosingStockResolver],
})
export class ClosingStockRoutingModule {}