From b75fd3a2c01f943b099ef5809987c4a72a3a26df Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Mon, 10 Nov 2025 19:31:54 +0100 Subject: Add ferti recipe table to the index page. --- models/fertilizer-product.rkt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'models') diff --git a/models/fertilizer-product.rkt b/models/fertilizer-product.rkt index b93f082..2322cc0 100644 --- a/models/fertilizer-product.rkt +++ b/models/fertilizer-product.rkt @@ -4,9 +4,11 @@ ;; Struct definitions fertilizer-product fertilizer-product? - fertilizer-product-id fertilizer-product-brand-name + fertilizer-product-id (rename-out - [fertilizer-product-nutrient-values fertilizer-product-values]) + [fertilizer-product-canonical-name fertilizer-name] + [fertilizer-product-nutrient-values fertilizer-product-values] + [fertilizer-product-brand-name fertilizer-brand-name]) ;; SQL CRUD (contract-out [create-fertilizer-product! (->* (string? @@ -167,11 +169,10 @@ (acc canonical-name brand-name (list nv-pair))))) - (and A - (fertilizer-product the-id - (acc-canonical-name A) - (reverse (acc-pairs A)) - (acc-brand-name A)))])) + (fertilizer-product the-id + (acc-canonical-name A) + (reverse (acc-pairs A)) + (acc-brand-name A))])) (define (get-fertilizer-product-values fertilizer-product) (for/list ([(nutrient-id name formula value_ppm) -- cgit v1.2.3