def edit_recipe(self, *args): recipe_entry_store.reset(recipe_entry_store.state.recipe) store.push_page(AddRecipePage)
def add_recipe(self, *args): recipe_entry_store.reset() store.push_page(AddRecipePage)
def on_load(error, result): recipe_entry_store.state.recipe = result store.push_page(ViewRecipePage)
def __init__(self): self.state = store.state # track store.state store.push_page(InitializingPage)
def open_ingredients(self, *args): store.push_page(AddIngredientPage)
def open_configuration(self): store.push_page(ConfigurationPage)
def add_items(self, *args): store.push_page(AddItemsPage)
def add_recipe(self, day_index, meal): plan_store.state.day_index = day_index plan_store.state.meal = meal store.push_page(ChooseRecipePage)
def on_loaded(error, plan): plan_store.state.plan = plan store.push_page(PlanPage)
def add_plan(self, *args): plan_store.new_plan() store.push_page(PlanPage)