Die Daten für die Ansichten werden von einer API abgefragt.

This commit is contained in:
2021-04-09 18:20:47 +02:00
parent 7f8a50799f
commit 9d5af9a0fb
6 changed files with 122 additions and 55 deletions
+23 -18
View File
@@ -1,5 +1,6 @@
<script>
export let params;
console.log(params)
</script>
<svelte:head>
@@ -11,25 +12,29 @@
<h1>{params.title}</h1>
</header>
<article>
<table>
<thead>
<tr>
<th>Zeitraum</th>
<th>Arbeitstage</th>
<th>Arbeitsstunden</th>
<th>Über- / Unterstunden</th>
</tr>
</thead>
<tbody>
{#each params.records as record}
{#if params.isLoading === true}
<p>Loading...</p>
{:else}
<table>
<thead>
<tr>
<td>{record.period}</td>
<td>{record.workingDays}</td>
<td>{record.totalHours}</td>
<td>{record.overtime}</td>
<th>Zeitraum</th>
<th>Arbeitstage</th>
<th>Arbeitsstunden</th>
<th>Über- / Unterstunden</th>
</tr>
{/each}
</tbody>
</table>
</thead>
<tbody>
{#each params.records as record}
<tr>
<td>{record.period}</td>
<td>{record.workingDays}</td>
<td>{record.totalHours}</td>
<td>{record.overtime}</td>
</tr>
{/each}
</tbody>
</table>
{/if}
</article>
</section>