Display Referral Source on the Work Order

Objective

  • Surface the Referral Source field on the Work Order so team members can see it while reviewing a job without leaving the page or exporting data.
  • Eliminate the current friction of having to download a full inspections export and match by address or invoice number to find this value for a single job.
  • Ensure parity between the booking form and the Work Order — Referral Source is the only booking-form field that disappears after a quote converts to an inspection.

Background

  • Referral Source is collected during the quote and online scheduling flows and stored on both the Quote and Inspection records.
  • The field is already available in Reports Hub under both the Inspections and Quotes collections, labeled "Referral Source," and is filterable.
  • No Work Order UI component currently renders referralSource — it was never added, not removed. The BookingDetailsBox component is the natural home for this field as it already groups booking-origin context (Scheduled By, Confirmed By, Canceled By).
  • The InspectionFullyPopulated type already passes the inspection object into BookingDetailsBox, so referralSource is available in the component's props with no additional fetching required.

Product Decisions

Locked

  1. Display location — Show Referral Source in the existing BookingDetailsBox component on the Work Order, alongside the other booking context fields.
  2. Display behavior — Show the field only when a value is present; omit it entirely if referralSource is null or an empty string.

Open

  1. Editability — Should Referral Source be read-only on the Work Order, or should team members be able to update it after booking? If editable, a PATCH to the inspection endpoint is straightforward, but the UX pattern (inline edit vs. modal) needs a decision. Read-only is the safe default.

Scope

Frontend (attik-frontend)

  • src/app/tools/inspections/[id]/components/BookingDetailsBox.tsx — Primary change. Add a Referral Source row below the existing Scheduled/Confirmed/Canceled grid. Reads inspection.referralSource; renders conditionally when present.
  • src/app/tools/inspections/[id]/components/WorkorderPage.tsx — No changes expected; inspection is already passed to BookingDetailsBox.

References

  • referralSource field definition in src/config/exportFieldDefinitions.ts (both inspectionFields and quoteFields)
  • src/models/inspectionSchema.ts — confirms field stored on inspection
  • src/util/functions/inspection/createInspection.ts — confirms field written at booking time

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.