Refactor & add aggregated entries

This commit is contained in:
2024-06-12 10:06:54 +02:00
parent a7d76a1f14
commit 5b28ea62b1
7 changed files with 129 additions and 54 deletions

View File

@@ -0,0 +1,31 @@
<script lang="ts">
import type { Food } from '$lib/database/food'
export let item: Food
console.log(item)
</script>
<template>
<tr class="border-b border-gray-200 dark:border-gray-700">
<th scope="row"
class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap bg-gray-50 dark:text-white dark:bg-gray-800">
{item.date}
</th>
<td class="px-6 py-4">
{item.food}
</td>
<td class="px-6 py-4 bg-gray-50 dark:bg-gray-800">
{item.description}
</td>
<td class="px-6 py-4">
{item.amount}
</td>
<td class="px-6 py-4 bg-gray-50 dark:bg-gray-800">
{item.per100}
</td>
<td class="px-6 py-4">
{item.energy}
</td>
</tr>
</template>