mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-22 19:40:14 -04:00
Display the ingredient form in shopping list
This commit is contained in:
parent
a609db119a
commit
256719a42d
@ -86,12 +86,14 @@ fn shopping_list() -> View<G> {
|
|||||||
iterable: ingredients,
|
iterable: ingredients,
|
||||||
template: |(_k, i)| {
|
template: |(_k, i)| {
|
||||||
let amt = Signal::new(format!("{}", i.amt.normalize()));
|
let amt = Signal::new(format!("{}", i.amt.normalize()));
|
||||||
|
let name = i.name;
|
||||||
|
let form = i.form.map(|form| format!("({})", form)).unwrap_or_default();
|
||||||
view! {
|
view! {
|
||||||
tr {
|
tr {
|
||||||
// TODO(jwall): What is the mechanism for deleting ingredients
|
// TODO(jwall): What is the mechanism for deleting ingredients
|
||||||
// from the list?
|
// from the list?
|
||||||
td { input(bind:value=amt.clone(), type="text") }
|
td { input(bind:value=amt.clone(), type="text") }
|
||||||
td { (i.name) }
|
td { (name) " " (form) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user