feat: Adds purchase-order form only renders a new row rather than whole table.

This commit is contained in:
2025-01-09 22:34:49 -05:00
parent c4410706fd
commit 3f30327fd8
5 changed files with 35 additions and 16 deletions

View File

@@ -0,0 +1,13 @@
<tr id="#(id)">
<td>#(id)</td>
<td>#(workOrder)</td>
<td>#(customer)</td>
<td>#capitalized(vendorBranch.vendor.name) - #capitalized(vendorBranch.name)</td>
<td>#(materials)</td>
<td>#capitalized(createdFor.firstName) #capitalized(createdFor.lastName)</td>
<td>#(createdBy.username)</td>
<td>#capitalized(truckStock)</td>
<td>
<!-- TODO: add buttons here -->
</td>
</tr>

View File

@@ -2,6 +2,7 @@
<tr>
<th>PO</th>
<th>Work Order</th>
<th>Customer</th>
<th>Vendor</th>
<th>Materials</th>
<th>Created For</th>
@@ -11,18 +12,7 @@
</tr>
<tbody id="po-table-body">
#for(po in purchaseOrders):
<tr id="po_#(po.id)">
<td>#(po.id)</td>
<td>#(po.workOrder)</td>
<td>#capitalized(po.vendorBranch.vendor.name) - #capitalized(po.vendorBranch.name)</td>
<td>#(po.materials)</td>
<td>#capitalized(po.createdFor.firstName) #capitalized(po.createdFor.lastName)</td>
<td>#(po.createdBy.username)</td>
<td>#capitalized(po.truckStock)</td>
<td>
<!-- TODO: add buttons here -->
</td>
</tr>
#extend("purchaseOrders/table-row", po)
#endfor
</tbody>
</table>