Debug: Console-Logs im Dashboard

This commit is contained in:
rene 2026-05-17 13:59:03 +02:00
parent f8b82a3cff
commit a3281261ab

View file

@ -21,12 +21,14 @@
// 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;
console.log('[Dashboard] user:', user, 'tenantId:', tenantId);
const result = await pb.collection('check_logs').getList(1, 50, {
filter: `tenant = "${tenantId}" && created >= "${today.toISOString()}"`,
filter: `created >= "${today.toISOString()}"`,
expand: 'station',
sort: '-created'
});
console.log('[Dashboard] check_logs result:', result);
logs = result.items;
stats.total = result.totalItems;