feat: add full/empty weight fields to Product and last_weighed_at to ProductInventory
Adds full_weight_g and empty_weight_g to ProductBase (inherited by Product and response models) so per-product package weight specs are captured. Adds last_weighed_at to ProductInventory to record when a package was last weighed. Wires up all fields through API schemas, frontend types, forms, and the product detail page (add/edit/display). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2b73dc63ac
commit
43fcba4de6
8 changed files with 255 additions and 16 deletions
|
|
@ -668,6 +668,32 @@
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div class="space-y-2">
|
||||
<Label for="full_weight_g">Full weight (g)</Label>
|
||||
<Input
|
||||
id="full_weight_g"
|
||||
name="full_weight_g"
|
||||
type="number"
|
||||
min="0"
|
||||
step="0.1"
|
||||
placeholder="e.g. 120"
|
||||
value={product?.full_weight_g ?? ''}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="space-y-2">
|
||||
<Label for="empty_weight_g">Empty weight (g)</Label>
|
||||
<Input
|
||||
id="empty_weight_g"
|
||||
name="empty_weight_g"
|
||||
type="number"
|
||||
min="0"
|
||||
step="0.1"
|
||||
placeholder="e.g. 30"
|
||||
value={product?.empty_weight_g ?? ''}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="space-y-2">
|
||||
<Label for="pao_months">PAO (months)</Label>
|
||||
<Input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue