Skip to Content
HomeLink Hub

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.

Where it lives

RouteView / componentAccess
/dashboard/userssrc/views/users/Users.tsxAdmin only
(dialog)src/views/users/UserDetailDialog.tsxOpened from a row
(dialog tab)src/views/users/UserPropertiesPanel.tsxAgents, landlords, developers
(dialog tab)src/views/users/UserLegalPanel.tsxLawyers

Also: src/views/users/user-columns.tsx (columns and filter options), src/views/users/user-format.ts (KYC status, CSV), src/services/users/users-thunk.ts, src/services/users/users-slice.ts (Redux slice users). Server side: service/src/controllers/admin.controller.ts.

Before you start

  • Signed in as an admin.
  • The whole user list is loaded in one request and searched, filtered, sorted and paged in the browser.

Flow

Browse the table

  1. Opening the page sends GET /api/v1/admin/users. The result is stored in users.users.
  2. Four cards summarise the loaded list:
CardValueLine underneath
Total usersNumber of users"Every role, including admins"
ActiveUsers with an active account"N% of users"
KYC verifiedUsers whose KYC status is VERIFIED"N% of users"
Joined this monthUsers created since the 1st (browser time)"Since the 1st"
  1. The table columns:
ColumnShowsSortableNotes
(checkbox)Row selection; the header box selects every row on the current pageNo
UserAvatar or initials, full name, emailYesCannot be hidden
RoleTENANT, LANDLORD, AGENT, LAWYER, DEVELOPER or ADMINYes
KYCVERIFIED, PENDING or REJECTEDYesFrom the KYC record; older accounts fall back to the verified flag
StatusGreen dot "Active" or red dot "Inactive"Yes
PhonePhone number or a dashNoHidden by default
Email verified"Yes" or "No"NoHidden by default
JoinedSign-up dateYesDefault sort, newest first
(actions)Three-dot menuNo
The users table, with the stat cards above it.
The users table, with the stat cards above it.
  1. Toolbar, left to right:
    • Search box "Search name, email or phone…". Matches first name, last name, email, phone and business name.
    • Filter buttons "Role" (Tenant, Landlord, Agent, Lawyer, Developer, Admin), "KYC" (Verified, Pending, Rejected) and "Status" (Active, Inactive). Each allows several ticks at once.
    • "Reset" appears once a search or filter is active and clears them all.
    • "Export" downloads every row that matches the current search and filters, in the current sort order.
    • "View" opens "Toggle columns" to show or hide Role, KYC, Status, Phone, Email verified and Joined.
  2. Click a sortable column header for "Ascending", "Descending" or "Hide column".
  3. Under the table: the result count ("N results"), "Rows per page" (10, 20, 30, 50, 100) and first, previous, next and last page buttons. The page is kept in the URL as ?page=2.

Select rows and export

  1. Tick one or more rows. The toolbar is replaced by a bar reading "N selected".
  2. "Copy emails" copies the selected users' emails, comma separated; the button reads "Copied" for a moment.
  3. "Export CSV" downloads only the selected rows. "Clear" drops the selection.
  4. Both exports create homelinkhub-users-YYYY-MM-DD.csv with the columns First name, Last name, Email, Phone, Role, KYC, Active, Email verified, Joined. The file is built in the browser; no request is sent.

Open a user

  1. Click a row (or focus it and press Enter), or choose "View details" from the row's three-dot menu. The user is stored in users.selectedUser and the dialog opens.
  2. The header shows the avatar or initials, the name, a role drop-down and the Active or Inactive indicator.
  3. Roles with listed or legal work get two tabs. Tenants and admins have no tabs and see the profile only.
RoleTabs
AGENT, LANDLORD, DEVELOPER"Profile", "Properties"
LAWYER"Profile", "Legal Work"
  1. The "Profile" content:
    • "Contact": email (with a green shield when the email is verified), phone, state and country, business name. Missing items are left out.
    • "Bio", when the user has one.
    • "KYC Status": Verified, Pending or Rejected, with "Verified date" when known.
    • "Security": "2FA: Enabled" or "Disabled"; "Email: Verified" or "Unverified".
    • "Joined date · Updated date".
  2. The footer always has "Deactivate User" or "Activate User", and "Close".
The user detail dialog on the Profile tab, for an agent.
The user detail dialog on the Profile tab, for an agent.

Properties tab

  1. Click "Properties". The first time for this user the app sends GET /api/v1/admin/users/{id}/properties; the result is stored in users.userProperties.
  2. Each property card shows a thumbnail, title, price (sale price, or yearly rent as "amount/yr", with "(N yrs up front)" for multi-year terms), status and legal-status badges, type, location and "Listed date". Deleted listings stay in the list with a dashed border and a "Deleted" badge.
  3. Click the "Legal review" row on a card to expand it. The row shows the review status, or "never assigned".
  4. An expanded review shows "Reviewed by", "Decided", "Outcome", "Checklist" (tick for pass, cross for fail, with any comment), "Notes", "Documents reviewed" (links labelled "Image 1", "Video 1" and so on that open in a new tab) and "Documents submitted by lister" (newest batch first, with sender, note and file sizes).
  5. Only one review is expanded at a time.
The user detail dialog on the Properties tab, with each listing's legal review status.
The user detail dialog on the Properties tab, with each listing's legal review status.
  1. Click "Legal Work" on a lawyer. The first time, the app sends GET /api/v1/admin/users/{id}/legal-assignments; the result is stored in users.legalAssignments and users.legalCounterparties.
  2. "Working with (N)" lists the agents and landlords behind the lawyer's assignments: name, role, "N properties" and an "Active" badge if any of that work is still open, otherwise "Past".
  3. "Assigned properties (N)" lists each assignment: property title, assignment status, "listing: status", legal status, a "Deleted" badge where relevant, and "Assigned date · due date".
  4. Click an assignment to expand it: "Listed by", "Assigned by", "Decision" with its date, the decision notes, "Documents reviewed" and "Documents submitted by lister".

Activate or deactivate a user

  1. Use "Deactivate" or "Activate" in the row's three-dot menu, or "Deactivate User" or "Activate User" in the dialog footer.
  2. The app immediately sends PATCH /api/v1/admin/users/{id}/status with body { "isActive": false } (or true).
  3. On success the row, the dialog and the "Active" card update from the Redux users slice. There is no list refetch.

Change a role

  1. In the dialog header, pick a new value in the role drop-down (TENANT, LANDLORD, AGENT, LAWYER, DEVELOPER, ADMIN).
  2. The app immediately sends PATCH /api/v1/admin/users/{id}/role with body { "role": "AGENT" }.
  3. On success the row badge and the dialog update, and the dialog's tabs change to match the new role.

No confirmation and no feedback on failure

Status and role changes fire on the first click, with no confirmation dialog and no success message. If the request fails, the view shows nothing and the row keeps its old value. The server does not stop an admin from deactivating or demoting their own account, so take care.

Other row actions

  • "Copy email" in the three-dot menu copies that user's email to the clipboard.

States and edge cases

  • Loading: skeleton rows in the table and skeleton values in the cards on first load.
  • List error: a red banner "Failed to fetch users" with a "Retry" button that refetches.
  • Empty or no match: "No users found" / "Try a different search or clear the filters."
  • Tab loading: three skeleton blocks. Tab error: "Failed to fetch user properties" or "Failed to fetch legal assignments" in red; switch tabs to try again.
  • Empty tabs: "This user has not listed any properties." and "This lawyer has not been assigned any properties to verify."
  • A property with no review shows "This property has never been assigned for legal verification, so there are no documents on file." A review with no files shows "No documents were attached to this review."
  • An assignment whose property no longer exists is titled "Property no longer available".
  • Opening a different user clears the previous user's tab data straight away, so one user's properties are never shown under another's name.
  • If you change a user's role while their work tab has already been loaded, the new tab can appear empty because the data is not refetched. Close and reopen the dialog.
  • Changing search, filters or sorting returns the table to page 1. Editing a user does not.

What happens next

  • Deactivated accounts are refused at sign-in with "Your account has been deactivated. Please contact support." In the service code read for this guide, the active flag is checked at sign-in only, so a session that is already open is not ended by deactivation.
  • Deactivated lawyers disappear from the "Default lawyer" list in Platform settings. If the saved default lawyer is deactivated or re-roled, that page warns that new listings are no longer being assigned.
  • The API reads a user's role from the database on every request, so a role change applies to their permissions straight away. Changing someone to ADMIN gives them access to this panel.

On this page