Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/#505' into allfunctionality
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskovar-m2ms committed Jan 26, 2021
2 parents 80744db + d1b73f2 commit 7b5b6e5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
13 changes: 4 additions & 9 deletions js/components/preview/compounds/redux/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ export const handleClickOnCompound = ({ event, data, majorViewStage, index }) =>
}

if (isSelectedID !== undefined) {
await dispatch(removeSelectedCompoundClass(index));
dispatch(removeSelectedCompoundClass(index));
dispatch(removeFromToBuyList(data, index));
} else {
await dispatch(addSelectedCompoundClass(currentCompoundClass, index));
dispatch(appendToBuyList(Object.assign({}, data, { class: currentCompoundClass })), index);
dispatch(addSelectedCompoundClass(currentCompoundClass, index));
dispatch(appendToBuyList(Object.assign({}, data, { class: currentCompoundClass }), index));
}
}
};
Expand All @@ -234,12 +234,7 @@ export const handleBuyListAll = ({ isSelected, items, majorViewStage }) => (disp
if (isSelected === false) {
dispatch(clearCompounds(items, majorViewStage));
} else {
for (var item in items) {
let index = item.compoundId;
dispatch(appendToBuyList(item, index, true));
dispatch(addSelectedCompoundClass(item.class, index));
}
dispatch(appendToBuyListAll(items));
dispatch(selectAllCompounds());
}
};

Expand Down
4 changes: 2 additions & 2 deletions js/reducers/tracking/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1472,10 +1472,10 @@ const handleRedoAction = (action, stages) => (dispatch, getState) => {
dispatch(handleVectorAction(action, false));
break;
case actionType.VECTOR_COUMPOUND_ADDED:
dispatch(handleVectorCompoundAction(action, true));
dispatch(handleVectorCompoundAction(action, true, majorViewStage));
break;
case actionType.VECTOR_COUMPOUND_REMOVED:
dispatch(handleVectorCompoundAction(action, false));
dispatch(handleVectorCompoundAction(action, false, majorViewStage));
break;
case actionType.CLASS_SELECTED:
dispatch(handleClassSelectedAction(action, true));
Expand Down
6 changes: 3 additions & 3 deletions js/reducers/tracking/trackingActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ export const findTrackAction = (action, state) => {
object_type: objectType,
object_name: objectName,
object_id: objectName,
compoundId: action.item.compoundId,
compoundId: action.index,
item: action.item,
text: `${actionDescription.VECTOR} ${objectName} ${actionDescription.ADDED} ${actionDescription.TO_SHOPPING_CART}`
};
Expand All @@ -391,7 +391,7 @@ export const findTrackAction = (action, state) => {
object_type: objectType,
object_name: objectName,
object_id: objectName,
compoundId: action.item.compoundId,
compoundId: action.index,
item: action.item,
text: `${actionDescription.VECTOR} ${objectName} ${actionDescription.REMOVED} ${actionDescription.FROM_SHOPPING_CART}`
};
Expand Down Expand Up @@ -486,7 +486,7 @@ export const findTrackAction = (action, state) => {
object_id: objectName,
oldValue: oldObjectName,
value: objectName,
text: `${actionDescription.CLASS} ${objectName} ${actionDescription.SELECTED}`
text: `${actionDescription.CLASS} ${actionDescription.CHANGED} from value: ${oldObjectName} to value: ${objectName}`
};
}
} else if (action.type === previewCompoundConstants.SET_COMPOUND_CLASSES) {
Expand Down

0 comments on commit 7b5b6e5

Please sign in to comment.