add i18n labels for person facets

This commit is contained in:
Art Lowel
2019-05-29 18:05:30 +02:00
parent 813a856ed8
commit b352137fb3
2 changed files with 30 additions and 17 deletions

View File

@@ -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"
}
}
}

View File

@@ -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));
}
}