diff --git a/app/models/order.py b/app/models/order.py index 4e9f2bf..841271c 100644 --- a/app/models/order.py +++ b/app/models/order.py @@ -69,6 +69,9 @@ class Order(db.Model): return group + def is_closed(self) -> bool: + return datetime.now() > self.stoptime + def can_close(self, user_id: int) -> bool: "Check if a user can close the Order" if self.stoptime and self.stoptime < datetime.now(): diff --git a/app/static/css/main.css b/app/static/css/main.css index 03e8c6b..646270a 100644 --- a/app/static/css/main.css +++ b/app/static/css/main.css @@ -68,9 +68,18 @@ body { line-height: 1.2; } +.showcase { + padding: 0; + max-width: 500px; + margin: 0 auto; +} + .showcase h1 { - font-size: 150%; - font-weight: bold; + font-size: 200%; + margin: 0 ; + padding: 0.4em 0 0.2em; + border-bottom: 1px dashed var(--dGray1); + text-align: center; } .showcase h2 { font-size: 110%; @@ -78,6 +87,22 @@ body { margin-bottom: 0; } +.showcase .open-order-warning { + font-size: 150%; + text-align: center; + padding: 1em 0.5em; + background-color: rgba(255, 0, 0, 0.1); +} + +.showcase .dish { + padding: 0 0.5em; +} +@media (min-width: 500px) { + .showcase .dish { + padding: 0 1em; + } +} + .showcase .quantity { font-size: 110%; } @@ -89,6 +114,13 @@ body { margin: 0.7em 0 0.3em; } +.showcase .total { + border-top: 1px dashed var(--dGray1); + text-align: center; + padding: 0.5em 0; + margin-top: 1.3em; +} + .order_row { background: var(--dGray4); } diff --git a/app/templates/order.html b/app/templates/order.html index 1fc3b78..cfa2828 100644 --- a/app/templates/order.html +++ b/app/templates/order.html @@ -103,12 +103,14 @@ {% for key, value in order.group_by_dish().items() -%}
{% for comment in value["comments"] -%} -- {{ comment }}
+ - {% if comment %}{{ comment }}
+ {% else %}No comment
+ {% endif %}
{% endfor %}
-