Skip to content

Commit

Permalink
IBX-8706: Fixed filters: language, created date (#1334)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasOsti authored Sep 9, 2024
1 parent aedcbc5 commit 7eb369e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.c-translation-selector {
@include container-box-shadow-right;

position: fixed;
right: 0;
top: 0;
Expand All @@ -13,6 +11,8 @@
transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;
padding: calculateRem(16px);
z-index: 5;
color: $ibexa-color-dark;
box-shadow: calculateRem(4px) calculateRem(22px) calculateRem(47px) 0 rgba($ibexa-color-info, 0.15);

&--hidden {
transform: scaleX(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export const useSearchByQueryFetch = () => {
filters = {},
fullTextCriterion = null,
contentNameCriterion = null,
dateCriterion = null,
useAlwaysAvailable = true,
) => {
const handleFetch = (response) => {
dispatchLoadedLocationsAction({ type: 'CLEAR_LOCATIONS' });
Expand Down Expand Up @@ -75,6 +77,10 @@ export const useSearchByQueryFetch = () => {
query.SubtreeCriterion = subtreePathString;
}

if (dateCriterion) {
query.DateMetadataCriterion = dateCriterion;
}

const isImageCriterionDataEmpty = !imageCriterionData || Object.keys(imageCriterionData).length === 0;

if (!isImageCriterionDataEmpty) {
Expand All @@ -96,7 +102,7 @@ export const useSearchByQueryFetch = () => {

dispatch({ type: SEARCH_START });
return findLocationsBySearchQuery(
{ ...restInfo, query, aggregations, filters, sortClause, sortOrder, limit, offset, languageCode },
{ ...restInfo, query, aggregations, filters, sortClause, sortOrder, limit, offset, languageCode, useAlwaysAvailable },
handleFetch,
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ export const findLocationsBySearchQuery = (
offset = 0,
languageCode = null,
instanceUrl = DEFAULT_INSTANCE_URL,
useAlwaysAvailable = true,
},
callback,
) => {
const useAlwaysAvailable = true;
const body = JSON.stringify({
ViewInput: {
identifier: `udw-locations-by-search-query-${query.FullTextCriterion}`,
Expand Down

0 comments on commit 7eb369e

Please sign in to comment.