Skip to content

Commit

Permalink
add i18n labels for person facets
Browse files Browse the repository at this point in the history
  • Loading branch information
artlowel committed May 29, 2019
1 parent 813a856 commit b352137
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 17 deletions.
12 changes: 12 additions & 0 deletions resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,18 @@
"objectpeople": {
"placeholder": "People",
"head": "People"
},
"jobTitle": {
"placeholder": "Job Title",
"head": "Job Title"
},
"knowsLanguage": {
"placeholder": "Known language",
"head": "Known language"
},
"birthDate": {
"placeholder": "Birth Date",
"head": "Birth Date"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,23 @@ export class SearchFilterComponent implements OnInit {
* @returns {Observable<boolean>} Emits true whenever a given filter config should be shown
*/
private isActive(): Observable<boolean> {
return this.selectedValues$.pipe(
switchMap((isActive) => {
if (isNotEmpty(isActive)) {
return observableOf(true);
} else {
return this.searchConfigService.searchOptions.pipe(
switchMap((options) => {
return this.searchService.getFacetValuesFor(this.filter, 1, options).pipe(
filter((RD) => !RD.isLoading),
map((valuesRD) => {
return valuesRD.payload.totalElements > 0
}),)
}
))
}
}),
startWith(true));
return observableOf(true);
// return this.selectedValues$.pipe(
// switchMap((isActive) => {
// if (isNotEmpty(isActive)) {
// return observableOf(true);
// } else {
// return this.searchConfigService.searchOptions.pipe(
// switchMap((options) => {
// return this.searchService.getFacetValuesFor(this.filter, 1, options).pipe(
// filter((RD) => !RD.isLoading),
// map((valuesRD) => {
// return valuesRD.payload.totalElements > 0
// }),)
// }
// ))
// }
// }),
// startWith(true));
}
}

0 comments on commit b352137

Please sign in to comment.