diff --git a/app/src/routes/admin/dashboard/+page.svelte b/app/src/routes/admin/dashboard/+page.svelte index bd32c37..a7f3312 100644 --- a/app/src/routes/admin/dashboard/+page.svelte +++ b/app/src/routes/admin/dashboard/+page.svelte @@ -24,7 +24,9 @@ const dateStr = today.toISOString().slice(0, 19).replace('T', ' '); const result = await pb.collection('check_logs').getList(1, 50, { - sort: '-id' + filter: `tenant = '${tenantId}' && created >= '${dateStr}'`, + expand: 'station', + sort: '-created' }); logs = result.items; diff --git a/app/src/routes/admin/logs/+page.svelte b/app/src/routes/admin/logs/+page.svelte index c4c1cbb..b975cc5 100644 --- a/app/src/routes/admin/logs/+page.svelte +++ b/app/src/routes/admin/logs/+page.svelte @@ -25,7 +25,7 @@ const result = await pb.collection('check_logs').getList(p, PER_PAGE, { filter: `tenant = '${tenantId}'`, expand: 'station', - sort: '-id' + sort: '-created' }); logs = result.items; page = p;