diff --git a/app/src/app.html b/app/src/app.html index 9f772c3..5ceb4b0 100644 --- a/app/src/app.html +++ b/app/src/app.html @@ -1,19 +1,12 @@ - + - - - - - - - %sveltekit.head% diff --git a/app/src/lib/assets/checkflo-logo.png b/app/src/lib/assets/checkflo-logo.png index f49e011..6f7f0dc 100644 Binary files a/app/src/lib/assets/checkflo-logo.png and b/app/src/lib/assets/checkflo-logo.png differ diff --git a/app/src/routes/+layout.svelte b/app/src/routes/+layout.svelte index a7e97b9..c57c9c5 100644 --- a/app/src/routes/+layout.svelte +++ b/app/src/routes/+layout.svelte @@ -17,10 +17,6 @@ padding: 0; } - :global(html) { - color-scheme: light; - } - :global(body) { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1a1a2e; diff --git a/app/src/routes/+page.svelte b/app/src/routes/+page.svelte index f34d61b..8486725 100644 --- a/app/src/routes/+page.svelte +++ b/app/src/routes/+page.svelte @@ -108,8 +108,7 @@ display: flex; justify-content: space-between; align-items: center; - height: 72px; - padding: 0 2rem; + padding: 1rem 2rem; border-bottom: 1px solid #f0f0f0; position: sticky; top: 0; @@ -118,7 +117,7 @@ } .logo { display: flex; align-items: center; } - .logo img { height: 44px; width: auto; } + .logo img { height: 36px; width: auto; } .btn-nav { padding: 0.5rem 1.25rem; diff --git a/app/src/routes/admin/dashboard/+page.svelte b/app/src/routes/admin/dashboard/+page.svelte index bd32c37..14845c6 100644 --- a/app/src/routes/admin/dashboard/+page.svelte +++ b/app/src/routes/admin/dashboard/+page.svelte @@ -14,29 +14,22 @@ let loading = $state(true); onMount(async () => { - try { - const today = new Date(); - today.setHours(0, 0, 0, 0); + const today = new Date(); + today.setHours(0, 0, 0, 0); + const tenantId = (pb.authStore.record as any)?.tenant; - // User-Record explizit laden damit tenant-Relation sicher gesetzt ist - const user = await pb.collection('users').getOne(pb.authStore.record!.id); - const tenantId = user.tenant; - const dateStr = today.toISOString().slice(0, 19).replace('T', ' '); + const result = await pb.collection('check_logs').getList(1, 50, { + filter: `tenant = "${tenantId}" && created >= "${today.toISOString()}"`, + expand: 'station', + sort: '-created' + }); - const result = await pb.collection('check_logs').getList(1, 50, { - sort: '-id' - }); - - logs = result.items; - stats.total = result.totalItems; - stats.ok = logs.filter(l => l.status === 'ok').length; - stats.abweichung = logs.filter(l => l.status === 'abweichung').length; - stats.kritisch = logs.filter(l => l.status === 'kritisch').length; - } catch (e: any) { - console.error('[Dashboard] Fehler:', e?.message, e?.data, e?.status); - } finally { - loading = false; - } + logs = result.items; + stats.total = result.totalItems; + stats.ok = logs.filter(l => l.status === 'ok').length; + stats.abweichung = logs.filter(l => l.status === 'abweichung').length; + stats.kritisch = logs.filter(l => l.status === 'kritisch').length; + loading = false; }); function formatTime(iso: string) { diff --git a/app/src/routes/admin/logs/+page.svelte b/app/src/routes/admin/logs/+page.svelte index c4c1cbb..737a905 100644 --- a/app/src/routes/admin/logs/+page.svelte +++ b/app/src/routes/admin/logs/+page.svelte @@ -19,22 +19,16 @@ async function loadPage(p: number) { loading = true; - try { - const user = await pb.collection('users').getOne(pb.authStore.record!.id); - const tenantId = user.tenant; - const result = await pb.collection('check_logs').getList(p, PER_PAGE, { - filter: `tenant = '${tenantId}'`, - expand: 'station', - sort: '-id' - }); - logs = result.items; - page = p; - totalPages = Math.ceil(result.totalItems / PER_PAGE); - } catch { - // Keine Einträge - } finally { - loading = false; - } + const tenantId = (pb.authStore.record as any)?.tenant; + const result = await pb.collection('check_logs').getList(p, PER_PAGE, { + filter: `tenant = "${tenantId}"`, + expand: 'station', + sort: '-created' + }); + logs = result.items; + page = p; + totalPages = Math.ceil(result.totalItems / PER_PAGE); + loading = false; } function formatDate(iso: string) { diff --git a/app/src/routes/admin/stations/+page.svelte b/app/src/routes/admin/stations/+page.svelte index c46836d..f7927f8 100644 --- a/app/src/routes/admin/stations/+page.svelte +++ b/app/src/routes/admin/stations/+page.svelte @@ -15,19 +15,13 @@ let copied = $state(null); onMount(async () => { - try { - const user = await pb.collection('users').getOne(pb.authStore.record!.id); - const tenantId = user.tenant; - const result = await pb.collection('stations').getFullList({ - filter: `tenant = '${tenantId}' && active = true`, - sort: 'name' - }); - stations = result; - } catch { - // Keine Stationen - } finally { - loading = false; - } + const tenantId = (pb.authStore.record as any)?.tenant; + const result = await pb.collection('stations').getFullList({ + filter: `tenant = "${tenantId}" && active = true`, + sort: 'name' + }); + stations = result; + loading = false; }); function qrUrl(qrId: string) { diff --git a/app/static/favicon-16.png b/app/static/favicon-16.png deleted file mode 100644 index 06f5e6e..0000000 Binary files a/app/static/favicon-16.png and /dev/null differ diff --git a/app/static/favicon-32.png b/app/static/favicon-32.png deleted file mode 100644 index 0263e94..0000000 Binary files a/app/static/favicon-32.png and /dev/null differ diff --git a/app/static/favicon.ico b/app/static/favicon.ico deleted file mode 100644 index 8e270d1..0000000 Binary files a/app/static/favicon.ico and /dev/null differ diff --git a/app/static/favicon.svg b/app/static/favicon.svg deleted file mode 100644 index 30c8903..0000000 --- a/app/static/favicon.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/app/static/icons/app-icon-512.png b/app/static/icons/app-icon-512.png deleted file mode 100644 index 3f7a9f6..0000000 Binary files a/app/static/icons/app-icon-512.png and /dev/null differ diff --git a/app/static/icons/apple-touch-icon.png b/app/static/icons/apple-touch-icon.png deleted file mode 100644 index 084b0d3..0000000 Binary files a/app/static/icons/apple-touch-icon.png and /dev/null differ diff --git a/app/static/icons/icon-192.png b/app/static/icons/icon-192.png deleted file mode 100644 index a43cb16..0000000 Binary files a/app/static/icons/icon-192.png and /dev/null differ diff --git a/app/static/icons/icon-512.png b/app/static/icons/icon-512.png deleted file mode 100644 index 3db7dd3..0000000 Binary files a/app/static/icons/icon-512.png and /dev/null differ diff --git a/app/vite.config.ts b/app/vite.config.ts index b6d43fd..9e3e084 100644 --- a/app/vite.config.ts +++ b/app/vite.config.ts @@ -8,7 +8,7 @@ export default defineConfig({ VitePWA({ registerType: 'autoUpdate', manifest: { - name: 'checkflo', + name: 'checkflo — HACCP-Protokolle', short_name: 'checkflo', description: 'Digitale HACCP-Dokumentation für die Gastronomie', theme_color: '#0B1023', @@ -16,9 +16,8 @@ export default defineConfig({ display: 'standalone', start_url: '/', icons: [ - { src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png', purpose: 'any' }, - { src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png', purpose: 'any maskable' }, - { src: '/icons/apple-touch-icon.png', sizes: '180x180', type: 'image/png' } + { src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png' }, + { src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png', purpose: 'any maskable' } ] }, workbox: { diff --git a/logo/checkflo-app-icon.svg b/logo/checkflo-app-icon.svg deleted file mode 100644 index 3a54d83..0000000 --- a/logo/checkflo-app-icon.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - -check -flo -.de - \ No newline at end of file diff --git a/logo/checkflo-favicon-fixed.svg b/logo/checkflo-favicon-fixed.svg deleted file mode 100644 index 30c8903..0000000 --- a/logo/checkflo-favicon-fixed.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/logo/checkflo-icons.png b/logo/checkflo-icons.png deleted file mode 100644 index 1c154df..0000000 Binary files a/logo/checkflo-icons.png and /dev/null differ