From 7f3b6dff78f519ad99437506afcc00877a6328eb Mon Sep 17 00:00:00 2001 From: Petri Saarinen Date: Mon, 23 Nov 2026 19:15:54 +0200 Subject: [PATCH] Add customer job Kanban board Phase 1, item 6: - New page /jobs/board: one column per Kanban status (archived left out), one card per job with number, name, customer, priority and due date. Filters for my jobs (default), priority and service unit; subcontractors see only their own cards and cannot move them. - Cards move by dragging (Livewire wire:sort across column groups) or with each card's status select, which works with the keyboard. Moves go through ChangeJobStatus, so they are recorded in the job history; the result is announced and focus returns to the moved card. - Billing statuses only for management and the job's biller: the jobs.set-billing-status gate now takes the biller's user id. - Column links with counts at the top; columns wrap with the screen width, so there is no sideways scrolling. - CustomerJobQueries::board() and the biller on job summaries. - Menu link and a link from the job list; spec and CLAUDE.md updated. Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 2 +- .../Contracts/CustomerJobQueries.php | 8 + .../Application/DTOs/CustomerJobSummary.php | 1 + .../EloquentCustomerJobQueries.php | 52 +++- .../Providers/JobsServiceProvider.php | 6 +- .../Presentation/Livewire/⚡board.blade.php | 263 ++++++++++++++++++ .../Presentation/Livewire/⚡form.blade.php | 2 +- .../Presentation/Livewire/⚡index.blade.php | 5 +- app/Modules/Jobs/Presentation/Routes/web.php | 1 + docs/maarittely.md | 6 +- lang/fi/jobs.php | 13 + lang/fi/layout.php | 1 + resources/views/layouts/app.blade.php | 2 + tests/Browser/JobsAccessibilityTest.php | 41 +++ tests/Feature/Modules/Jobs/JobBoardTest.php | 92 ++++++ 15 files changed, 484 insertions(+), 11 deletions(-) create mode 100644 app/Modules/Jobs/Presentation/Livewire/⚡board.blade.php create mode 100644 tests/Feature/Modules/Jobs/JobBoardTest.php diff --git a/CLAUDE.md b/CLAUDE.md index 9f30302..2dc46e0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -47,7 +47,7 @@ Accessibility is a contractual acceptance criterion. It covers the whole UI: nav - **Personal identity codes** (*henkilötunnus*, consumer customers) are sensitive personal data: stored encrypted (`encrypted` cast, `$hidden`) with an HMAC blind index for duplicates, never in `CustomerSummary`, search, logs, exception messages or Livewire public properties, and shown in full only behind `customers.view-personal-identity-code` (admin, management) via `CustomerQueries::personalIdentityCodeOf()`; everyone else sees `masked()`. - Never convey meaning by colour alone. Statuses, priorities (e.g. *kiire* = red), errors and warnings always also have visible text or an icon with text. - Announce dynamic changes: put status text in `role="status"` / `aria-live="polite"` (errors: `role="alert"`), or a TallStackUI toast (`` must then be added to the layout). Keep button names stable instead of putting changing state in them. -- Make everything work with the keyboard alone, with a visible focus indicator and no focus traps. Use `` for dialogs (not ``, see above) and check that focus moves in and returns. +- Make everything work with the keyboard alone, with a visible focus indicator and no focus traps. Use `` for dialogs (not ``, see above) and check that focus moves in and returns. Drag and drop uses Livewire's `wire:sort` (see `jobs::board`), and every drag has a keyboard alternative (e.g. a status select on each card). - The layout (`resources/views/layouts/app.blade.php`) provides a skip link and a `
` landmark. Keep them, and add `