-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
263 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { | ||
ADD_STEPS_TO_GROUP, | ||
CLEAR_GROUP, | ||
CREATE_GROUP, | ||
SELECT_STEP_FOR_GROUP, | ||
} from '../reducers' | ||
|
||
export interface SaveGroupAction { | ||
type: typeof CREATE_GROUP | ||
payload: { groupName: string } | ||
} | ||
export interface AddStepToGroupAction { | ||
type: typeof ADD_STEPS_TO_GROUP | ||
payload: { groupName: string; stepIds: string[] } | ||
} | ||
export interface ClearGroupAction { | ||
type: typeof CLEAR_GROUP | ||
} | ||
export interface SelectedStepForGroupAction { | ||
type: typeof SELECT_STEP_FOR_GROUP | ||
payload: { stepId: string } | ||
} | ||
|
||
export const addStepToGroup = ( | ||
args: AddStepToGroupAction['payload'] | ||
): AddStepToGroupAction => ({ | ||
type: ADD_STEPS_TO_GROUP, | ||
payload: args, | ||
}) | ||
|
||
export const createGroup = ( | ||
args: SaveGroupAction['payload'] | ||
): SaveGroupAction => ({ | ||
type: CREATE_GROUP, | ||
payload: args, | ||
}) | ||
|
||
export const selectStepForGroup = ( | ||
args: SelectedStepForGroupAction['payload'] | ||
): SelectedStepForGroupAction => ({ | ||
type: SELECT_STEP_FOR_GROUP, | ||
payload: args, | ||
}) | ||
|
||
export const clearGroup = (): ClearGroupAction => ({ | ||
type: CLEAR_GROUP, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.