The console under console/ has its own session cookie and console guard
(UseConsoleSession), so signing out or changing user there leaves the
normal interface alone. Links open it in a new window through a one-time
handoff key; a signed-out console asks for a PIN code or password on its
own login page. Users set their 4-6 digit PIN on the profile's PIN page,
and the console's change user dialog takes it on a keypad; five wrong
PINs lock PIN sign-in for 15 minutes.
Machine counters are cumulative: users record how much a job used and it
is added to the latest reading. A maintenance record restarts the whole
counter interval from the reading at the record.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A language picked on a signed-out page is now stored on the account when
the user signs in (StoreLocaleChosenBeforeLogin), so the app does not
switch back to the account default. EnsureAccountIsUsable keeps the user's
language for the login page when it ends a disabled account's session.
ChangePreferredLocale runs in a transaction like the other use cases, the
language names come from layout.languages instead of the Locale enum, and
the translation test also compares fi.json with en.json and rejects
English files without a Finnish counterpart.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every UI string now exists in lang/fi and lang/en; a unit test checks that
both languages have the same keys and placeholders. A user's language is
stored on the account (users.locale) and applied by the SetLocale web
middleware, falling back to the session's choice on signed-out pages and
then APP_LOCALE. Emails use the user's language through
HasLocalePreference, and the login page keeps the language after logout.
The header's name, theme toggle and logout button become one profile menu
(a disclosure) with the language buttons, light/dark/system theme radios
kept on the device, and logging out. Signed-out pages get a Suomi/English
switch next to the theme toggle.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Time entries store who approved them and when. Approved hours are
locked: cells, task page edits and removals are refused.
- "Hyväksy viikko" in the weekly view approves the user's own week;
subcontractors' hours are approved by management.
- Management gets an approval page (unapproved weeks by person, recently
approved weeks) and can open anyone's week read-only to approve it or
cancel its approval, which only management may do.
- Only management may move a done job back to an earlier status, which
opens the lock on its hours and expenses; the history marks it.
- The Clock contract gets now() for approval times.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Admins give employees and interns personal money permissions (prices,
expenses, quotes, billing) on the user form. Other modules check them
through the money.* abilities; admins and management see all amounts,
subcontractors none.
- Employees and interns get a read-only price list: consumer products
with VAT always, hourly rates, other products and the mileage rate only
with the price permission. Subcontractors cannot open it.
- VAT rates are maintained on the price list page, with one default rate
that always stays in use. Products get a VAT rate; changing a rate's
percentage applies to every product using it.
- Consumer product prices are entered and stored with VAT, so cash prices
stay round; the price without VAT is calculated. The product form shows
the other price as you type.
- Shared VatPercentage value object and Money::addVat()/removeVat(),
rounding half up to the cent in integer arithmetic.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Root .htaccess refuses everything outside public/, because local Apache
serves the whole project folder (.env, logs with set-password links, .git).
- Login allows 20 failed attempts a minute per IP across accounts, besides
5 per email and IP; the forgot-password page 5 requests a minute per IP.
- A global middleware sends X-Frame-Options, frame-ancestors, nosniff,
Referrer-Policy, Permissions-Policy and HSTS over HTTPS, and drops
X-Powered-By.
- The weekly time sheet locks the shown week and selected day, so the
browser cannot set them.
- Users who may not see personal identity codes can save a new code at
most 10 times an hour, so the duplicate check cannot be used to test codes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Phase 1, item 4. New Jobs module:
- Customer jobs with the spec's fields except money (phase 2): yearly
running numbers (2026-0001) from a locked counter row, service units,
schedule, kind, status, priority, payment basis, estimated hours,
PO reference, instructions, members (responsible, contact person,
customer contact, biller, billing unit, other members), tags shared
across jobs, and links.
- Every change is recorded field by field and shown on the job page with
names and Finnish dates.
- References to other modules are checked through their query
contracts: contact and billing unit must be the customer's own;
service units and users must be in use unless already on the job.
- Job list with search, filters and "my jobs" on by default; job form
with an accessible customer search and quick add; job page.
- Access: subcontractors see only jobs they are members of, read only;
billing statuses for management and the job's biller; archiving for
management.
Related changes:
- Customers: one internal customer (created by a migration) for internal
work; contacts and billing units used by a job cannot be removed.
- Users and Catalog: batch name lookups and active user options with
roles for other modules.
- <x-checkbox-group> component; 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]>
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]>
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]>
- 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]>