tanshu
0574f9df14
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.
46 lines
1.2 KiB
TypeScript
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 {}
|