Last active
June 8, 2018 07:57
-
-
Save romankolpak/b0796c9c1a43dcd11c84a6723a5d3e8e to your computer and use it in GitHub Desktop.
My Awesome Sketch
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 characters
My Awesome Sketch | |
Home | |
create debt -> Who paid | |
Who paid | |
person selected -> Paid for whom | |
back clicked -> Home | |
Paid for whom | |
person selected -> Amount | |
back clicked -> Who paid | |
Amount | |
amount selected -> Success | |
cancel clicked -> Home | |
Success |
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 characters
function render(model){ | |
let current_state_name = model.active_states[0].name; | |
if (current_state_name == 'Home') { | |
return $("h1", | |
{style: {color: "darkBlue"}}, | |
`The current state is: ${current_state_name}`); | |
} | |
if (current_state_name == 'Who paid') { | |
return $("select", {}, [ | |
$('option', {value:"1"}, "), | |
$('option', {value:"2", label: "2"}, "Two") | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment