add empty state for runners_laptime
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Philipp Dormann 2023-04-15 20:37:26 +02:00
parent 431fc5a047
commit 8139a3f60b
Signed by: philipp
GPG Key ID: 3BB9ADD52DCA4314

View File

@ -241,51 +241,55 @@
>
{$_("top-laeufer")} ({$_("rundenzeit")})
</h1>
<table class="table p-4 bg-white shadow rounded-lg w-full">
<thead>
<tr>
<th
class="border p-4 dark:border-dark-5 whitespace-nowrap font-normal text-gray-900"
>
{$_("platz")}
</th>
<th
class="border p-4 dark:border-dark-5 whitespace-nowrap font-normal text-gray-900"
>
{$_("laeufer")}
</th>
<th
class="border p-4 dark:border-dark-5 whitespace-nowrap font-normal text-gray-900"
>
{$_("organisation")}
</th>
<th
class="border p-4 dark:border-dark-5 whitespace-nowrap font-normal text-gray-900"
>
{$_("schnellste-rundenzeit")}
</th>
</tr>
</thead>
<tbody>
{#each runners_by_laptime as r, i}
<tr class="text-gray-700">
<td class="border p-4 dark:border-dark-5">
{i + 1}
</td>
<td class="border p-4 dark:border-dark-5">
{r.firstname}
{r.lastname}
</td>
<td class="border p-4 dark:border-dark-5">
{r.group.name}
</td>
<td class="border p-4 dark:border-dark-5">
{format_laptime(r.minLaptime)}
</td>
{#if runners_by_laptime.length === 0}
<p class="w-full text-center text-3xl">Noch keine Daten...</p>
{:else}
<table class="table p-4 bg-white shadow rounded-lg w-full">
<thead>
<tr>
<th
class="border p-4 dark:border-dark-5 whitespace-nowrap font-normal text-gray-900"
>
{$_("platz")}
</th>
<th
class="border p-4 dark:border-dark-5 whitespace-nowrap font-normal text-gray-900"
>
{$_("laeufer")}
</th>
<th
class="border p-4 dark:border-dark-5 whitespace-nowrap font-normal text-gray-900"
>
{$_("organisation")}
</th>
<th
class="border p-4 dark:border-dark-5 whitespace-nowrap font-normal text-gray-900"
>
{$_("schnellste-rundenzeit")}
</th>
</tr>
{/each}
</tbody>
</table>
</thead>
<tbody>
{#each runners_by_laptime as r, i}
<tr class="text-gray-700">
<td class="border p-4 dark:border-dark-5">
{i + 1}
</td>
<td class="border p-4 dark:border-dark-5">
{r.firstname}
{r.lastname}
</td>
<td class="border p-4 dark:border-dark-5">
{r.group.name}
</td>
<td class="border p-4 dark:border-dark-5">
{format_laptime(r.minLaptime)}
</td>
</tr>
{/each}
</tbody>
</table>
{/if}
</div>
{:else if current_page === "orgs_distance"}
<div transition:slide|local>