mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-07-16 22:05:20 +00:00
fix(documents): preserve edited line-item description (#658)
The per-line item description typed into the row's textarea was never saved. BaseItemSelect's description field pushes edits out only via an `update:description` emit, but DocumentItemRow (the single shared row used by invoices, estimates, and recurring invoices) wired only `@search` and `@select` — so the emit was dropped and `form.items[index].description` never updated. On submit the field was lost; a catalog item's description also reverted on the next re-render. Capture the event and route it through the existing `updateItemAttribute` store updater, mirroring how name/quantity/price/discount already sync. One fix covers all three document types since they share the row. Also add the missing `items.*.description` nullable rule to RecurringInvoiceRequest for parity with the invoice/estimate requests. The backend already persisted and returned description correctly; this was purely a dropped frontend event.
This commit is contained in:
committed by
GitHub
parent
f007daa65b
commit
e41ee8083d
@@ -83,6 +83,9 @@ class RecurringInvoiceRequest extends FormRequest
|
||||
'items.*' => [
|
||||
'required',
|
||||
],
|
||||
'items.*.description' => [
|
||||
'nullable',
|
||||
],
|
||||
];
|
||||
|
||||
$customer = Customer::find($this->customer_id);
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
:store="store"
|
||||
@search="searchVal"
|
||||
@select="onSelectItem"
|
||||
@update:description="updateItemAttribute('description', $event)"
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user