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
PastInspectionsSectioncomponent (attik-frontend:src/components/scheduling/PastInspectionsSection.tsx) that matches prior jobs at the same property using theGET /past-jobsendpoint (attik-backend:src/routes/pastJobs.ts). - The mobile job detail screen is composed in
attik-mobile/app/(app)/inspection/[id].tsx, which already includesRequiredInfoandPayrollSectionsections — the new section slots between them. - No equivalent past-jobs component or hook exists in attik-mobile today.
Product Decisions
Locked
- Placement — Past Jobs section renders between Required Info and Payroll on the mobile job detail screen.
- Content parity — Display matches what is shown in the web work order's Past Jobs section; no mobile-specific subset.
- Data source — Reuse the existing
GET /past-jobsbackend 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 newPastJobsSectioncomponent should be inserted between theRequiredInfoandPayrollSectionrender 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 fromGET /past-jobsusing the current inspection's property address fields. - The web reference implementation in
attik-frontend/src/components/scheduling/PastInspectionsSection.tsxshould be used as the authoritative model for data shape and display logic.
Backend
- No changes required. The
src/routes/pastJobs.tsendpoint is already in place and acceptszip,city, andstreetquery 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.tsxattik-backend/src/routes/pastJobs.ts