Experiencia para realizar la búsqueda de treasures
Aquí te dejamos el código utilizado en esta lección:
Experience SearchTreasure {
String textFirstSearch value("Search by points") as Label
Bool searchByPoints as checkbox
Array points as Select
String textSecondSarch value("Search by treasure status") as Label
Array statusTreasure as Select
Array listTreasures as List
}
Model TreasureSearch {
String name
Integer points
String hasBeenFound
String creatorName
}
Module Accounts {
void navigateToMainMenu () {
Welcome welcomeDataSource = Welcome()
welcomeDataSource.greetings = "Welcome " + loggedUser.name + " to the treasure hunt app!"
broker.ui.present("appmenu", welcomeDataSource, UserProfile(), CreateTreasure(), SearchTreasure())
}
}