From c3bd22fc9fbdca2db93c890e244a4f15e20520a5 Mon Sep 17 00:00:00 2001 From: tanshu Date: Sat, 25 Sep 2021 11:25:11 +0530 Subject: [PATCH] Fix: Balance Sheet and Trial Balance would not update when changing date. --- overlord/src/app/balance-sheet/balance-sheet-routing.module.ts | 2 ++ overlord/src/app/balance-sheet/balance-sheet.component.ts | 2 +- overlord/src/app/trial-balance/trial-balance-routing.module.ts | 2 ++ overlord/src/app/trial-balance/trial-balance.component.ts | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/overlord/src/app/balance-sheet/balance-sheet-routing.module.ts b/overlord/src/app/balance-sheet/balance-sheet-routing.module.ts index 904cfa2d..95d8d024 100644 --- a/overlord/src/app/balance-sheet/balance-sheet-routing.module.ts +++ b/overlord/src/app/balance-sheet/balance-sheet-routing.module.ts @@ -18,6 +18,7 @@ const balanceSheetRoutes: Routes = [ resolve: { info: BalanceSheetResolver, }, + runGuardsAndResolvers: 'always', }, { path: ':date', @@ -29,6 +30,7 @@ const balanceSheetRoutes: Routes = [ resolve: { info: BalanceSheetResolver, }, + runGuardsAndResolvers: 'always', }, ]; diff --git a/overlord/src/app/balance-sheet/balance-sheet.component.ts b/overlord/src/app/balance-sheet/balance-sheet.component.ts index 04d0282e..14958e75 100644 --- a/overlord/src/app/balance-sheet/balance-sheet.component.ts +++ b/overlord/src/app/balance-sheet/balance-sheet.component.ts @@ -36,8 +36,8 @@ export class BalanceSheetComponent implements OnInit { this.form.setValue({ date: moment(this.info.date, 'DD-MMM-YYYY').toDate(), }); + this.dataSource = new BalanceSheetDataSource(this.info.body, this.paginator, this.sort); }); - this.dataSource = new BalanceSheetDataSource(this.info.body, this.paginator, this.sort); } show() { diff --git a/overlord/src/app/trial-balance/trial-balance-routing.module.ts b/overlord/src/app/trial-balance/trial-balance-routing.module.ts index 2fc3278f..4e4a8b23 100644 --- a/overlord/src/app/trial-balance/trial-balance-routing.module.ts +++ b/overlord/src/app/trial-balance/trial-balance-routing.module.ts @@ -18,6 +18,7 @@ const trialBalanceRoutes: Routes = [ resolve: { info: TrialBalanceResolver, }, + runGuardsAndResolvers: 'always', }, { path: ':date', @@ -29,6 +30,7 @@ const trialBalanceRoutes: Routes = [ resolve: { info: TrialBalanceResolver, }, + runGuardsAndResolvers: 'always', }, ]; diff --git a/overlord/src/app/trial-balance/trial-balance.component.ts b/overlord/src/app/trial-balance/trial-balance.component.ts index 7b82dea0..12756a3d 100644 --- a/overlord/src/app/trial-balance/trial-balance.component.ts +++ b/overlord/src/app/trial-balance/trial-balance.component.ts @@ -36,8 +36,8 @@ export class TrialBalanceComponent implements OnInit { this.form.setValue({ date: moment(this.info.date, 'DD-MMM-YYYY').toDate(), }); + this.dataSource = new TrialBalanceDataSource(this.info.body, this.paginator, this.sort); }); - this.dataSource = new TrialBalanceDataSource(this.info.body, this.paginator, this.sort); } show() {