Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • kit/ki-allianz/datenplattform-core/piveau-hub/piveau-ui
  • till.riedel/piveau-ui
2 results
Show changes
Commits on Source (3)
## [4.6.30](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.29...v4.6.30) (2025-04-01)
### Features
* added MinDate, MaxDate support in Dataset setter for advanced search in DEU ([8a8c7aa](https://gitlab.com/piveau/ui/piveau-ui/commit/8a8c7aa82860eec208720e830b49a04a5e187556))
## [4.6.29](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.28...v4.6.29) (2025-03-24)
......
......@@ -230,9 +230,11 @@
* @param geoBounds
* @param minScoring
* @param dataScope
* @param minDate
* @param maxDate
* @returns {Promise}
*/
get(q: any, fields: any, locale: any, limit: any, page = 0, sort = `relevance+desc, modified+desc, title.${locale}+asc`, facetOperator = 'AND', facetGroupOperator = 'AND', dataServices = 'false', facets: { scoring: any; dataServices: any; }, geoBounds: any, minScoring = 0, dataScope: string) {
get(q: any, fields: any, locale: any, limit: any, page = 0, sort = `relevance+desc, modified+desc, title.${locale}+asc`, facetOperator = 'AND', facetGroupOperator = 'AND', dataServices = 'false', facets: { scoring: any; dataServices: any; }, geoBounds: any, minScoring = 0, dataScope: string, minDate: any, maxDate: any) {
facets = { ...facets }; // create a copy to prevent side effects
delete facets.scoring; // Those are not facets in the api call! They are separate query parameters
......@@ -250,6 +252,8 @@
dataServices,
includes: `id,title.${locale},description.${locale},languages,modified,issued,catalog.id,catalog.title,catalog.country.id,distributions.id,distributions.format.label,distributions.format.id,distributions.license,categories.label,publisher`,
facets,
minDate,
maxDate,
};
// Check if minScoring is set
......
......@@ -89,7 +89,7 @@ const actions = {
return new Promise((resolve, reject) => {
this.$catalogService.get(query, fields, limit, page, sort, facetOperator, facetGroupOperator, facets)
.then((response) => {
commit('SET_FIEELDS', response.fields);
commit('SET_FIELDS', response.fields); // FIX THis
commit('SET_AVAILABLE_FACETS', response.availableFacets);
commit('SET_catalogS_COUNT', response.catalogsCount);
if (append) commit('ADD_catalogS', response.catalogs);
......
......@@ -20,6 +20,8 @@ const state = {
superCatalogue: undefined, // !!!!! Project specific (Bayern). Should be removed as soon as possible !!!!
datasetGeoBounds: undefined,
sort: 'relevance+desc, modified+desc, title.en+asc',
minDate: null,
maxDate: null,
},
availableFacets: [],
page: 1,
......@@ -64,6 +66,8 @@ const GETTERS = {
getDatasetsCount: state => state.datasetsCount,
getQuery: state => state.searchParameters.query,
getFields: state => state.searchParameters.fields,
getMinDate: state => state.searchParameters.minDate,
getMaxDate: state => state.searchParameters.maxDate,
getLimit: state => state.searchParameters.limit,
getLoading: state => state.loading,
getOffset: state => state.searchParameters.offset,
......@@ -117,6 +121,8 @@ const actions = {
* @param state
* @param options {Object} - Given search parameters
* @param options.query {String} - The given query string
* @param options.minDate {UTC} - The given query string
* @param options.maxDate {UTC} - The given query string
* @param options.fields {String} - The given fields
* @param options.facets {Array} - The active facets
* @param options.limit {Number} - The maximum amount of datasets to fetch
......@@ -141,6 +147,8 @@ const actions = {
geoBounds = GETTERS.getDatasetGeoBounds(state),
minScoring = GETTERS.getMinScoring(state),
dataScope = GETTERS.getDataScope(state),
minDate = GETTERS.getMinDate(state),
maxDate = GETTERS.getMaxDate(state),
append = false,
},
) {
......@@ -160,9 +168,9 @@ const actions = {
}
return new Promise((resolve, reject) => {
this.$datasetService.get(query, fields, locale, limit, page, sort, facetOperator, facetGroupOperator, dataServices, facets, geoBounds, minScoring, dataScope)
this.$datasetService.get(query, fields, locale, limit, page, sort, facetOperator, facetGroupOperator, dataServices, facets, geoBounds, minScoring, dataScope, minDate, maxDate)
.then((response) => {
commit('SET_FIEELDS', response.fields);
commit('SET_FIELDS', response.fields);
commit('SET_AVAILABLE_FACETS', response.availableFacets);
commit('SET_SCORING_COUNT', response.scoringCount);
commit('SET_DATASETS_COUNT', response.datasetsCount);
......@@ -307,6 +315,12 @@ const actions = {
setFields({ commit }, fields) {
commit('SET_FIELDS', fields);
},
setMinDate({ commit }, minDate) {
commit('SET_MINDATE', minDate);
},
setMaxDate({ commit }, maxDate) {
commit('SET_MAXDATE', maxDate);
},
setSort({ commit }, sort) {
commit('SET_SORT', sort);
},
......@@ -406,6 +420,9 @@ const mutations = {
SET_FIELDS(state, fields) {
state.searchParameters.fields = fields;
},
SET_MINDATE(state, minDate) {
state.searchParameters.minDate = minDate;
},
SET_SORT(state, sort) {
state.searchParameters.sort = sort;
},
......
{
"name": "@piveau/piveau-hub-ui-modules",
"private": false,
"version": "4.6.29",
"version": "4.6.30",
"license": "Apache-2.0",
"type": "module",
"exports": {
......