Skip to content

Planning, execution and review

Planning records intended work and capacity. Workers record what happened; staff review the submitted evidence. Booked hours, a finished work order, approved time and the customer’s delivery acceptance establish different facts. None alone establishes payment or financial settlement.

The enquiry and quote acceptance workflow can hand over an unplanned project with accepted commercial rows. A manually created project can also enter planning without a quote. Commercial authority continues to own agreed scope; operational instructions cannot amend that agreement.

Record or decision Owner and meaning What it does not establish
Project and accepted basis Staff arrange the engagement; accepted source rows retain commercial provenance A project need not originate in quote acceptance.
Work order and exact assignment Staff define a work package and select its workers Project membership or a calendar pass alone is not assignment to every order.
Calendar booking and customer promise Staff allocate person/UE capacity, work windows and customer-facing dates A booking is not performed time or proof of delivery.
Publication Staff release the relevant plan, instructions or files to an audience Release does not approve execution or grant every action permission.
Start observation, checks and photos Workers retain initial conditions and progress evidence An observation is not staff approval or customer acceptance.
Worker completion An assigned worker explicitly marks the shared order completed It does not approve that person’s hours or finish the whole project.
Time report and staff attestation A pending report records performed hours; a separate reviewer approves or returns it Approval can initiate a separately gated payroll handoff; it is not invoice consumption.
UE submission and review A subcontractor submits evidence; principal staff record the decision Approved completion evidence is not closure of the commitment or supplier settlement.
Customer delivery acceptance and staff project completion Separate customer-evidence and staff-readiness paths can mark the project completed They do not implement one common review transaction or prove financial settlement.

Projects and work orders owns record relationships and accepted-source allocation. Worker and subcontractor access owns effective assignment, company, publication and action checks. Ordinary browser writes use row-level security (RLS); privileged APIs repeat their own capability and resource checks.

The ordinary work-order creation function is a remote procedure call (RPC). It checks the company’s live project, status, phase, dates, non-negative estimate and selected active workers. It creates the order, exact assignments and copied accepted-source lines in one database transaction. Manual instruction lines remain possible; no acceptance evidence is invented for a manual project.

Accepted-source allocation is whole-line. The source owner explains how a basis row can belong to one non-deleted order and how accepted change-order child rows qualify. Cancellation retains that allocation; soft deletion can free it. Copied quoted hours retain their creation-time provenance. Allocating an instruction does not consume the corresponding invoice basis.

Later edits have different boundaries. The browser updates ordinary work-order fields under RLS, manages line edits separately and calls the assignment RPC to add/reactivate a stable worker assignment. Do not treat the entire edit screen as one transaction. An exact order assignee, a direct project assignee, a booked person and an executor commitment are separate relationships.

The planning workspace manages addressable calendar passes. Batch booking, move/resize and delete use their named database functions, with company/project, order/phase, person or UE commitment, time-window and overlap checks. A combined creation action can create a simple work order and its first booking atomically. Request keys identify retries; a second intentional pass on the same day has its own identity. Batch duplicate policy is distinct from global deduplication of all that person’s work on that day.

A work-order estimate is a package estimate. Calendar effort is person-time: two people booked for three hours represent six person-hours, not a three-hour work order and not six hours already performed. Absence reserves capacity separately and is excluded from customer work publication.

Staff edit a draft customer promise and select customer-facing passes. The current planning publication RPC locks the project, compares planning_revision with the reviewed expected_revision, and checks the promise, required order references, work site and deviations. A required override reason records a deliberate exception. A stale preview is refused; the editor must reload it.

Publication saves a versioned customer snapshot. Later internal booking changes do not silently replace that snapshot. Staff publish a new version when the customer plan should change. Withdrawing the latest version hides it without restoring an older snapshot or deleting internal bookings. The publication concept owns these rules and the separate presentation, file and conversation mechanisms.

Worker instructions instead use the current published order and its exact assignment. Editing an already published instruction changes that projection immediately. Own worker calendar passes and UE commitment passes have their own release flags; releasing the order does not release every pass. Customer, worker and UE visibility remain independent.

