diff options
| author | Marius Peter <dev@marius-peter.com> | 2025-11-10 19:31:54 +0100 |
|---|---|---|
| committer | Marius Peter <dev@marius-peter.com> | 2025-11-10 19:31:54 +0100 |
| commit | b75fd3a2c01f943b099ef5809987c4a72a3a26df (patch) | |
| tree | d14188ff73c1fa7aef267f96b5ae129da919850c /models | |
| parent | 53a35b1eb0bc90b59b598e87f30375511089d771 (diff) | |
Add ferti recipe table to the index page.
Diffstat (limited to 'models')
| -rw-r--r-- | models/fertilizer-product.rkt | 15 |
1 files changed, 8 insertions, 7 deletions
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) |