feat: Begins vendor views, working form, and table. Styles need some updates.
This commit is contained in:
34
Resources/Views/vendor-table.leaf
Normal file
34
Resources/Views/vendor-table.leaf
Normal file
@@ -0,0 +1,34 @@
|
||||
<table id="vendor-table">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Branches</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tbody id="vendor-table-body">
|
||||
#for(vendor in vendors):
|
||||
<tr id="vendor_#(vendor.id)">
|
||||
<td>#capitalized(vendor.name)</td>
|
||||
<td>
|
||||
#if(vendor.branches):
|
||||
<ul>
|
||||
#for(branch in vendor.branches):
|
||||
<li>#capitalized(branch.name)</li>
|
||||
#endfor
|
||||
</ul>
|
||||
#endif
|
||||
</td>
|
||||
<!-- TODO: Add edit button -->
|
||||
<td>
|
||||
<a class="btn btn-delete"
|
||||
hx-delete="/vendors/#(vendor.id)"
|
||||
hx-target="closest tr"
|
||||
hx-swap="outerHTML swap:0.5s"
|
||||
hx-confirm="Are you sure you want to delete this vendor?"
|
||||
>
|
||||
<img src="images/trash-can.svg" alt="Delete">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
#endfor
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user