-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtable.html
More file actions
46 lines (46 loc) · 2.39 KB
/
Copy pathtable.html
File metadata and controls
46 lines (46 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<div class="flex overflow-scroll flex-col items-start w-full rounded sm:rounded-xl">
<table class="min-w-full rounded border-collapse table-auto sm:rounded-xl">
<thead class="w-full text text-left text-black bg-white rounded-t sm:rounded-t-xl">
<tr class="">
<th class="py-4 px-2 whitespace-nowrap">Image</th>
<th class="py-4 px-2 whitespace-nowrap">Title</th>
<th class="py-4 px-2">QOH</th>
<th class="py-4 px-2">Price</th>
<th class="py-4 px-2">Break At</th>
<th class="py-4 px-2">Bulk Price</th>
<th class="py-4 px-2">price_id</th>
</tr>
</thead>
<tbody class="text-gray-700">
@for product in products
<tr class="even:bg-gray-100 bg-white border-y border-gray-200 ring-orange-300 ring-inset hover:ring rounded-xl">
<td class="py-2 px-2"><img src="@product.img" alt="" class="w-8 h-8 md:w-16 md:h-16" /></td>
<td class="py-2 px-2 text-black">@product.name</td>
<td class="py-2 px-2 w-min">
@include 'spinner.html'
<input class="w-5/6 inline" type="number" id="new_q@product.id" name="new_q@product.id"
hx-post="/update_q/@product.id"
hx-swap="morph"
hx-trigger="keyup changed delay:1000ms, new_q@product.id"
hx-indicator=".htmx-indicator"
value="@product.q_on_hand">
</td>
<td class="py-2 px-2">${product.default_price / f64(100):.2f}</td>
@if product.price_break_at == 0
<td class="py-2 px-2"></td>
<td class="py-2 px-2"></td>
@else
<td class="py-2 px-2">@product.price_break_at</td>
<td class="py-2 px-2">${product.bulk_price / f64(100):.2f}</td>
@end
<td class="py-2 px-2 whitespace-nowrap">
Default Price: <span class="font-mono pl-1">@product.default_price_id</span>
@if product.price_break_at != 0
<br>Bulk Price: <span class="font-mono pl-6">@product.bulk_price_id</span>
@end
</td>
</tr>
@end
</tbody>
</table>
</div>