From 8218c3d3c21bfa7c4f3ee4872722b9b1261576fb Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Thu, 7 Sep 2017 19:27:13 +0200 Subject: Add machine mode with title and delete options --- src/actions/interaction-level.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/actions/interaction-level.js') diff --git a/src/actions/interaction-level.js b/src/actions/interaction-level.js index 5ceff500..2003f45e 100644 --- a/src/actions/interaction-level.js +++ b/src/actions/interaction-level.js @@ -1,5 +1,6 @@ export const GO_FROM_BUILDING_TO_ROOM = "GO_FROM_BUILDING_TO_ROOM"; export const GO_FROM_ROOM_TO_RACK = "GO_FROM_ROOM_TO_RACK"; +export const GO_FROM_RACK_TO_MACHINE = "GO_FROM_RACK_TO_MACHINE"; export const GO_DOWN_ONE_INTERACTION_LEVEL = "GO_DOWN_ONE_INTERACTION_LEVEL"; export function goFromBuildingToRoom(roomId) { @@ -29,6 +30,19 @@ export function goFromRoomToRack(tileId) { }; } +export function goFromRackToMachine(position) { + return (dispatch, getState) => { + const {interactionLevel} = getState(); + if (interactionLevel.mode !== "RACK") { + return; + } + dispatch({ + type: GO_FROM_RACK_TO_MACHINE, + position + }); + }; +} + export function goDownOneInteractionLevel() { return { type: GO_DOWN_ONE_INTERACTION_LEVEL -- cgit v1.2.3