Skip to content

Instantly share code, notes, and snippets.

@lifedraft
Last active March 3, 2020 13:20
Show Gist options
  • Save lifedraft/72a2b8c513e5e5fd10a7bee89d1bace8 to your computer and use it in GitHub Desktop.
Save lifedraft/72a2b8c513e5e5fd10a7bee89d1bace8 to your computer and use it in GitHub Desktop.
Add to cart V1*
Add to cart V1*
Click -> Cart Check
Add product to cart
Loading*
Success -> Success
Fail -> Response evaluate
Cart Check
Walk through -> Add product to cart
Cart state fetched action required -> Response evaluate
HTTP_Failed -> Error
Response evaluate
Needs flight -> Open Flight modal
Known rule engine error -> Error
Unknown error -> Error
Open Flight modal
Close after success -> ResetForm
Cancel -> Add to cart V1
ResetForm
* -> Add to cart V1
Success
Animation end -> Add to cart V1
Error
Animation end -> Add to cart V1
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment