Contract Ordinary Hours
A contract’s Ordinary Hours step (Step 1 of the contract editor for
labour_hire / plant_hire / subcontractor contracts — materials contracts
skip it) defines the standard start / end / hrs for each weekday. Only
hrs drives pricing (Stage 1 ResolveContext reads ordinary_hours[dow].hrs
to split ordinary vs. overtime); start / end are informational display
values.
Seed from the project’s default shift times
When a new contract is created from a supplier’s Contracts tab, the editor
pre-populates the Mon–Fri start / end times from the project’s default
day shift (projects.shift_config.shifts.day.{start_time, end_time}).
- Each seeded weekday gets a default quota of
hrs: 8(awards commonly define 8 — or 7.6 — regardless of shift length; the start/end pre-fill is the high-value part, and the admin can adjusthrsper day). - Saturday / Sunday are left unset — weekend ordinary time is award-specific.
- If the project has no day shift configured (a brand-new project whose
shift_configis still the'{}'default), nothing is seeded and the table renders blank exactly as before. Malformed stored times (e.g."06:00:00") are normalised toHH:MMand silently dropped if invalid, so a bad value can never reject the whole create.
The admin can still override every value after creation.
Reset from project defaults (override)
Inside the editor’s Ordinary Hours step, a “Reset from project defaults” button re-seeds the Mon–Fri rows from the project’s current day shift at any time. Saturday / Sunday edits are preserved. If the project has no default day-shift times, the button shows an info toast and is a no-op.
RDO is now AI-authored only
The “Enable RDO Cycle” control has been removed from the contract editor.
RDO (rostered-day-off) handling itself is unchanged — the rdo_cycle column,
the pricing engine’s detectRDO, the Is RDO rule-builder condition, and the
supplier-portal RDO section all still work, and the AI Awards Interpreter
remains the production writer of the RDO block.
Correcting a wrong RDO config (support procedure)
Because there is no longer an in-editor RDO control, correcting a wrong AI-written RDO config is done out-of-band. In order of preference:
- Re-run the AI Awards Interpreter on the corrected source document — it
re-writes
rdo_cyclethrough the normal authoring path (preferred, no DB access). This is the primary support procedure. - One-off
updateContract({ rdo_cycle: {…} })— the Server Action schema still acceptsrdo_cycle, so a correction can be issued without re-adding UI. - Direct Neon edit of
contracts.rdo_cycle— admin-only, last resort.