Compare commits

..

No commits in common. "37364c54e4b7598050ceeb25d6022ae03e02a4d5" and "18570a42f0066f4b8feb28f26370ed372d4988a4" have entirely different histories.

19 changed files with 37 additions and 108 deletions

View file

@ -1,19 +1,12 @@
<!doctype html>
<html lang="de">
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="text-scale" content="scale" />
<meta name="color-scheme" content="light">
<meta name="theme-color" content="#0B1023">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png">
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

After

Width:  |  Height:  |  Size: 2 MiB

Before After
Before After

View file

@ -17,10 +17,6 @@
padding: 0;
}
:global(html) {
color-scheme: light;
}
:global(body) {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
color: #1a1a2e;

View file

@ -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;

View file

@ -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) {

View file

@ -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) {

View file

@ -15,19 +15,13 @@
let copied = $state<string | null>(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) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

View file

@ -1,15 +0,0 @@
<svg width="256" height="256" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
<rect width="256" height="256" rx="56" fill="#FF7A00"/>
<!-- Chat bubble -->
<rect x="52" y="48" width="152" height="132" rx="28" fill="#FF7A00"/>
<path d="M92 180 L92 214 L126 180 Z" fill="#FF7A00"/>
<!-- Checkmark -->
<path d="M82 116 L112 146 L174 84"
stroke="white"
stroke-width="22"
stroke-linecap="round"
stroke-linejoin="round"
fill="none"/>
</svg>

Before

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

View file

@ -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: {

View file

@ -1,9 +0,0 @@
<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="1024" height="1024" rx="220" fill="#081B5A"/>
<rect x="220" y="180" width="320" height="320" rx="60" fill="#FF7A00"/>
<path d="M315 340L430 440L610 250" stroke="white" stroke-width="55" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M300 500V590L390 500H300Z" fill="#FF7A00"/>
<text x="180" y="760" font-family="Arial, Helvetica, sans-serif" font-size="120" font-weight="700" fill="white">check</text>
<text x="590" y="760" font-family="Arial, Helvetica, sans-serif" font-size="120" font-weight="700" fill="#FF7A00">flo</text>
<text x="810" y="760" font-family="Arial, Helvetica, sans-serif" font-size="80" font-weight="700" fill="white">.de</text>
</svg>

Before

Width:  |  Height:  |  Size: 783 B

View file

@ -1,15 +0,0 @@
<svg width="256" height="256" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
<rect width="256" height="256" rx="56" fill="#FF7A00"/>
<!-- Chat bubble -->
<rect x="52" y="48" width="152" height="132" rx="28" fill="#FF7A00"/>
<path d="M92 180 L92 214 L126 180 Z" fill="#FF7A00"/>
<!-- Checkmark -->
<path d="M82 116 L112 146 L174 84"
stroke="white"
stroke-width="22"
stroke-linecap="round"
stroke-linejoin="round"
fill="none"/>
</svg>

Before

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 MiB