From a184c2472b8bf47db3260b52c14fbb0925196f84 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Sun, 19 Jan 2020 15:20:48 -0500 Subject: [PATCH] hook up __age, __starts, and __ends operators Signed-off-by: Galen Charlton --- .../eg2/src/app/staff/acq/search/acq-search-form.component.html | 9 +++++++-- .../eg2/src/app/staff/acq/search/acq-search-form.component.ts | 8 ++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.html b/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.html index 3138a5faaa..2d686b5229 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.html @@ -12,13 +12,17 @@
- + + +
@@ -38,9 +42,10 @@ [idlClass]="searchFieldLinkedClasses[t.field]" (onChange)="t.value1 = $event ? $event.id : ''"> - +
diff --git a/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts index f1e962303b..9b9211728d 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts @@ -91,6 +91,14 @@ export class AcqSearchFormComponent implements OnInit, AfterViewInit { term.value2 = ''; term.is_date = false; } + // conditionally clear the search term after changing + // to selected search operators + clearSearchTermValueAfterOpChange(term: AcqSearchTerm) { + if (term.op === '__age') { + term.value1 = ''; + term.value2 = ''; + } + } setOrgUnitSearchValue(org: IdlObject, term: AcqSearchTerm) { if (org == null) { -- 2.11.0