mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-22 19:40:14 -04:00
Formatting for shopping list
This commit is contained in:
parent
9593d5b13d
commit
1797963dd0
@ -118,7 +118,7 @@ fn shopping_list() -> View<G> {
|
|||||||
cloned!((table_view, ingredients, filtered_keys, modified_amts) => move || {
|
cloned!((table_view, ingredients, filtered_keys, modified_amts) => move || {
|
||||||
if ingredients.get().len() > 0 {
|
if ingredients.get().len() > 0 {
|
||||||
let t = view ! {
|
let t = view ! {
|
||||||
table(class="shopping-list page-breaker table table-striped table-condensed table-responsive") {
|
table(class="pad-top shopping-list page-breaker table table-striped table-condensed table-responsive") {
|
||||||
tr {
|
tr {
|
||||||
th { " Quantity " }
|
th { " Quantity " }
|
||||||
th { " Ingredient " }
|
th { " Ingredient " }
|
||||||
@ -153,13 +153,13 @@ fn shopping_list() -> View<G> {
|
|||||||
);
|
);
|
||||||
// TODO(jwall): Sort by categories and names.
|
// TODO(jwall): Sort by categories and names.
|
||||||
view! {
|
view! {
|
||||||
h1 { "Shopping List " input(type="button", value="Reset", class="no-print", on:click=cloned!((ingredients_map, filtered_keys, app_service, modified_amts) => move |_| {
|
h1 { "Shopping List " }
|
||||||
|
input(type="button", value="Reset", class="no-print", on:click=cloned!((ingredients_map, filtered_keys, app_service, modified_amts) => move |_| {
|
||||||
ingredients_map.set(app_service.get_shopping_list());
|
ingredients_map.set(app_service.get_shopping_list());
|
||||||
// clear the filter_signal
|
// clear the filter_signal
|
||||||
filtered_keys.set(HashSet::new());
|
filtered_keys.set(HashSet::new());
|
||||||
modified_amts.set(HashMap::new());
|
modified_amts.set(HashMap::new());
|
||||||
}))}
|
}))
|
||||||
|
|
||||||
(table_view.get().as_ref().clone())
|
(table_view.get().as_ref().clone())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user