Fix #1: Add global drink statistics #5

Merged
soerface merged 6 commits from issue-1_drinks-stats into main 2026-03-29 22:34:25 +00:00
Owner
No description provided.
Show a barchart as the background of the table row
Some checks are pending
CI / CI optimization (pull_request) Waiting to run
CI / Release (semantic, dry) (pull_request) Blocked by required conditions
CI / pre-commit (pull_request) Blocked by required conditions
CI / Build (pull_request) Blocked by required conditions
CI / Release (semantic) (pull_request) Blocked by required conditions
3bc6a04d36
@ -0,0 +24,4 @@
except ValueError:
# Fallback to default dates if format is invalid
from_date = date.today() - timedelta(days=30)
to_date = date.today()
Owner
  1. Die defaults stehen so zwei mal im code.
  2. Ich glaub wenn nur eins von beiden failed werden beide auf den default gesetzt

Wieso nicht sowas wie (pseudocode I'm not a python)

from_date = date.today() - timedelta(days=30)
to_date = date.today()

try:
  from_date = date.fromisoformat(request.form.get("from"))
except:
  # nothing

try:
  to_date = date.fromisoformat(request.form.get("to"))
except:
  # nothing
  
1. Die defaults stehen so zwei mal im code. 2. Ich glaub wenn nur eins von beiden failed werden beide auf den default gesetzt Wieso nicht sowas wie (pseudocode I'm not a python) ```python from_date = date.today() - timedelta(days=30) to_date = date.today() try: from_date = date.fromisoformat(request.form.get("from")) except: # nothing try: to_date = date.fromisoformat(request.form.get("to")) except: # nothing ```
Author
Owner

Joah hast schon recht, war nur faul. Sekunde, ich push was in der Richtung

Joah hast schon recht, war nur faul. Sekunde, ich push was in der Richtung
Author
Owner

Thx, fixed! Statt default am Anfang, default im except block

Thx, fixed! Statt default am Anfang, default im except block
Simplify from / to date parsing
Some checks are pending
CI / CI optimization (pull_request) Waiting to run
CI / Release (semantic, dry) (pull_request) Blocked by required conditions
CI / pre-commit (pull_request) Blocked by required conditions
CI / Build (pull_request) Blocked by required conditions
CI / Release (semantic) (pull_request) Blocked by required conditions
f0222d7fa2
Author
Owner

Screenshot im Ticket, falls jemand sich den Style anschauen mag ohne Projekt auszuchecken: #1 (comment)

Screenshot im Ticket, falls jemand sich den Style anschauen mag ohne Projekt auszuchecken: https://code.flipdot.org/flipdot/drinks-touch/issues/1#issuecomment-905
Lenny approved these changes 2026-03-29 22:29:36 +00:00
Lenny left a comment
Owner

LGTM 👍

LGTM 👍
Remove "Home" link from navbar
Some checks failed
CI / CI optimization (pull_request) Has been cancelled
CI / Release (semantic, dry) (pull_request) Has been cancelled
CI / pre-commit (pull_request) Has been cancelled
CI / Build (pull_request) Has been cancelled
CI / Release (semantic) (pull_request) Has been cancelled
4b26839b92
soerface deleted branch issue-1_drinks-stats 2026-03-29 22:34:25 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
flipdot/drinks-touch!5
No description provided.