Add Past Jobs section to inspector mobile job screen

Objective

  • Surface the Past Jobs section on the inspector mobile job screen so inspectors can see prior work at the same property without leaving the app.
  • Match the content parity of the existing web work order PastInspectionsSection — same data, same address-matched logic.
  • Position the section between Required Info and Payroll on the job detail screen.

Background

  • Ashley Assi requested the feature via Google Chat, noting it is not currently present in the mobile job view.
  • The web work order already surfaces a PastInspectionsSection component (attik-frontend: src/components/scheduling/PastInspectionsSection.tsx) that matches prior jobs at the same property using the GET /past-jobs endpoint (attik-backend: src/routes/pastJobs.ts).
  • The mobile job detail screen is composed in attik-mobile/app/(app)/inspection/[id].tsx, which already includes RequiredInfo and PayrollSection sections — the new section slots between them.
  • No equivalent past-jobs component or hook exists in attik-mobile today.

Product Decisions

Locked

  1. Placement — Past Jobs section renders between Required Info and Payroll on the mobile job detail screen.
  2. Content parity — Display matches what is shown in the web work order's Past Jobs section; no mobile-specific subset.
  3. Data source — Reuse the existing GET /past-jobs backend endpoint (attik-backend: src/routes/pastJobs.ts); no new backend work required.

Scope

Mobile

  • The job detail screen lives in attik-mobile/app/(app)/inspection/[id].tsx. The new PastJobsSection component should be inserted between the RequiredInfo and PayrollSection render positions in that file.
  • A new component (e.g. attik-mobile/components/inspection/PastJobsSection.tsx) and a corresponding data hook (e.g. hooks/usePastJobs.ts) need to be created to fetch from GET /past-jobs using the current inspection's property address fields.
  • The web reference implementation in attik-frontend/src/components/scheduling/PastInspectionsSection.tsx should be used as the authoritative model for data shape and display logic.

Backend

  • No changes required. The src/routes/pastJobs.ts endpoint is already in place and accepts zip, city, and street query params from the current inspection's property.

References

  • ATT-134 — Past Jobs or Quotes (web work order implementation, Done)
  • ATT-1213 — Include unit number in Past Jobs & Quotes address matching (open refinement)
  • ATT-1306 — Add search for past inspections in mobile app (related mobile history work, Done)
  • attik-frontend/src/components/scheduling/PastInspectionsSection.tsx
  • attik-backend/src/routes/pastJobs.ts

Please authenticate to join the conversation.

Upvoters
Status

Planned

Board
🏠

Main App

Date

About 3 hours ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.