refactor(FE-212): add warehouse information to PurchaseOrderAcceptApprovalForm

This commit is contained in:
rstubryan
2025-11-20 23:31:35 +07:00
parent c8b3e52ac0
commit c1d71ee3c6
@@ -195,6 +195,9 @@ const PurchaseOrderAcceptApprovalForm = ({
product_category: item.product.product_category || '', product_category: item.product.product_category || '',
uom: item.product.uom || { name: 'unit' }, uom: item.product.uom || { name: 'unit' },
}, },
warehouse: {
name: item.warehouse?.name || '',
},
})); }));
} }
@@ -330,6 +333,7 @@ const PurchaseOrderAcceptApprovalForm = ({
<thead> <thead>
<tr> <tr>
<th>Produk</th> <th>Produk</th>
<th>Gudang</th>
<th>Jumlah</th> <th>Jumlah</th>
<th>Satuan</th> <th>Satuan</th>
<th> <th>
@@ -388,6 +392,18 @@ const PurchaseOrderAcceptApprovalForm = ({
value={purchaseItem?.value || 0} value={purchaseItem?.value || 0}
/> />
</td> </td>
<td>
<TextInput
name={`items.${idx}.warehouse`}
type='text'
value={purchaseItem?.warehouse?.name || ''}
readOnly={true}
className={{
wrapper: 'min-w-40 md:min-w-52 lg:min-w-64',
}}
disabled={true}
/>
</td>
<td> <td>
<TextInput <TextInput
name={`items.${idx}.quantity`} name={`items.${idx}.quantity`}