Debug: Console-Logs im Dashboard
This commit is contained in:
parent
f8b82a3cff
commit
a3281261ab
1 changed files with 3 additions and 1 deletions
|
|
@ -21,12 +21,14 @@
|
||||||
// User-Record explizit laden damit tenant-Relation sicher gesetzt ist
|
// User-Record explizit laden damit tenant-Relation sicher gesetzt ist
|
||||||
const user = await pb.collection('users').getOne(pb.authStore.record!.id);
|
const user = await pb.collection('users').getOne(pb.authStore.record!.id);
|
||||||
const tenantId = user.tenant;
|
const tenantId = user.tenant;
|
||||||
|
console.log('[Dashboard] user:', user, 'tenantId:', tenantId);
|
||||||
|
|
||||||
const result = await pb.collection('check_logs').getList(1, 50, {
|
const result = await pb.collection('check_logs').getList(1, 50, {
|
||||||
filter: `tenant = "${tenantId}" && created >= "${today.toISOString()}"`,
|
filter: `created >= "${today.toISOString()}"`,
|
||||||
expand: 'station',
|
expand: 'station',
|
||||||
sort: '-created'
|
sort: '-created'
|
||||||
});
|
});
|
||||||
|
console.log('[Dashboard] check_logs result:', result);
|
||||||
|
|
||||||
logs = result.items;
|
logs = result.items;
|
||||||
stats.total = result.totalItems;
|
stats.total = result.totalItems;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue