Created
September 12, 2023 08:52
-
-
Save romaintailhurat/3818b26d1ac2ef0ea23796407bfa11fc to your computer and use it in GitHub Desktop.
Questionnaires list filtering
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
| Questionnaires list filtering | |
| Empty | |
| type APP-> With input | |
| With input | |
| cancel -> Empty |
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
| let fruits = ["Apple", "Banana", "Cherry", "Durian", "Evi", | |
| "Fragola", "Fraise", "Kiwi", "Litchi", "Orange"] | |
| function render(model){ | |
| let current_state_name = model.active_states[0].name; | |
| if (current_state_name === "Empty") { | |
| return $("h1", | |
| {style: {color: "darkBlue"}}, | |
| "No input", | |
| $("div", | |
| $("ul", | |
| $("li", "Apple"), | |
| $("li", "Banana"), | |
| $("li", "Cherry") | |
| ) | |
| ) | |
| ); | |
| } | |
| if (current_state_name === "With input") { | |
| return $("h1", | |
| {style: {color: "darkBlue"}}, | |
| "Input is 'APP'", | |
| $("div", | |
| $("ul", | |
| $("li", "Apple") | |
| ) | |
| ) | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment