feat: seed dashboard, fix My tickets filter

- Add demo dashboard with 7 widgets to seed script
- Dashboard is_default=true — appears as home page on fresh seed
- Add views/dashboards/dashboardWidgets to seed reset
- Fix My tickets: now filters by first non-system user (not any owner)
- Pass owner param in sidebar My tickets link
- Update page.tsx view=my to respect owner URL param
- Scrip engine already sorts by sort_order (verified)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Gjermund Høsøien Wiggen
2026-06-09 13:09:02 +02:00
parent c6c5272e50
commit 6263ce1332
3 changed files with 74 additions and 6 deletions

View File

@@ -409,7 +409,11 @@ function TicketWorkbenchContent() {
return tickets
.filter((ticket) => {
if (view === "my" && !ticket.owner_id) return false;
if (view === "my") {
const myOwner = searchParams.get("owner");
if (myOwner && ticket.owner_id !== myOwner) return false;
if (!myOwner && !ticket.owner_id) return false;
}
if (view === "unassigned" && ticket.owner_id) return false;
if (view === "recent") {
const week = 7 * 24 * 60 * 60 * 1000;