Site visits
Read-only oversight of every inspection request, with filters, CSV export and a detail sheet showing progress, people, notes and findings.
A site visit is an inspection request: a tenant or buyer asks to view a property, the agent accepts or declines, the visitor pays the visit fee, and the visit takes place. Admins can see every visit here but cannot change one.
Where it lives
| Route | View / component | Access |
|---|---|---|
/dashboard/site-visits | src/views/site-visits/SiteVisits.tsx | Admin only |
| (side sheet) | src/views/site-visits/SiteVisitSheet.tsx | Opened from a row |
Also: src/views/site-visits/site-visit-columns.tsx, src/views/site-visits/site-visit-format.ts (status labels, summary numbers, CSV), src/services/site-visits/site-visits-thunk.ts, src/services/site-visits/site-visits-slice.ts (Redux slice siteVisits). Server side: getSiteVisits in service/src/controllers/admin.controller.ts and service/src/helpers/site-visit.ts.
Before you start
- Signed in as an admin.
- The page is read-only. Accepting, declining, paying for and completing visits all happen in the other apps.
Flow
Browse the table
- Opening the page sends
GET /api/v1/admin/inspections. All visits come back in one response, including cancelled ones and visits to deleted listings, and are stored insiteVisits.visits. - Four cards summarise the loaded list:
| Card | Value | Line underneath |
|---|---|---|
| Visit requests | All visits | "N requested this month" |
| Awaiting agent | Visits the agent has not answered yet | "Agents yet to accept or decline" |
| Upcoming | Visits dated in the future that are not cancelled or completed | "Next on date", or "Nothing booked ahead" |
| Paid visits | Visits with payment status paid | "amount in visit fees" |
- The table columns:
| Column | Shows | Sortable | Notes |
|---|---|---|---|
| (checkbox) | Row selection | No | |
| Property | Cover image, title, area (community, LGA, state) | Yes | "Listing removed" if the property is gone; "Deleted listing" in red if soft-deleted. Cannot be hidden. |
| Visitor | Avatar, name, email | Yes | "Unknown visitor" if missing |
| Agent | Avatar, name, email of the host | Yes | "No agent" if missing |
| Visit date | Date and time; for open visits also a relative time such as "in 3 days" | Yes | Default sort, newest first |
| Status | See the table below; hover for an explanation | Yes | |
| Payment | "paid" or "unpaid", with the fee when paid | Yes | |
| Requested | Date the request was made | Yes | Hidden by default |
| (actions) | Three-dot menu | No |
- Status values:
| Label | Stored value | Meaning shown on hover |
|---|---|---|
| Awaiting agent | pending_review | "The agent has not accepted the request yet" |
| Awaiting payment | in_progress | "Accepted by the agent; the visitor has not paid the fee" |
| Scheduled | scheduled | "Paid for and booked" |
| Completed | completed | "The visit took place" |
| Cancelled | cancelled | "Declined by the agent or called off" |
- Toolbar, left to right:
- Search box "Search property, visitor or agent…". Matches property title and area, visitor name, email and phone, agent name and email, and the payment reference.
- Filter buttons "Status" (the five labels above), "Payment" (Paid, Unpaid) and "When" (Upcoming, Past, judged by visit date against now).
- "Reset" appears once a search or filter is active.
- A refresh icon button refetches the list (it spins while loading).
- "Export" downloads every row matching the current search and filters, in the current sort order.
- "View" toggles the Visitor, Agent, Visit date, Status, Payment and Requested columns.
- Paging works as on the Users table: "Rows per page" (10, 20, 30, 50, 100), page buttons, and
?page=2in the URL.
Select rows and export
- Tick rows to switch the toolbar to "N selected".
- "Copy visitor emails" copies the selected visitors' emails, comma separated, with repeats removed. It is disabled when none of the selected rows has a visitor email.
- "Export CSV" downloads only the selected rows. "Clear" drops the selection.
- Both exports create
homelinkhub-site-visits-YYYY-MM-DD.csvwith the columns Visit date, Status, Property, Location, Visitor, Visitor email, Visitor phone, Agent, Agent email, Payment, Fee (NGN), Payment reference, Requested. The file is built in the browser. Text that a spreadsheet could run as a formula is escaped; phone numbers are left as they are.
Row menu
| Item | Does |
|---|---|
| "View details" | Opens the detail sheet |
| "Copy visitor email" | Copies it to the clipboard (shown only when there is one) |
| "Copy agent email" | Copies it to the clipboard (shown only when there is one) |
| "Open listing" | Opens the listing on the consumer site in a new tab; hidden when the listing is removed or deleted |
Open the detail sheet
- Click a row (or focus it and press Enter), or choose "View details". A sheet slides in from the right. No request is sent; the sheet uses the row already loaded.
- Header: cover image, the status and payment pills, "Listing deleted" where relevant, the property title, the full location and the visit date and time (with a relative time while the visit is still open).
- "Progress" is a timeline built from the visit's fields:
| Step | Appears when | Detail line |
|---|---|---|
| "Visit requested" | Always | Date and time requested |
| "Waiting for the agent" | Status is awaiting agent | |
| "Accepted by the agent" | The agent approved | Date and time decided |
| "Declined by the agent" | The agent rejected (the timeline ends here) | Date and time decided |
| "Waiting for the visitor to pay" | Accepted but unpaid | |
| "Visit fee paid" | Payment status is paid | Fee and payment reference |
| "Visit day" | Not completed or cancelled | Visit date and relative time |
| "Visit completed" | Status is completed | Completion date |
| "Cancelled" | Status is cancelled | Cancellation date |
Green dots are done, amber is the current step, red is a failed step and hollow is still to come.
4. "People": a "Visitor" card and an "Agent" card with name, role, a mailto: email link and a tel: phone link. A missing person shows "Not on record".
5. "Notes" (only when present): "From the visitor", "From the agent", "Reason for cancelling".
6. "Findings" (only when present): "Condition", "Issues", "Report".
7. "Reference": "Visit ID", "Payment ref" (when there is one) and "Last updated".
8. "Open listing" at the bottom opens the listing on the consumer site in a new tab. It is hidden for removed or deleted listings.
9. Close the sheet with its close button, Escape, or a click outside it.
States and edge cases
- Loading: skeleton rows and skeleton card values on first load. A refresh keeps the current rows on screen while it runs.
- Error: a red banner "Failed to fetch site visits" with a "Retry" button.
- Empty: "No site visits found" with "Visits appear here once tenants request them." when there are none at all, or "Try a different search or clear the filters." when filters hide them.
- The agent shown is the one recorded on the visit once it is paid for. Before that, the property's agent is used, or its landlord if there is no agent.
- The visitor's note and the cancellation reason share one stored field. The server presents it as the visitor's note until the visit is cancelled, and as the reason afterwards.
- The sheet shows the copy of the visit that was loaded with the list. Use the refresh button and reopen the row to see later changes.
- Fees are displayed in naira with no decimals; a missing fee shows as a dash.
What happens next
- Nothing here changes a visit. Use the contact links in the sheet to reach the visitor or agent, and the CSV for reconciliation.
- The fee an agent charges for a visit defaults to the "Inspection Fee Payment" value in Platform settings unless the agent has set their own.
Users
The user table, search and filters, CSV export, the user detail dialog with its Properties and Legal Work tabs, and activating, deactivating and re-roling accounts.
Duplicate listings
The queue of new listings held because they resemble an existing one, the side-by-side review sheet, and the two resolve actions.