From: Galen Charlton Date: Tue, 21 Sep 2021 14:25:03 +0000 (-0400) Subject: LP#1737019: (follow-up) more tweaks X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6ffecf41876e542ac5dc8725c563e735fba497ab;p=working%2FEvergreen.git LP#1737019: (follow-up) more tweaks - When creating a new funding source, default the active flag in the modal to checked - Disable actions to allocate from a funding source or apply credits to it if it is not active Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-source-transactions-dialog.component.html b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-source-transactions-dialog.component.html index 100c8def17..22d449575c 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-source-transactions-dialog.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-source-transactions-dialog.component.html @@ -29,7 +29,8 @@ [sortable]="true" persistKey="acq.funding_source.credit" [filterable]="true" [stickyHeader]="true"> - + @@ -49,7 +50,8 @@ [sortable]="true" persistKey="acq.funding_source.fund_allocation" [filterable]="true" [stickyHeader]="true" [cellTextGenerator]="cellTextGenerator"> - + diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.html b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.html index 4af554615c..5601e3b10b 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.html @@ -59,10 +59,10 @@ group="Selected" i18n-group [disableOnRows]="notOneSelectedRow"> + group="Credits" i18n-group [disableOnRows]="notOneSelectedActiveRow"> + group="Allocations" i18n-group [disableOnRows]="notOneSelectedActiveRow"> diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.ts index d5d541c327..a3809a6242 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-sources.component.ts @@ -42,6 +42,7 @@ export class FundingSourcesComponent extends AdminPageComponent implements OnIni cellTextGenerator: GridCellTextGenerator; notOneSelectedRow: (rows: IdlObject[]) => boolean; + notOneSelectedActiveRow: (rows: IdlObject[]) => boolean; constructor( route: ActivatedRoute, @@ -64,8 +65,10 @@ export class FundingSourcesComponent extends AdminPageComponent implements OnIni name: row => row.name() }; this.notOneSelectedRow = (rows: IdlObject[]) => (rows.length !== 1); + this.notOneSelectedActiveRow = (rows: IdlObject[]) => (rows.length !== 1 || rows[0].active() !== 't'); this.fieldOrder = 'name,code,year,org,active,currency_type,balance_stop_percentage,balance_warning_percentage,propagate,rollover'; this.defaultNewRecord = this.idl.create('acqfs'); + this.defaultNewRecord.active(true); this.defaultNewRecord.owner(this.auth.user().ws_ou()); this.dataSource.getRows = (pager: Pager, sort: any[]) => {