From: Galen Charlton Date: Thu, 9 Jul 2020 19:40:52 +0000 (-0400) Subject: change input for Active? on search form to a tri-value select (LH#16) X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3e95a8e5b29be94e0f339f29ea7efa64860e1883;p=working%2FEvergreen.git change input for Active? on search form to a tri-value select (LH#16) Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.html b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.html index c7fa30169d..9b1317ac4f 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.html @@ -44,9 +44,13 @@
-
- - +
+ +
diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.ts index 5a255f891b..04af1fcfb4 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.ts @@ -31,7 +31,7 @@ export class AcqProviderSearchFormComponent implements OnInit, AfterViewInit { providerSAN = ''; providerEDIDefault = null; providerURL = ''; - providerIsActive = true; + providerIsActive = 'active'; constructor( private router: Router, @@ -61,7 +61,7 @@ export class AcqProviderSearchFormComponent implements OnInit, AfterViewInit { this.providerSAN = ''; this.providerEDIDefault = null; this.providerURL = ''; - this.providerIsActive = true; + this.providerIsActive = 'active'; } submitSearch() { @@ -103,7 +103,16 @@ export class AcqProviderSearchFormComponent implements OnInit, AfterViewInit { if (this.providerURL) { searchTerms.push({ classes: ['acqpro'], fields: ['url'], op: 'ilike', value: this.providerURL }); } - searchTerms.push({ classes: ['acqpro'], fields: ['active'], op: '=', value: (this.providerIsActive ? 't' : 'f') }); + switch (this.providerIsActive) { + case 'active': { + searchTerms.push({ classes: ['acqpro'], fields: ['active'], op: '=', value: 't' }); + break; + } + case 'inactive': { + searchTerms.push({ classes: ['acqpro'], fields: ['active'], op: '=', value: 'f' }); + break; + } + } // tossing setTimeout here to ensure that the // grid data source is fully initialized