feat: reuse savings datatables in view fixed deposit page (#960)

See: #863, #864
This commit is contained in:
Karan Takalkar
2020-07-02 23:22:22 +05:30
committed by GitHub
parent 87604b4e3e
commit 586be7f862
17 changed files with 619 additions and 5 deletions
@@ -11,9 +11,12 @@ import { InterestRateChartTabComponent } from './fixed-deposit-account-view/inte
import { TransactionsTabComponent } from './fixed-deposit-account-view/transactions-tab/transactions-tab.component';
import { ChargesTabComponent } from './fixed-deposit-account-view/charges-tab/charges-tab.component';
import { StandingInstructionsTabComponent } from './fixed-deposit-account-view/standing-instructions-tab/standing-instructions-tab.component';
import { DatatableTabsComponent } from './fixed-deposit-account-view/datatable-tabs/datatable-tabs.component';
/** Custom Resolvers */
import { FixedDepositsAccountViewResolver } from '../fixed-deposits/common-resolvers/fixed-deposit-account-view.resolver';
import { SavingsDatatableResolver } from 'app/savings/common-resolvers/savings-datatable.resolver';
import { SavingsDatatablesResolver } from 'app/savings/common-resolvers/savings-datatables.resolver';
const routes: Routes = [
{
@@ -24,7 +27,7 @@ const routes: Routes = [
path: ':fixedDepositAccountId',
data: { title: extract('Fixed Deposit Account View'), routeParamBreadcrumb: 'fixedDepositAccountId' },
resolve: {
savingsDatatables: SavingsDatatablesResolver
},
children: [
{
@@ -53,6 +56,19 @@ const routes: Routes = [
path: 'standing-instructions',
component: StandingInstructionsTabComponent,
data: { title: extract('Fixed Deposit Account Standing Instructions'), breadcrumb: 'Standing Instructions', routeParamBreadcrumb: false }
},
{
path: 'datatables',
children: [
{
path: ':datatableName',
component: DatatableTabsComponent,
data: { title: extract('View Data Table'), routeParamBreadcrumb: 'datatableName' },
resolve: {
savingsDatatable: SavingsDatatableResolver
}
}
]
}
]
}
@@ -66,7 +82,9 @@ const routes: Routes = [
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
providers: [
FixedDepositsAccountViewResolver
FixedDepositsAccountViewResolver,
SavingsDatatableResolver,
SavingsDatatablesResolver
]
})
export class FixedDepositsRoutingModule { }