feat: apply requested changes

This commit is contained in:
2025-10-09 10:36:40 +02:00
parent 7679f138b6
commit 6208305464
8 changed files with 51 additions and 21 deletions

View File

@ -23,21 +23,42 @@
eventTarget.dispatchEvent(new CustomEvent("send", { detail: { type: "display" } }));
})
const ENTRIES = {A: 1, B: 2, C: 1, D: 2, E: 1};
</script>
<div class="p-4 flex flex-col items-center gap-4 text-3xl">
<h1 class="text-6xl font-bold">Aufruf</h1>
<div class="p-4 flex items-center justify-center gap-4 text-5xl">
<!-- <h1 class="text-6xl font-bold">Aufruf</h1> -->
{#if connected}
<table>
<tbody>
<tr>
<th class="pr-4 font-bold">Ticket</th>
<th class="pr-4 font-bold">Wartenr.</th>
<th class="pr-4 font-bold">-&gt;</th>
<th class="pr-4 font-bold">Raum</th>
</tr>
{#each calls as call (call.num)}
{#each calls.filter(c => c.num.startsWith("A")) as call (call.num)}
<tr>
<td class="call">{call.num}</td>
<td class="call">{call.ticket.status === "no-show" ? "Empfang " + (call.num.startsWith("A") ? "1" : "2") : call.ticket.room}</td>
<td class="call">-&gt;</td>
<td class="call">{call.ticket.status === "no-show" ? "Empfang " + ENTRIES[call.num[0]] : call.ticket.room}</td>
</tr>
{/each}
</tbody>
</table>
<table>
<tbody>
<tr>
<th class="pr-4 font-bold">Wartenr.</th>
<th class="pr-4 font-bold">-&gt;</th>
<th class="pr-4 font-bold">Raum</th>
</tr>
{#each calls.filter(c => c.num.startsWith("B")) as call (call.num)}
<tr>
<td class="call">{call.num}</td>
<td class="call">-&gt;</td>
<td class="call">{call.ticket.status === "no-show" ? "Empfang " + ENTRIES[call.num[0]] : call.ticket.room}</td>
</tr>
{/each}
</tbody>
@ -47,13 +68,15 @@
<style>
.call {
animation: flash 1s ease-in-out;
animation: flash 5s ease-in-out;
}
@keyframes flash {
0% { opacity: 0; }
20% { opacity: 1; }
40% { opacity: 0; }
10% { opacity: 1; }
20% { opacity: 0; }
40% { opacity: 1; }
60% { opacity: 0; }
100% { opacity: 1; }
}