diff --git a/src/dinner.py b/src/dinner.py index 6f072e9..bb66bba 100644 --- a/src/dinner.py +++ b/src/dinner.py @@ -156,10 +156,12 @@ def dinner(): result = fetch_roll_result() can_roll = (check_roll() == 1) all_choice = list(map(lambda x: {'name': x[0], 'label': x[1]}, fetch_all_menu())) + summary_keys = list(filter(lambda x: x in summary.keys(), map(lambda y: y['name'], all_choice))) return render_template('dinner.html', all_choice=all_choice, menu=menu, summary=summary, + summary_keys=summary_keys, total_vote=total_vote, result=result, can_roll=can_roll, diff --git a/templates/dinner.html b/templates/dinner.html index 840b216..c2e4222 100644 --- a/templates/dinner.html +++ b/templates/dinner.html @@ -18,11 +18,14 @@ {% for choice in all_choice %}
- - + +
{% endfor %} @@ -36,7 +39,7 @@