feat: add low-stock threshold field to AddItemForm (#67)
This commit is contained in:
@@ -57,6 +57,21 @@
|
||||
/>
|
||||
</UFormGroup>
|
||||
|
||||
<!-- Low Stock Threshold -->
|
||||
<UFormGroup
|
||||
label="Low Stock Alert"
|
||||
hint="Optional - Alert when quantity falls below this"
|
||||
>
|
||||
<UInput
|
||||
v-model.number="form.low_stock_threshold"
|
||||
type="number"
|
||||
min="0"
|
||||
step="0.1"
|
||||
placeholder="e.g. 2"
|
||||
size="lg"
|
||||
/>
|
||||
</UFormGroup>
|
||||
|
||||
<!-- Notes -->
|
||||
<UFormGroup label="Notes" hint="Optional">
|
||||
<UTextarea
|
||||
@@ -121,6 +136,7 @@ const form = reactive({
|
||||
quantity: 1,
|
||||
unit_id: '',
|
||||
expiry_date: '',
|
||||
low_stock_threshold: null as number | null,
|
||||
notes: ''
|
||||
})
|
||||
|
||||
@@ -210,6 +226,7 @@ const handleSubmit = async () => {
|
||||
quantity: form.quantity,
|
||||
unit_id: form.unit_id,
|
||||
expiry_date: form.expiry_date || null,
|
||||
low_stock_threshold: form.low_stock_threshold,
|
||||
notes: form.notes.trim() || null
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user