Last active
March 2, 2020 21:14
-
-
Save matthewlehner/49b0c5d3e3358f6dc03741f546cdc41a to your computer and use it in GitHub Desktop.
Revisions
-
matthewlehner revised this gist
Mar 2, 2020 . 1 changed file with 18 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,17 +10,32 @@ const voteMachine = Machine({ }, greetingMsg: { on: { GREETING_FINISHED: "pinPromptMsg" } }, pinPromptMsg: { on: { PIN_PROMPT_MSG_FINISHED: "pinPrompt" } }, pinPrompt: { on: { PIN_SUCCESS: "registrationNumberPromptMsg" } }, registrationNumberPromptMsg: { on: { REGISTRATION_PROMPT_MSG_FINISHED: "registrationNumberPrompt" } }, registrationNumberPrompt: { on: { REGISTRATION_NO_SUCCESS: "dobPromptMsg" } }, dobPromptMsg: { on: { DOB_PROMPT_MSG_FINISHED: "dobPrompt" } }, dobPrompt: { -
matthewlehner created this gist
Mar 2, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ const voteMachine = Machine({ id: "Phone Voting", initial: "idle", context: {}, states: { idle: { on: { CALL_ANSWERED: "greetingMsg" } }, greetingMsg: { on: { GREETING_FINISHED: "pinPrompt" } }, pinPrompt: { on: { PIN_SUCCESS: "registrationNumberPrompt" } }, registrationNumberPrompt: { on: { REGISTRATION_NO_SUCCESS: "dobPrompt" } }, dobPrompt: { on: { DOB_SUCCESS: "voteDisclaimerMessage" } }, voteDisclaimerMessage: { on: { VOTE_DISCLAIMER_MESSAGE_COMPLETE: "ballotFlow" } }, ballotFlow: { on: { CAPTURE_ALL_BALLOT_OPTIONS: "recordBallot" } }, recordBallot: { on: { SERVER_RECORDED_BALLOT: "success" } }, success: {} } });