Display inspector information in worklist details

Objective

  1. In task-check worklists, when a user expands worklist row details for inspection-type and event-type worklists, show assigned inspector contact information (at minimum the same fields staff expect on a workorder: name plus phone and email where available), so schedulers and CSRs can reach the inspector without opening the full workorder.
  2. Make sure inspector assigned to event also displays in the worklist item details when the inspection in question has an event associated with it.

Background

  • Worklist details should show the inspector's contact information for inspection and event-related worklists (product expectation from internal request).
  • Screenshot (current vs desired context — retained from original ticket):

  • Today's behavior (code): Expanded details for both flows use PeopleBox with inspection.people (job contacts / roles), not a dedicated inspector block. The collapsed event row subtitle appends inspector.name only when present (SingleEventBar). Inspection rows do not surface inspector identity in the bar.

Scope

Frontend — worklist UI

  • attik-frontend/src/components/task-check/WorklistResolver.tsx — Resolves worklist/:id/data and renders SingleJobsBar + SingleJobsDropdown for inspections, and SingleEventBar + SingleEventDropdown for events (plus grouped variants).
  • attik-frontend/src/components/task-check/SingleJobsBar.tsx / SingleJobsDropdown.tsx — Inspection row title is datetime, address, badges, and workorder link; the dropdown shows PaymentNotes, PeopleBox (inspection.people), and ActivityFeedno inspector phone/email block today.
  • attik-frontend/src/components/task-check/SingleEventBar.tsx — Uses event.inspector only for inspector.name in the subtitle line; SingleEventDropdown again uses PeopleBox on the linked inspection and RelatedEventsSection, not the event's inspector document for contact details.
  • attik-frontend/src/components/ui/PeopleBox.tsx — Renders people on the job (contacts by role); this is not the same as employee / inspector records on _inspectorId.

Backend — worklist data

  • attik-backend/src/routes/worklist.tsGET /worklist/:id/data builds pipelines via buildWorklistPopulationStages. For events, after loading the linked inspection, the pipeline $lookup inspectors and projects name, firstName, lastName, email, phone, image, thumb onto inspector (so email/phone can already exist on the payload for event rows). For inspections, getInspectionPopulationPipeline is invoked with includeInspectors: false everywhere in this builder, so assigned inspectors are not populated on inspection worklist rows today.

Decision needed

  • Whether inspector details should mirror workorder header behavior (multiple inspectors, requested vs assigned), primary inspector only, or event row inspector only for events; and whether mobile worklists (if any) stay out of scope.

References

  • Slack thread attachment on the issue (context): same Linear attachment "Message from ryan" as on the ticket.
  • Worklist API: attik-backend/src/routes/worklist.ts (GET /:id/data, buildWorklistPopulationStages).
  • Types: attik-frontend/src/util/types/serverTypeCollection/worklist.ts (EventWorklistResult documents inspector?: Inspector | null).

Please authenticate to join the conversation.

Upvoters
Status

Code Review

Board
🏠

Main App

Date

19 days ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.