From: Bill Erickson Date: Tue, 11 Dec 2018 14:09:05 +0000 (-0500) Subject: LP1806087 Browse/search form work continued X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=eeadbbcc2d1ca87c777a157ade0e127db0159362;p=working%2FEvergreen.git LP1806087 Browse/search form work continued Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/share/catalog/catalog-url.service.ts b/Open-ILS/src/eg2/src/app/share/catalog/catalog-url.service.ts index ff1d773881..60c31284a5 100644 --- a/Open-ILS/src/eg2/src/app/share/catalog/catalog-url.service.ts +++ b/Open-ILS/src/eg2/src/app/share/catalog/catalog-url.service.ts @@ -3,7 +3,7 @@ import {ParamMap} from '@angular/router'; import {OrgService} from '@eg/core/org.service'; import {CatalogSearchContext, CatalogBrowseContext, CatalogMarcContext, CatalogTermContext, FacetFilter} from './search-context'; -import {CATALOG_CCVM_FILTERS} from './catalog.service'; +import {CATALOG_CCVM_FILTERS} from './search-context'; @Injectable() export class CatalogUrlService { diff --git a/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts b/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts index 22a6744276..93eb964533 100644 --- a/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts +++ b/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts @@ -11,21 +11,7 @@ import {PcrudService} from '@eg/core/pcrud.service'; import {CatalogSearchContext, CatalogSearchState} from './search-context'; import {BibRecordService, BibRecordSummary} from './bib-record.service'; import {BasketService} from './basket.service'; - -// CCVM's we care about in a catalog context -// Don't fetch them all because there are a lot. -export const CATALOG_CCVM_FILTERS = [ - 'item_type', - 'item_form', - 'item_lang', - 'audience', - 'audience_group', - 'vr_format', - 'bib_level', - 'lit_form', - 'search_format', - 'icon_format' -]; +import {CATALOG_CCVM_FILTERS} from './search-context'; @Injectable() export class CatalogService { diff --git a/Open-ILS/src/eg2/src/app/share/catalog/search-context.ts b/Open-ILS/src/eg2/src/app/share/catalog/search-context.ts index 64698a4832..9e4bf9112a 100644 --- a/Open-ILS/src/eg2/src/app/share/catalog/search-context.ts +++ b/Open-ILS/src/eg2/src/app/share/catalog/search-context.ts @@ -3,6 +3,21 @@ import {IdlObject} from '@eg/core/idl.service'; import {Pager} from '@eg/share/util/pager'; import {Params} from '@angular/router'; +// CCVM's we care about in a catalog context +// Don't fetch them all because there are a lot. +export const CATALOG_CCVM_FILTERS = [ + 'item_type', + 'item_form', + 'item_lang', + 'audience', + 'audience_group', + 'vr_format', + 'bib_level', + 'lit_form', + 'search_format', + 'icon_format' +]; + export enum CatalogSearchState { PENDING, SEARCHING, @@ -118,7 +133,6 @@ export class CatalogTermContext { this.fieldClass = ['keyword']; this.matchOp = ['contains']; this.joinOp = ['']; - this.ccvmFilters = {}; this.facetFilters = []; this.copyLocations = ['']; this.format = ''; @@ -126,6 +140,10 @@ export class CatalogTermContext { this.date1 = null; this.date2 = null; this.dateOp = 'is'; + + // Apply empty string values for each ccvm filter + this.ccvmFilters = {}; + CATALOG_CCVM_FILTERS.forEach(code => this.ccvmFilters[code] = ['']); } isSearchable(): boolean {