summaryrefslogtreecommitdiff
path: root/views.rkt
diff options
context:
space:
mode:
Diffstat (limited to 'views.rkt')
-rw-r--r--views.rkt34
1 files changed, 17 insertions, 17 deletions
diff --git a/views.rkt b/views.rkt
index b61842d..c852540 100644
--- a/views.rkt
+++ b/views.rkt
@@ -100,23 +100,23 @@
`(p "La recette Ferti requiert au moins un relevé et une cible."))))
(define (ferti-targets latest-measurement-hash latest-target-hash)
- `((h2 () "Dernière Cible")
- (table ((class "table"))
- (tr (th "Nutriment")
- (th ((class "text-end")) "Dernier Relevé")
- (th ((class "text-end")) "Dernière Cible"))
- ,@(for/list ([n (get-nutrients)])
- (define latest-measurement (hash-ref latest-measurement-hash n #f))
- (define latest-target (hash-ref latest-target-hash n #f))
- `(tr (td ,(nutrient-french-name n))
- (td ((class "text-end font-monospace"))
- ,(if latest-measurement
- (round 2 latest-measurement)
- "—"))
- (td ((class "text-end font-monospace"))
- ,(if latest-target
- (round 2 latest-target)
- "—")))))))
+ `((h2 () "Dernière Cible") (table ((class "table"))
+ (tr (th "Nutriment")
+ (th ((class "text-end")) "Dernier Relevé")
+ (th ((class "text-end")) "Dernière Cible"))
+ ,@(for/list ([n (get-nutrients)])
+ (define latest-measurement
+ (hash-ref latest-measurement-hash n #f))
+ (define latest-target (hash-ref latest-target-hash n #f))
+ `(tr (td ,(nutrient-french-name n))
+ (td ((class "text-end font-monospace"))
+ ,(if latest-measurement
+ (round 2 latest-measurement)
+ "—"))
+ (td ((class "text-end font-monospace"))
+ ,(if latest-target
+ (round 2 latest-target)
+ "—")))))))
(define (ferti-measurements measurements)
`((h2 () "Relevés") (table ((class "table table-striped"))
Copyright 2019--2026 Marius PETER