funds: fix default tab logic
authorGalen Charlton <gmc@equinoxinitiative.org>
Mon, 19 Apr 2021 20:37:52 +0000 (16:37 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 19 Apr 2021 20:37:52 +0000 (16:37 -0400)
Closes LH#5 and LH#6

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-details-dialog.component.ts

index 641dbcf..14ad68d 100644 (file)
@@ -63,11 +63,14 @@ export class FundDetailsDialogComponent
     ngOnInit() {
 
         this.defaultTabType =
-            this.store.getLocalItem('eg.acq.fund_details.default_tab') || 'details';
+            this.store.getLocalItem('eg.acq.fund_details.default_tab') || 'summary';
         this.activeTab = this.defaultTabType;
 
         this.fund = null;
-        this.onOpen$.subscribe(() => this._initRecord());
+        this.onOpen$.subscribe(() => {
+            this.activeTab = this.defaultTabType;
+            this._initRecord();
+        });
         this.idlDef = this.idl.classes['acqf'];
         this.fieldOrder = 'name,code,year,org,active,currency_type,balance_stop_percentage,balance_warning_percentage,propagate,rollover';