Skip to content

Commit

Permalink
geosolutions-it#9683: edit in details epics and selectors to fix FE test
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoudadel54 committed Nov 15, 2023
1 parent 0376bad commit b737bd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions web/client/epics/details.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
import { toggleControl, setControlProperty } from '../actions/controls';

import {
stateMapIdSelector
mapIdSelector
} from '../selectors/map';
import { getDashboardId } from '../selectors/dashboard';

Expand All @@ -33,7 +33,7 @@ export const fetchDataForDetailsPanel = (action$, store) =>
action$.ofType(OPEN_DETAILS_PANEL)
.switchMap(() => {
const state = store.getState();
const mapId = stateMapIdSelector(state);
const mapId = mapIdSelector(state);
const dashboardId = getDashboardId(state);
const detailsUri = detailsUriSelector(state);
const detailsId = getIdFromUri(detailsUri);
Expand Down
6 changes: 3 additions & 3 deletions web/client/selectors/details.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
*/

import { dashboardInfoDetailsSettingsFromIdSelector, getDashboardId, dashbaordInfoDetailsUriFromIdSelector } from "./dashboard";
import { stateMapIdSelector, mapInfoDetailsSettingsFromIdSelector, mapInfoDetailsUriFromIdSelector } from "./map";
import { mapIdSelector, mapInfoDetailsSettingsFromIdSelector, mapInfoDetailsUriFromIdSelector } from "./map";

export const detailsTextSelector = state => state?.details?.detailsText;

export const detailsUriSelector = state => {
const mapId = stateMapIdSelector(state);
const mapId = mapIdSelector(state);
const dashboardId = getDashboardId(state);
// todo: this is now for map and dashboard only, in the future if something else needs to use this like geostory, an additional contional should be added
let detailsUri = dashboardId && dashbaordInfoDetailsUriFromIdSelector(state, dashboardId) || mapId && mapInfoDetailsUriFromIdSelector(state, mapId);
return detailsUri;
};

export const detailsSettingsSelector = state => {
const mapId = stateMapIdSelector(state);
const mapId = mapIdSelector(state);
const dashboardId = getDashboardId(state);
// todo: this is now for map and dashboard only, in the future if something else needs to use this like geostory, an additional contional should be added
let detailsSettings = dashboardId && dashboardInfoDetailsSettingsFromIdSelector(state, dashboardId) || mapId && mapInfoDetailsSettingsFromIdSelector(state, mapId);
Expand Down

0 comments on commit b737bd8

Please sign in to comment.