Add default servings to profile + choose servings when scheduling

This commit is contained in:
Greg Burri 2025-02-03 23:42:07 +01:00
parent d8641d4db6
commit ae6da1a5ae
13 changed files with 70 additions and 34 deletions

View file

@ -24,9 +24,12 @@ pub fn setup_page(recipe_id: i64) -> Result<(), JsValue> {
let add_to_planner: Element = selector("#recipe-view .add-to-planner");
EventListener::new(&add_to_planner, "click", move |_event| {
spawn_local(async move {
modal_dialog::show_and_initialize("#hidden-templates .calendar", async |element| {
calendar::setup(element);
})
modal_dialog::show_and_initialize(
"#hidden-templates .date-and-servings",
async |element| {
calendar::setup(element.selector(".calendar"));
},
)
.await;
});
})