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 syntheticeventEarlyflag.
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.tsxloads unconfirmed inspections viaGET inspectionwithstatus: 'unconfirmed'and rendersSingleJobsBarwithout passingeventBadge, so the Early Event chip never appears on that list. attik-frontend/src/components/task-check/AgreementsNeeded.tsxalready implements client-side detection for a related workflow: it finds jobs with events in a near-term window and unsigned agreements, maps those rows witheventEarly: true, and passeseventBadge={inspection.eventEarly}intoSingleJobsBar. That pattern is the closest in-repo reference for how the chip is triggered (the flag is not a backend field in this codebase—eventEarlyonly appears in that component).attik-frontend/src/components/task-check/SingleJobsBar.tsxrenders the "Early Event"ChipwheneventBadgeis true; the row is shared across multiple worklists underattik-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.tsxis the primary surface: after fetchingInspectionFullyPopulated[], derive whether each inspection qualifies as "early event" (see decisions below) and passeventBadgeintoSingleJobsBarthe same wayAgreementsNeeded.tsxdoes.- Reuse or share logic with
AgreementsNeeded.tsxonly if product confirms the same definition of "early" (that list currently keys off event dates relative to a rollingbeforeDatewindow and unsigned agreement, which is not identical to "event before inspection datetime"). SingleJobsBar.tsxalready supportseventBadge; 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.tsxmountsUnconfirmedOrderswhen the route segment isunconfirmed(alongside other task-check lists).
Backend
- No
eventEarlyfield exists on inspection documents inattik-backend(grep shows no server usage); today's chip path is client-derived. Moving detection server-side (e.g. onGET inspectionaggregation) 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 frontendinspectionlist 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.datetimebeforeinspection.datetime, vs. parity withAgreementsNeeded'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
Status: Planned
Log in to comment and vote
No comments yet
Be the first to share your thoughts.