From 1f8a1af336feda043786ee39484ae452e78cc68f Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 13 Feb 2020 12:15:31 -0500 Subject: [PATCH] allow __gte and __lte searches for ACQLIA that include 'date' in their code Signed-off-by: Galen Charlton --- .../src/eg2/src/app/staff/acq/search/acq-search-form.component.html | 4 ++-- .../src/eg2/src/app/staff/acq/search/acq-search-form.component.ts | 4 ++++ 2 files changed, 6 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 19d989e126..bc1cc68a86 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 @@ -44,8 +44,8 @@ - - + + 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 785e0a6f35..d9cbdbe292 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 @@ -26,6 +26,7 @@ export class AcqSearchFormComponent implements OnInit, AfterViewInit { hints = ['jub', 'acqpl', 'acqpo', 'acqinv', 'acqlid']; availableSearchFields = {}; + dateLikeSearchFields = {}; searchTermDatatypes = {}; searchFieldLinkedClasses = {}; validSearchTypes = ['lineitems', 'purchaseorders', 'invoices', 'selectionlists']; @@ -83,6 +84,9 @@ export class AcqSearchFormComponent implements OnInit, AfterViewInit { datatype: 'text' }; this.searchTermDatatypes['acqlia:' + liad.id()] = 'text'; + if (liad.code().match(/date/)) { + this.dateLikeSearchFields['acqlia:' + liad.id()] = true; + } }); if (this.initialSearchTerms.length > 0) { -- 2.11.0