Product EngineeringFeaturesB2B CollectionFrontendlivehealth-frontend

Route & trip management UI

Stops, routes, and trips for organization sample collection under Registration → B2B Collection

👤 Utsav Katiyar📅 Updated: Apr 7, 2026🏷️ feature

Route & trip management UI

Source root: src/components/Registration/Components/B2bCollection/.

This UI is for labs planning sample collection from organization (B2B) sites: define stops, chain them into routes, and run trips with pickup staff. “Bulk” on trips refers to bulk trip creation (e.g. recurring schedules), not bulk rows in some other domain.


Route Management

Entry: RouteManagement/index.tsx

  • GridRoutesGrid.tsx lists routes (copy, edit, delete).
  • Add / EditAddEditRouteModal.tsx builds a route from ordered route locations; each references a stop (RouteLocation in utils/interface.ts).
  • DeleteDeleteRouteConfirmation.tsx (backend PATCH disable where applicable).

Services: RouteManagement/utils/services.tsapi-v3/trip-management/b2b-logistics/routes/…


Trip Management

Entry: TripManagement/index.tsx

  • ListTripListTabs.tsx, TripListGrid.tsx with date range + status filters (TRIP_FILTER_OPTIONS).
  • Create / EditAddEditTripModal.tsx; recurring schedules use POST …/trips/new/bulk when scheduled_trips is set.
  • Stop-wiseStopWiseGrid.tsx.
  • CancelCancelTripModal.tsxPUT …/trips/{id}/cancelled.
  • MapsTripMapModal.tsx, GoogleRouteMap.tsx, InteractiveGoogleMap.tsx, useGoogleDirectionsRoute.ts.

Trip detail (TripManagement/Components/TripDetails/):

  • Trip status, pickup person, timeline.
  • Sample detailsSampleDetailsModal.tsx when the API returns sample counts per stop.
  • CommentsCommentsModal.tsx (TRIP_LOCATION_COMMENT_KEYS).

Stops (locations)

Add / Edit stopReusables/AddEditStopModal.tsx (Stop: name, coordinates, address, contact, note).

Services: B2bCollection/utils/services.ts

  • POST /api-v3/trip-management/b2b-logistics/location/new
  • GET /api-v3/trip-management/b2b-logistics/location/list

Trip status UX

TRIP_STATUS_MAPPING and STOP_STATUS_MAPPING in utils/constants.ts map backend enums to labels and badge colors.


Shared layout

  • Reusables/Header.tsx — search, date range, actions.
  • Reusables/EmptyScreen.tsx — empty state.

On this page