feat: add create report page (#592)

Fixes: #233
This commit is contained in:
Karan Takalkar
2020-05-30 21:55:12 +05:30
committed by GitHub
parent 8c9bb25fd8
commit ca9404213c
25 changed files with 983 additions and 3 deletions
+27 -1
View File
@@ -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 { }