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]>
Everyone sees their open tasks on an agenda, their open jobs, this
week's hours and quick links. Admin and management also get a lazily
loaded management panel: things to do, the month so far against the
previous month, jobs and late work, and everyone's workload.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Management's reports (spec 13) get their own module that reads the other
modules through ports. The first report sums hours by person in a period,
narrowed by service unit or customer, with breakdowns, a chart and CSV.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A new Notifications module shows a bell beside the profile menu with the
number of unseen notifications and a panel of the last 7 days; opening
it marks them seen, and each notification links to its job or task.
- A daily run at 14.00 (notifications:task-starts) tells the assignee
and members of tasks that start by the next working day, skipping
holidays and days off, done tasks and archived jobs.
- Jobs publishes PeopleAddedToTask and PeopleAddedToJob when someone
else makes a user a task's assignee or member or gives them a role on
a job; those users are notified at once. UpdateTask and ScheduleTask
now take the acting user.
- A notification link to #task-<id> opens that task card on the job page.
Also: simplifying job fields per service unit (K31) moves to the end of
phase 4, and the workflow template browser test waits for Livewire's
progress bar before its last accessibility check.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Management builds the monthly billing material (laskuaineisto) as a
draft: done jobs are added as invoices of their own, combined when the
customer, billing unit and reference allow it, and their billable hours
are set per work type. Creating the material checks the jobs again,
marks the approved hours and billable expenses billed, forms invoice
lines with price and VAT snapshots and moves the jobs to "Lasku luotu".
Fixed price jobs bill their quoted amount once. Billed hours keep their
approval and billed expenses can no longer change. The Fennoa export
and monthly fee lines come later.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Quick sales (pikamyynti) of active consumer products at the counter, in a
new Sales module:
- Product buttons add one to the sale's list per press; quantities can be
lowered, raised or removed. Payment by cash or card, optional customer.
- Product durations are booked as the seller's hours on the yearly
"Pikamyynnit" job (internal customer, not billed) through Jobs'
ProvideQuickSaleTask and TimeTracking's AddTaskHours. The sale stands
even when the hours cannot be booked, and the seller is told.
- Sales are never deleted: a credit records the lines negated on today's
cash day, once per sale, by the seller or management.
- Closing a cash day stores its balance by payment method and VAT rate and
stops sales on it; only management reopens a day.
- A printable A5 PDF receipt (barryvdh/laravel-dompdf) with the company's
details, business ID, VAT number, lines and VAT breakdown.
Company details are kept in the settings and edited by the admin only on
the new Yritystiedot page. BusinessId moves from Customers to Shared so
both use the same check.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- New Expenses module: purchases (materials, other) with a description
and cost, and mileage priced with the price list's mileage rate.
- Who paid and whether the expense is billed are separate: an employee's
own payments are reimbursed elsewhere. A billed expense has a markup
and a billed amount, cost plus markup unless given.
- A job's expenses page lists, adds, edits and removes them; amounts of
others' expenses need the expenses permission, own ones always show.
Done jobs lock their expenses.
- The Kulut menu shows the user's own expenses by month. Management
records subcontractors' expenses, which they see but cannot change.
- The price list gets a default markup for new purchases.
- Number fields that update a calculation now use wire:model.live.blur:
in Livewire 4 plain .blur no longer sends the value to the server,
which also fixes the product form's VAT calculation.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Phase 1, item 8 (last of phase 1). New TimeTracking module:
- One entry per user, task and day (0.25-24 h in quarters, with a note);
the job and work type are copied from the task. A user's day cannot
exceed 24 h, and hours on a done, invoiced, billed or archived job
cannot be added or changed.
- Weekly sheet /time: tasks as rows (own open tasks, tasks with hours
that week, tasks added by search), days as columns, row, day and week
totals, week navigation. A cell saves on change and an empty cell
removes the entry; on phones one day at a time. Saves and errors are
announced, errors are tied to their cell.
- Task booking page /time/tasks/{task}: date, hours and note, added to
the day's entry; own entries with edit and remove.
- Anyone but subcontractors may book on any unlocked task;
subcontractors only on jobs they are attached to.
Jobs module:
- JobStatus::locksTime(), BookableTask and task queries for booking.
- A task with time entries cannot be removed (TaskUsage contract,
provided by TimeTracking); the job page links tasks to booking.
- The "involved in a job" rule is shared in JobInvolvement.
Spec and CLAUDE.md updated.
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]>
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]>
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]>
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]>