Releasing a work order or adding a worker to an already released order can enqueue an assignment email. Customer plan notifications also have durable delivery state. Enqueue, provider submission and the recipient reading the message are different observations. A failed notification does not retract the saved plan or assignment.

The work site is the job location. An initial release can capture a separate property from an unreleased draft’s address context. Previously released work must not silently reconstruct its site from today’s customer postal address. Changing an address and rescheduling an existing job are separate actions.

The worker entry page chooses the one ongoing shift, otherwise the single released job scheduled today in Europe/Stockholm. Several choices keep the worker on the job list. Future/undated work is not presented as today’s plan. A rejected report on another project can keep the entry page on the list so it remains visible.

The project page loads its instructions from the worker API. Only published exact assigned orders supply instruction lines and checklists. Released personal passes supply planned dates; the page does not infer them from project target dates. Files require their own exact-order publication. Staff who also hold a worker role receive the same worker projection through this API.

Clocking, the start check, work progress, time and clock-out are separate actions. The company can disable new clock-in. An existing shift can still be clocked out after assignment/publication withdrawal or project soft deletion. A retained request key handles uncertain clock responses. Clock-out neither creates reported hours nor finishes an order.

The start observation is per person/project. A clear observation contains no issue description or photo. An issue observation requires both and records private staff dialogue evidence; it is a non-blocking observation, not a quality approval. A completed observation or a reasoned, unrevoked staff exception permits time submission. Saving a private time draft does not require that gate to be complete.

Checklist progress and required photos have their own checks. New photos use canonical private object paths and signed reads. Uploading bytes, storing their reference and changing progress are separate operations. A failed step must remain visible and retryable; an uploaded object alone is not a completed checklist item. Finishing the shared order requires explicit confirmation, all checklist items and required photo evidence. The action affects the team’s order, not only one worker’s view.

A repeated completion returns the stored completion time and note after checking current worker identity, exact assignment, publication and live order scope. It does not apply a new note to completed work. The first update compares the order status it read; a competing completion is returned, while a different winning status produces HTTP 409. Checklist validation and the status update are separate reads/writes; this is not an atomic freeze of every checklist or assignment change. Staff reopening is a separate status edit. The database clears the current completion-time projection when leaving completed state and retains transition history through the order audit.

sequenceDiagram
participant O as Office
participant D as Database and API
participant W as Worker
O->>D: Create instructions and assignments
O->>D: Save bookings and publish audience releases
W->>D: Load assigned published work
W->>D: Save start observation and progress evidence
W->>D: Save private time draft
W->>D: Submit performed time with retained request key
D-->>W: Pending time report
W->>D: Explicitly complete shared work order
D-->>W: Stored completion time and note
O->>D: Review pending time independently
alt Returned with reason
  D-->>W: Rejected report remains available for correction
  W->>D: Create linked correction report
else Approved
  D-->>O: Approved source and separate payroll handoff state
end
Performed work and review remain separate from capacity planning and financial processing.

Normal time submission uses the worker API. It checks the reporting date, effective project/order assignment and start observation. Future dates are refused using the Stockholm calendar day. The idempotency key belongs to the person’s request in the company. The same saved request returns the original report; a different payload with that key is a conflict. Current target/start checks still apply to the retry; it is not unconditional access to a report after assignment withdrawal.

Private drafts are server-backed and can be restored on the project page. A saved draft does not submit or approve time. After successful submission, the draft list filters out an existing report with the same key even if best-effort draft deletion failed. The browser retains the submission key across an uncertain response.

A rejected report retains the review reason. The worker’s correction inserts a new row linked through fk_corrects, rather than editing the rejected report in place. The page derives which older reports have a correction. That correction currently uses a direct RLS insert, not the normal API’s retained submission-key path; do not assume both paths have identical duplicate/retry protection.

Office approval requires the time-review capability, an active staff reviewer and a pending own-company report. The reviewer cannot approve their own time. A supplied expected revision must match; the conditional update checks the original status and, when supplied, revision. Replaying an already approved report retains its approval instead of attesting again. A rejection requires a reason and reviewer trace; a conflicting decision requires reload.

New native office attestation can enqueue the existing payroll handoff when its activation, connection and employee/activity mappings permit it. Historical imported approval has a separate origin and is not treated as a new export instruction. Time and payroll handoff owns delivery and reconciliation. Operational review does not establish that an external payroll transaction completed. It also does not consume invoice billing basis.

Review UE evidence and complete the project

Section titled “Review UE evidence and complete the project”

A UE submission and its time report belong to the executor commitment and the principal project. Principal staff review through their own scope/capability checks. Rejection requires a reason. Returning the decision to pending clears current reviewer/time/reason; this differs from an append-only customer acceptance record. The reviewed paths store new submissions as separate rows and update review fields on the chosen row. There is no common immutable submission-version protocol across worker time, UE submissions and customer acceptance.

An approved UE completion submission can advance an in_progress commitment to pending_close. It does not close the commitment. Review update, commitment advance, project interaction and notification are separate operations, with best-effort notification. Evidence already matched to a supplier service sheet is protected against review changes. Request/award and complete subcontractor closure belong to the subcontracting workflow.

Staff project completion reloads all live orders, pending own/UE time, pending UE submissions and unfinished commitments through paged queries. Completed/cancelled orders stop blocking; pending_close commitments still block. A failed readiness check returns the blocker list. The final status update compares the status read; replaying an already completed project returns its stored result. The evidence reads and final update do not form a single transaction preventing every concurrent new order or submission.

Customer delivery acceptance uses a different authenticated portal operation. Its RPC checks the authorized active customer person, locks the project and retains an immutable acceptance snapshot/digest with an idempotent response, then marks the project completed in that transaction. The snapshot covers identified project facts, not every photo, checklist or time report. This operation does not reuse the staff readiness loader’s full blocker list. Customer portal access owns admission; customer delivery acceptance is distinct from quote acceptance, time attestation and payment. Project status alone cannot prove which path or financial outcome occurred.

The transaction reference identifies which grouped operations commit together and which readiness/evidence checks remain separate requests.

A synthetic accepted quote budgets 10 labour hours. Staff allocate its whole source line to one order and book two workers for three hours each: quoted/allocated hours are 10, booked person-hours are 6. One worker submits 2 hours and the other submits 1.5. If only the first report is approved, reported hours are 3.5 and approved hours are 2. Completing the order does not approve the remaining 1.5 hours or consume any invoice basis. Those separate records determine the next decisions.

Interruption or changed state Retained result Recovery
Stale planning preview Internal edits remain; customer snapshot is unchanged Reload and review the new revision before publishing.
Latest customer publication withdrawn Internal bookings remain; the latest customer plan is hidden Publish a new reviewed version; an older snapshot is not restored.
Worker assignment/publication withdrawn The corresponding delivery/action checks can refuse access; existing clock-out recovery is separate Refresh the assigned-work view or obtain the intended staff reassignment.
Photo upload/reference save fails Bytes and progress can have different outcomes Inspect the retained error and retry the failed step; do not infer completion from an upload alone.
Time result is uncertain The original report may already exist Retry the unchanged normal submission with its retained key; do not create a new request merely to clear the error.
Time or UE evidence returned The rejected evidence and reason remain Correct through that surface’s own path; approval and linked-correction rules differ.
Completion response is lost The first completed order retains its timestamp and note Repeat the action with current access; it acknowledges that completion.
Competing order/project status wins Its status is preserved by the conditional update Reload; a conflict is not permission to reopen or overwrite it.
Staff project readiness fails Live blocking records remain Resolve the named orders/reviews/commitments and recheck, independently of financial settlement.

The delivery PR identifies the executed local/API/browser scenarios and their source versions. Synthetic checks do not establish an independent working day, complete UE settlement, every restore/reparent case or a transactional project-close barrier.