32 lines
977 B
TypeScript
32 lines
977 B
TypeScript
import { CommonModule } from '@angular/common';
|
|
import { NgModule, inject } from '@angular/core';
|
|
import { ActivatedRouteSnapshot, RouterModule, RouterStateSnapshot, Routes } from '@angular/router';
|
|
|
|
import { AuthGuard } from '../auth/auth-guard.service';
|
|
|
|
import { BatchIntegrityReportComponent } from './batch-integrity-report.component';
|
|
import { batchIntegrityResolver } from './batch-integrity.resolver';
|
|
|
|
const batchIntegrityRoutes: Routes = [
|
|
{
|
|
path: '',
|
|
component: BatchIntegrityReportComponent,
|
|
canActivate: [
|
|
(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => inject(AuthGuard).canActivate(route, state),
|
|
],
|
|
data: {
|
|
permission: 'Product Ledger',
|
|
},
|
|
resolve: {
|
|
info: batchIntegrityResolver,
|
|
},
|
|
runGuardsAndResolvers: 'always',
|
|
},
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [CommonModule, RouterModule.forChild(batchIntegrityRoutes)],
|
|
exports: [RouterModule],
|
|
})
|
|
export class BatchIntegrityReportRoutingModule {}
|