diff options
Diffstat (limited to 'views.rkt')
| -rw-r--r-- | views.rkt | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -116,14 +116,16 @@ ;;;;;;;; (h2 () "Recette") - (table ([class "table"]) - (tr (th () "Produit Fertilisant") - (th ([class "text-end"]) "Quantité")) - ,@(for/list ([fertilizer-amount ferti-recipe] - #:when (not (zero? (cdr fertilizer-amount)))) - (match-define (cons fertilizer amount) fertilizer-amount) - `(tr (td () ,(fertilizer-name fertilizer)) - (td ([class "text-end font-monospace"]) ,(round 2 amount))))) + ,(if (ormap (λ (pair) (not (zero? (cdr pair)))) ferti-recipe) + `(table ([class "table"]) + (tr (th "Intrant") + (th ([class "text-end"]) "Quantité (g/L)")) + ,@(for/list ([fertilizer-amount ferti-recipe] + #:when (not (zero? (cdr fertilizer-amount)))) + (match-define (cons fertilizer amount) fertilizer-amount) + `(tr (td () ,(fertilizer-name fertilizer)) + (td ([class "text-end font-monospace"]) ,(round 2 amount))))) + `(p "La recette Ferti requiert au moins un relevé et une cible.")) ;;;;;;;;; |