Unconfirmed Order List - Show Early Events

Objective

  • On the Unconfirmed Orders worklist, make it obvious when a job has an event scheduled before the inspection (order) datetime so staff can prioritize getting agreements handled before that earlier touchpoint.
  • Align visibility with what teams already rely on elsewhere: the "Early Event" chip on the job row (SingleJobsBar) is already used on the Agreements Not Signed list when the client marks the inspection with a synthetic eventEarly flag.

Background

  • Operations need a quick signal on unconfirmed jobs—not only after confirmation—because ancillary or prep events can land before the main inspection slot; agreements may need attention in that window.
  • Today attik-frontend/src/components/task-check/UnconfirmedOrders.tsx loads unconfirmed inspections via GET inspection with status: 'unconfirmed' and renders SingleJobsBar without passing eventBadge, so the Early Event chip never appears on that list.
  • attik-frontend/src/components/task-check/AgreementsNeeded.tsx already implements client-side detection for a related workflow: it finds jobs with events in a near-term window and unsigned agreements, maps those rows with eventEarly: true, and passes eventBadge={inspection.eventEarly} into SingleJobsBar. That pattern is the closest in-repo reference for how the chip is triggered (the flag is not a backend field in this codebase—eventEarly only appears in that component).
  • attik-frontend/src/components/task-check/SingleJobsBar.tsx renders the "Early Event" Chip when eventBadge is true; the row is shared across multiple worklists under attik-frontend/src/app/tools/work/[[...type]]/page.tsx (including the unconfirmed route).
  • Example from the thread (unconfirmed list / chip expectation):

  • Field teams report this behavior as already valuable on Scott Home Services production; matching that expectation in core product is the driver for generalizing the pattern to Unconfirmed Orders.

Scope

Frontend

  • attik-frontend/src/components/task-check/UnconfirmedOrders.tsx is the primary surface: after fetching InspectionFullyPopulated[], derive whether each inspection qualifies as "early event" (see decisions below) and pass eventBadge into SingleJobsBar the same way AgreementsNeeded.tsx does.
  • Reuse or share logic with AgreementsNeeded.tsx only if product confirms the same definition of "early" (that list currently keys off event dates relative to a rolling beforeDate window and unsigned agreement, which is not identical to "event before inspection datetime").
  • SingleJobsBar.tsx already supports eventBadge; no change strictly required there unless copy, styling, or tooltip should differ between worklists (decision needed).
  • Entry layout: attik-frontend/src/app/tools/work/[[...type]]/page.tsx mounts UnconfirmedOrders when the route segment is unconfirmed (alongside other task-check lists).

Backend

  • No eventEarly field exists on inspection documents in attik-backend (grep shows no server usage); today's chip path is client-derived. Moving detection server-side (e.g. on GET inspection aggregation) is optional and only in scope if product wants one source of truth or to reduce payload logic (decision needed).
  • If server-side is chosen later, attik-backend/src/routes/inspection.ts (or the inspection list query path used by the frontend inspection list call) would be the natural place to document and implement—not assumed for this story unless explicitly expanded.

Product / architecture decisions (for the implementer)

  • Decision needed: Exact rule for "early"—strictly any event.datetime before inspection.datetime, vs. parity with AgreementsNeeded's calendar window logic, vs. another company rule (the issue text emphasizes before inspection date).
  • Decision needed: Whether the chip on unconfirmed rows should appear only when agreements are present/unsigned, or whenever an early event exists regardless of agreement state.
  • Decision needed: Tooltip or link text (if any) explaining why the row is flagged, for users who only see Unconfirmed Orders and not the agreements list.

References

  • Unconfirmed list: attik-frontend/src/components/task-check/UnconfirmedOrders.tsx
  • Agreements list pattern: attik-frontend/src/components/task-check/AgreementsNeeded.tsx
  • Row UI: attik-frontend/src/components/task-check/SingleJobsBar.tsx
  • Work hub routing: attik-frontend/src/app/tools/work/[[...type]]/page.tsx

Please authenticate to join the conversation.

Upvoters
Status

Next Up

Board
🏠

Main App

Date

About 2 months ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.