Skip to content
Snippets Groups Projects
Commit bea84005 authored by esikkala's avatar esikkala
Browse files

Places view: adjust facets

parent cc7269b1
No related branches found
No related tags found
No related merge requests found
......@@ -30,27 +30,27 @@ export const INITIAL_STATE = {
distinctValueCount: 0,
values: [],
flatValues: [],
sortBy: 'instanceCount',
sortDirection: 'desc',
sortButton: false,
isFetching: false,
searchField: false,
containerSize: 'large',
},
type: {
id: 'type',
label: 'Type',
// predicate: defined in backend
distinctValueCount: 0,
values: [],
flatValues: [],
sortBy: 'instanceCount',
sortDirection: 'desc',
sortBy: 'prefLabel',
sortDirection: 'asc',
sortButton: false,
isFetching: false,
searchField: false,
containerSize: 'large',
},
// type: {
// id: 'type',
// label: 'Type',
// // predicate: defined in backend
// distinctValueCount: 0,
// values: [],
// flatValues: [],
// sortBy: 'instanceCount',
// sortDirection: 'desc',
// sortButton: false,
// isFetching: false,
// searchField: false,
// containerSize: 'large',
//} ,
},
filters: {
source: new Set(),
......
......@@ -82,16 +82,17 @@ export const facetConfigs = {
label: 'Area',
labelPath: 'gvp:broaderPreferred/skos:prefLabel',
predicate: 'gvp:broaderPreferred',
type: 'list',
},
type: {
id: 'type',
facetValueFilter: '',
label: 'Type',
labelPath: 'gvp:placeTypePreferred',
predicate: 'gvp:placeTypePreferred',
type: 'list',
parentPredicate: 'gvp:broaderPreferred+',
type: 'hierarchical',
},
// type: {
// id: 'type',
// facetValueFilter: '',
// label: 'Type',
// labelPath: 'gvp:placeTypePreferred',
// predicate: 'gvp:placeTypePreferred',
// type: 'list',
// },
}
};
......@@ -31,7 +31,7 @@ export const getAllResults = (resultClass, facetClass, variant, filters) => {
switch (variant) {
case 'allPlaces':
q = allPlacesQuery;
filterTarget = 'manuscripts';
filterTarget = 'id';
break;
case 'productionPlaces':
q = productionPlacesQuery;
......
......@@ -26,6 +26,7 @@ export const allPlacesQuery = `
PREFIX gvp: <http://vocab.getty.edu/ontology#>
SELECT *
WHERE {
<FILTER>
?id a crm:E53_Place .
?id skos:prefLabel ?prefLabel .
?id dct:source ?source .
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment