feat: Begins vendor views, working form, and table. Styles need some updates.

This commit is contained in:
2025-01-08 17:01:33 -05:00
parent 2b6e92a5c6
commit f5dbd7e121
12 changed files with 240 additions and 29 deletions

View 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>