@@ -10,9 +10,11 @@ import { extract } from '../core/i18n/i18n.service';
|
||||
|
||||
/** Custom Components */
|
||||
import { ReportsComponent } from './reports.component';
|
||||
import { RunReportComponent } from './run-report/run-report.component';
|
||||
|
||||
/** Custom Resolvers */
|
||||
import { ReportsResolver } from './reports.resolver';
|
||||
import { RunReportResolver } from './run-report/run-report.resolver';
|
||||
|
||||
/** Reports Routes */
|
||||
const routes: Routes = [
|
||||
@@ -34,6 +36,29 @@ const routes: Routes = [
|
||||
component: ReportsComponent,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'run-report',
|
||||
data: { title: extract('Reports'), breadcrumb: 'Reports' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: '/reports', pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: ':report-name/:report-type/:report-id',
|
||||
data: { title: extract('Run Report'), routeParamBreadcrumb: 'report-name' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: RunReportComponent,
|
||||
resolve: {
|
||||
params: RunReportResolver
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
])
|
||||
];
|
||||
@@ -47,7 +72,8 @@ const routes: Routes = [
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
providers: [
|
||||
ReportsResolver
|
||||
ReportsResolver,
|
||||
RunReportResolver
|
||||
]
|
||||
})
|
||||
export class ReportsRoutingModule { }
|
||||
|
||||
Reference in New Issue
Block a user