Phase 1, item 3: the hierarchy customer jobs, tasks and time entries
will refer to.
- New Catalog module: service unit > optional service > work type.
Names are unique per level (case-insensitive); items are never
deleted, only deactivated, and foreign keys restrict deletes.
- Pohjatiedot page (/catalog, admins and management): add, rename,
reorder with move up/down buttons (keyboard-friendly, focus kept and
announced) and an "in use" checkbox per row. Work types can move to
another service of the same unit.
- A migration inserts the starting catalog from the specification when
the tables are empty, so every installation has it.
- CatalogQueries gives other modules the active service units and the
work types of chosen units plus the shared ones.
- Spec and CLAUDE.md updated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Customer page and contacts/billing units (phase 1, item 2):
- New customer page (customers.show) with details, contacts and billing
units; add and edit on their own pages, delete after confirmation.
Creating or editing a customer now leads to this page.
- Contacts: name, title, phone, email, note. Billing units: name,
billing address, e-invoice address (12-35 letters/digits), operator
(required with an e-invoice address) and reference.
- Use cases check that the row belongs to the customer, so ids in the
URL can't reach another customer's rows.
- EmailAddress moves from Users to Shared so both modules can use it.
- <x-confirm-dialog> (native <dialog>) replaces <x-modal>, whose title,
close button and focus handling are not accessible; solid red buttons
use red-700 via published NormalButtonColors for 4.5:1 contrast.
Personal identity code (henkilötunnus) for consumers who are invoiced:
- Validated (date, century sign, check character), stored encrypted
with an HMAC blind index for duplicate checks; never in
CustomerSummary, search, logs or Livewire state.
- Admins and management see it in full and may remove it; others enter
it and see only the masked form. The form never shows the stored code.
Spec, architecture doc and CLAUDE.md updated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- AuthenticateSession in the web group logs out a user's other sessions
when their password changes.
- Set-password links made by an admin use a new admin_links broker with
its own password_setup_tokens table and a 72-hour expiry, so links
handed over by hand don't expire in an hour. Forgot-password links
keep 60 minutes. The reset page accepts both, and issuing or using a
link ends the user's earlier links.
- Admin links are emailed with PasswordSetupLinkNotification; the email
body is shared with the forgot-password email via PasswordLinkMail.
- Spec chapter 3 and CLAUDE.md describe the link lifetimes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Job numbers restart every year (2027-0001).
- Tasks have a Tarkastettavana (InReview) status by default.
- Employees and interns approve their own hours; management can approve
anyone's and approves subcontractors' hours.
- Management reviews approved hours when billing and enters the hours to
bill per work type; recorded and billed hours are both stored.
- An invoice covers one job or several jobs of the same customer, billing
unit and PO reference; adds invoices and invoice_jobs to the data model.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The customer answered the open questions in määrittely.txt. Collect the
answers into docs/maarittely.md: roles and permission table, money
visibility, customer job fields and enum keys, Kanban, tasks, time
entries, expenses, pricing, Fennoa billing export, data model, revised
phases with phase 1 in detail, and remaining open questions. CLAUDE.md
now points to it.
Apply the answers that change the Users module:
- Passwords need 12+ characters with mixed case, a number and a symbol,
with a Finnish message for each rule.
- When an admin creates a user or asks for a new link, the set-password
link is emailed and also shown to the admin to copy, even if the email
fails. The link lives only in the page state. users:create-admin
prints it too. Self-service "forgot password" stays as it was.
- The copy field uses x-input + x-button with a status message, because
x-clipboard has an unlabelled input and a changing button name.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
wire:navigate replaces the <html> attributes with the server's, which
dropped the "dark" class, and the unchanged head script does not run
again. Apply the stored theme again on every Livewire page swap, before
the new page paints, and cover the main-menu navigation with a browser
test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The inline theme script treated an unknown stored "dark-theme" value as
light, while tallstackui_darkTheme() treats it as "system", so a dark OS
could flash the light theme. Also move an inline comment in
AppServiceProvider into the method's PHPDoc.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rewrite the layout and all Customers and Users pages with TallStackUI
components and remove livewire/flux and its Boost skill.
Fix the TallStackUI accessibility gaps found by the axe tests:
- password reveal and theme switch have no accessible name: add
<x-password-field> and keep the own theme toggle button
- select.native label is not tied to the control: add aria-label
- contrast: darker primary palette, soft-customized error colours and
published alert/link colour classes; neutral buttons use subtle black
- follow the system theme by default (localStorage key dark-theme)
Load TallStackUI assets from the app URL so they work in the XAMPP
subfolder, add Finnish TallStackUI strings, and drop inputmode=numeric
from the business ID field so iOS keyboards show the hyphen.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- New partial resources/views/partials/theme-toggle.blade.php: a Flux
button that flips $flux.dark. Flux stores the choice in localStorage
(flux.appearance) and applies it before the page paints; until the
user chooses, the system theme is followed.
- Shown in the header for signed-in users and at the top right of the
guest pages.
- Accessible: stable name "Tumma teema" with a tooltip, state in
aria-pressed, decorative moon/sun icons.
- Browser tests cover toggling, persistence across pages, overriding a
dark system theme, keyboard use and axe checks in both themes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Load stored users without re-checking role rules, so an intern whose
supervisor was deleted no longer gets a 500 on every request; the
rules apply again on the next change.
- Refuse to deactivate or demote a supervisor of active interns
(SupervisorHasInterns).
- Lock active admin rows in the last-admin check so concurrent changes
cannot remove every admin.
- Creating a user survives mail failures: the error is reported and
the admin is asked to resend the link (CreatedUserAccount result).
- Session-ended redirect passes the reason in the URL
(/login?access=ended), so Livewire requests also show it.
- Same login message for a wrong password and a disabled account.
- Forgot-password sends links only to users who may sign in today
(RequestPasswordReset), with the same neutral message.
- Use the default callout instead of the low-contrast warning variant.
- Document make:class/make:test for module files in CLAUDE.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
New Users module with the four layers:
- Domain: Role enum, UserAccount entity (intern needs end date and
supervisor, login allowed until the end of the last day), email and
name value objects, SupervisorRule, last-admin protection.
- Application: CreateUserAccount (emails a set-password link),
UpdateUserAccount, SendPasswordSetupLink, CheckLoginAllowed, query
contract and Clock (business time zone Europe/Helsinki).
- Infrastructure: users table gets role, is_active, employment_ends_on
and supervisor_id; Eloquent repository and queries; Password broker
link sender with a Finnish email; Gate users.manage.
- Presentation: Livewire login (rate limited), forgot and reset
password pages, logout, EnsureAccountIsUsable middleware that ends
sessions of deactivated users, admin-only user list and form, and
users:create-admin command.
Also:
- Layout gets a labelled main menu, the signed-in user and logout.
- Remove the local /dev/login; guests are redirected to /login.
- Customers: customers.use ability (no subcontractors), authorization
in mount and save, locked customerId, 404 for a missing customer,
empty-state check uses the total count.
- Architecture test lets module providers register their own
Presentation classes; docs and CLAUDE.md updated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- /dev/login signs in a test user and returns to the requested page.
It is registered only when APP_ENV=local and is named "login", so the
auth middleware redirects there. It stands in for the real login,
which arrives in phase 1.
- Translate the Flux pagination summary and previous/next button labels
into Finnish, so screen readers do not read English on Finnish pages.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Introduce a modular monolith under app/Modules with Domain, Application,
Infrastructure and Presentation layers.
- Shared module: DomainException base, TransactionManager and an
EventDispatcher that publishes events after commit.
- Customers module: Customer entity, CustomerName and BusinessId
(Y-tunnus checksum) value objects, RegisterCustomer/UpdateCustomer
use cases, CustomerQueries read contract, Eloquent repository, and
Livewire list and form pages with Finnish translations.
- Pest arch tests enforce layer and module dependency rules for every
module; Larastan (level 6) added as a dev dependency.
- Raise Flux error text contrast to meet WCAG 2.2 AA.
- Document the architecture in docs/architecture.md and CLAUDE.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Layout: skip link to the main content and a <main> landmark
- Home page: stable button label, counter announced via a live status region
- Pest browser plugin + Playwright: axe checks (level 2) in light/dark and
desktop/mobile, plus a keyboard-only interaction test
- Register the Browser test suite in phpunit.xml and Pest.php
- CLAUDE.md: accessibility development rules and browser test notes
- Boost-refreshed testing-best-practices skill files
Co-Authored-By: Claude Opus 5.5 <[email protected]>