feat: apply requested changes
This commit is contained in:
@ -22,9 +22,9 @@ COPY --from=install /temp/dev/node_modules node_modules
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# [optional] tests & build
|
# [optional] tests & build
|
||||||
ENV NODE_ENV=production
|
#ENV NODE_ENV=production
|
||||||
RUN bun test
|
#RUN bun test
|
||||||
RUN bun run build
|
#RUN bun run build
|
||||||
|
|
||||||
# copy production dependencies and source code into final image
|
# copy production dependencies and source code into final image
|
||||||
FROM base AS release
|
FROM base AS release
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
FROM node:22-alpine AS builder
|
FROM node:22-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
RUN npm i
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
RUN npm prune --production
|
RUN npm prune --production
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en" class="dark">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|||||||
@ -21,7 +21,7 @@ eventTarget.addEventListener("send", (e) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
export function connectWS() {
|
export function connectWS() {
|
||||||
ws = new WebSocket(`ws://localhost:3000`);
|
ws = new WebSocket(`ws://${location.hostname}:3000`);
|
||||||
console.log("Connecting to WebSocket...");
|
console.log("Connecting to WebSocket...");
|
||||||
|
|
||||||
ws.addEventListener("open", () => {
|
ws.addEventListener("open", () => {
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
import ConnectionLostDialog from '$lib/ConnectionLostDialog.svelte';
|
import ConnectionLostDialog from '$lib/ConnectionLostDialog.svelte';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { browser } from '$app/environment';
|
import { browser } from '$app/environment';
|
||||||
|
import { sidebarState } from "$lib/sidebar.svelte.ts";
|
||||||
|
|
||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
|
|
||||||
@ -40,7 +41,7 @@
|
|||||||
|
|
||||||
<Toaster position="bottom-right" theme="dark" richColors={true} />
|
<Toaster position="bottom-right" theme="dark" richColors={true} />
|
||||||
|
|
||||||
<Sidebar.Provider>
|
<Sidebar.Provider bind:open={sidebarState.open}>
|
||||||
<AppSidebar />
|
<AppSidebar />
|
||||||
<Sidebar.Inset>
|
<Sidebar.Inset>
|
||||||
<!-- <header class="flex h-16 shrink-0 items-center gap-2 px-4"> -->
|
<!-- <header class="flex h-16 shrink-0 items-center gap-2 px-4"> -->
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
import { eventTarget } from "$lib/ws.svelte";
|
import { eventTarget } from "$lib/ws.svelte";
|
||||||
import { TicketCheckIcon, TicketIcon, TicketSlashIcon, TicketXIcon } from "@lucide/svelte";
|
import { TicketCheckIcon, TicketIcon, TicketSlashIcon, TicketXIcon } from "@lucide/svelte";
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
|
import { sidebarState } from "$lib/sidebar.svelte.ts";
|
||||||
|
|
||||||
type LogAction = "called" | "completed" | "no-show";
|
type LogAction = "called" | "completed" | "no-show";
|
||||||
const colors = {
|
const colors = {
|
||||||
@ -40,7 +41,9 @@
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h1 class="text-2xl font-bold">Log</h1>
|
<h1 class="text-2xl font-bold" onclick={() => {
|
||||||
|
sidebarState.open = !sidebarState.open;
|
||||||
|
}}>Log</h1>
|
||||||
|
|
||||||
<Table.Root>
|
<Table.Root>
|
||||||
<Table.Header>
|
<Table.Header>
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
import * as InputOTP from "$lib/components/ui/input-otp";
|
import * as InputOTP from "$lib/components/ui/input-otp";
|
||||||
import { eventTarget } from "$lib/ws.svelte";
|
import { eventTarget } from "$lib/ws.svelte";
|
||||||
import { toast } from "svelte-sonner";
|
import { toast } from "svelte-sonner";
|
||||||
|
import { sidebarState } from "$lib/sidebar.svelte.ts";
|
||||||
|
|
||||||
const slug = $derived(page.params.slug);
|
const slug = $derived(page.params.slug);
|
||||||
|
|
||||||
@ -82,7 +83,9 @@
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h1 class="text-2xl font-bold">Raum {slug}</h1>
|
<h1 class="text-2xl font-bold" onclick={() => {
|
||||||
|
sidebarState.open = !sidebarState.open;
|
||||||
|
}}>Raum {slug}</h1>
|
||||||
<div style="display: flex; align-items: center; gap: 1rem;">
|
<div style="display: flex; align-items: center; gap: 1rem;">
|
||||||
<InputOTP.Root maxlength={3} pattern={TICKET_INPUT_REGEX} bind:value={nextTicket} onkeypress={(e) => {
|
<InputOTP.Root maxlength={3} pattern={TICKET_INPUT_REGEX} bind:value={nextTicket} onkeypress={(e) => {
|
||||||
isInvalid = false;
|
isInvalid = false;
|
||||||
|
|||||||
@ -23,21 +23,42 @@
|
|||||||
|
|
||||||
eventTarget.dispatchEvent(new CustomEvent("send", { detail: { type: "display" } }));
|
eventTarget.dispatchEvent(new CustomEvent("send", { detail: { type: "display" } }));
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const ENTRIES = {A: 1, B: 2, C: 1, D: 2, E: 1};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="p-4 flex flex-col items-center gap-4 text-3xl">
|
<div class="p-4 flex items-center justify-center gap-4 text-5xl">
|
||||||
<h1 class="text-6xl font-bold">Aufruf</h1>
|
<!-- <h1 class="text-6xl font-bold">Aufruf</h1> -->
|
||||||
{#if connected}
|
{#if connected}
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="pr-4 font-bold">Ticket</th>
|
<th class="pr-4 font-bold">Wartenr.</th>
|
||||||
|
<th class="pr-4 font-bold">-></th>
|
||||||
<th class="pr-4 font-bold">Raum</th>
|
<th class="pr-4 font-bold">Raum</th>
|
||||||
</tr>
|
</tr>
|
||||||
{#each calls as call (call.num)}
|
{#each calls.filter(c => c.num.startsWith("A")) as call (call.num)}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="call">{call.num}</td>
|
<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">-></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">-></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">-></td>
|
||||||
|
<td class="call">{call.ticket.status === "no-show" ? "Empfang " + ENTRIES[call.num[0]] : call.ticket.room}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -47,13 +68,15 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.call {
|
.call {
|
||||||
animation: flash 1s ease-in-out;
|
animation: flash 5s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes flash {
|
@keyframes flash {
|
||||||
0% { opacity: 0; }
|
0% { opacity: 0; }
|
||||||
20% { opacity: 1; }
|
10% { opacity: 1; }
|
||||||
40% { opacity: 0; }
|
20% { opacity: 0; }
|
||||||
|
40% { opacity: 1; }
|
||||||
|
60% { opacity: 0; }
|
||||||
100% { opacity: 1; }
|
100% { opacity: 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user