Add lot_prefix to products; compose LOT number from prefix + date suffix
Deploy / deploy (push) Successful in 14s

Products now have a configurable lot_prefix (e.g. "112"). In the batch form
the prefix is shown read-only next to the suffix input (JJMMTT), and the full
lot_number (e.g. "112-260912") is composed automatically and stored.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Malek TellissiandClaude Sonnet 4.6 committed 2026-09-12 20:35:37 +02:00
1 parent e9734c2590
commit 5c034ec895
6 files changed
+87 -12

No files matched your search

+2 -1
View File
@@ -110,7 +110,7 @@ GET https://api.sms.spices.blue/api/v1/{lot_number}
```json
{
"data": {
"lot_number": "LOT-2024-001",
"lot_number": "112-260912",
"produced_at": "2024-10-01",
"expires_at": "2026-10-01",
"units_produced": 50,
@@ -220,6 +220,7 @@ Table packings {
Table products {
id int [pk]
title text
lot_prefix varchar -- Präfix für Chargennummer, z.B. "112"
images json
description text
recipes_id int [ref: > recipes.id]