From: Galen Charlton Date: Wed, 8 Jul 2020 21:52:43 +0000 (-0400) Subject: menu adjustments X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4a9b7287c94fce817bb91b0528aca01a993ef52f;p=working%2FEvergreen.git menu adjustments - remove the additional menu items added in a previous commit - add a 'Reset Default Search' button Signed-off-by: Galen Charlton --- 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 2443325415..3fe617e41e 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 @@ -1,4 +1,5 @@ +
@@ -140,9 +141,12 @@
-
-
+
+
+
(); @ViewChild('defaultSearchSavedString', { static: true}) defaultSearchSavedString: StringComponent; + @ViewChild('defaultSearchResetString', { static: true}) defaultSearchResetString: StringComponent; showForm = true; @@ -40,6 +41,7 @@ export class AcqSearchFormComponent implements OnInit, AfterViewInit, OnChanges defaultSearchType = 'lineitems'; searchConjunction = 'all'; runImmediately = false; + hasDefaultSearch = false; searchTerms: AcqSearchTerm[] = []; @@ -109,6 +111,7 @@ export class AcqSearchFormComponent implements OnInit, AfterViewInit, OnChanges if (defaultSearch) { this.searchTerms = JSON.parse(JSON.stringify(defaultSearch.terms)); this.searchConjunction = defaultSearch.conjunction; + this.hasDefaultSearch = true; } else if (this.fallbackSearchTerms.length) { this.searchTerms.length = 0; JSON.parse(JSON.stringify(this.fallbackSearchTerms)) @@ -214,11 +217,20 @@ export class AcqSearchFormComponent implements OnInit, AfterViewInit, OnChanges return this.store.setItem(this.defaultSearchSetting, { terms: this.searchTerms, conjunction: this.searchConjunction - }).then(() => + }).then(() => { + this.hasDefaultSearch = true; this.defaultSearchSavedString.current().then(msg => this.toast.success(msg) - ) - ); + ); + }); + } + clearDefaultSearch() { + return this.store.removeItem(this.defaultSearchSetting).then(() => { + this.hasDefaultSearch = false; + this.defaultSearchResetString.current().then(msg => + this.toast.success(msg) + ); + }); } saveRunImmediately() { return this.store.setItem(this.runImmediatelySetting, this.runImmediately); diff --git a/Open-ILS/src/eg2/src/app/staff/nav.component.html b/Open-ILS/src/eg2/src/app/staff/nav.component.html index 90b605657d..5026e49260 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.html +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.html @@ -247,13 +247,7 @@ view_list - Selection List Search - - - view_list - My Selection Lists + Selection Lists @@ -284,13 +278,7 @@ shopping_cart - Purchase Order Search - - - shopping_cart - On Order at Workstation + Purchase Orders add_shopping_cart @@ -305,13 +293,7 @@ attach_money - Invoice Search - - - attach_money - Open Invoices + Invoices diff --git a/Open-ILS/src/templates/staff/navbar.tt2 b/Open-ILS/src/templates/staff/navbar.tt2 index c1c5aca611..c10fb4b393 100644 --- a/Open-ILS/src/templates/staff/navbar.tt2 +++ b/Open-ILS/src/templates/staff/navbar.tt2 @@ -363,9 +363,9 @@
  • - + - [% l('My Selection Lists') %] + [% l('Selection Lists') %]
  • @@ -421,7 +421,7 @@
  • - [% l('Open Invoices') %] + [% l('Invoices') %]