Refactor & add aggregated entries
This commit is contained in:
		
							
								
								
									
										31
									
								
								src/lib/components/Food/FoodComp.svelte
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								src/lib/components/Food/FoodComp.svelte
									
									
									
									
									
										Normal 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>
 | 
			
		||||
		Reference in New Issue
	
	Block a user