39 lines
1.6 KiB
Handlebars
39 lines
1.6 KiB
Handlebars
<div class="text-gray-900">
|
|
<div class="p-4 flex">
|
|
<h1 class="text-3xl">
|
|
Produkty
|
|
</h1>
|
|
</div>
|
|
<div class="px-3 py-4 flex justify-center">
|
|
<table class="w-full text-md bg-white shadow-md rounded mb-4">
|
|
<tbody>
|
|
<tr class="border-b">
|
|
<th class="text-left p-3 px-5">Nazwa</th>
|
|
<th class="text-left p-3 px-5">Białko</th>
|
|
<th class="text-left p-3 px-5">Węglowodany</th>
|
|
<th class="text-left p-3 px-5">Tłuszcz</th>
|
|
<th class="text-left p-3 px-5">kcal</th>
|
|
<th></th>
|
|
</tr>
|
|
{{#each this.products as |product|}}
|
|
<tr class="border-b hover:bg-orange-100">
|
|
<td class="p-3 px-5">{{product.name}}</td>
|
|
<td class="p-3 px-5">{{product.p}}</td>
|
|
<td class="p-3 px-5">{{product.c}}</td>
|
|
<td class="p-3 px-5">{{product.f}}</td>
|
|
<td class="p-3 px-5">{{product.kcal}}</td>
|
|
<td class="p-3 px-5 flex justify-end">
|
|
<button
|
|
type="button"
|
|
class="text-sm bg-red-500 hover:bg-red-700 text-white py-1 px-2 rounded focus:outline-none focus:shadow-outline"
|
|
{{on "click" (fn this.onDelete product)}}>
|
|
Usuń
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|