Stu Mason
Stu Mason

Activity

StuMason/cleanconnect
TidyLinker.com
TypeScript
Pull Request Merged

PR #117 merged: feat: fix admin user detail 404 and build comprehensive admin view

Summary

  • Fixed 404 on admin user detail pages (route bound by Sqid UID instead of numeric ID)
  • Completely rebuilt the user detail page with full admin visibility

The 404 fix

One line: {user}{user:id} in routes/admin.php. The User model uses Sqid UIDs for public route binding, but admin routes should use numeric IDs.

The new admin user page

Pending reasons banner — amber warning showing exactly WHY a user isn't live:

  • "Email not verified"
  • "Onboarding incomplete (step 2 of 5)"
  • "ID or Right to Work verification missing"
  • "Profile visibility is off"

Account status row — quick glance cards for:

  • Profile visibility (visible/hidden)
  • Onboarding progress (step X of 5 or completed date)
  • Stripe Connect status (not connected/onboarding/active/restricted)
  • Message thread count

Activity stats — big number cards:

  • Cleaners: quotes (total/accepted/declined), earnings, reviews received, avg rating
  • Clients: jobs posted/completed, total spent, reviews written

Recent quotes table — last 10 quotes with date, job description, amount, status

Recent payments table — last 10 payments with role (paid/earned), amount, fees, status

Reviews received — last 5 with star ratings, client names, review body

Enhanced profile cards — services list, service area, company info for company profiles

Public profile link — button to view the cleaner's public profile (only shown when profile is live)

Test plan

  • 1032 tests pass (0 failures)
  • Build passes clean
  • QA: click user in admin list → page loads (no 404)
  • QA: pending cleaner shows pending reasons banner
  • QA: active cleaner shows stats, quotes, payments, reviews
  • QA: client shows jobs posted, payments made
  • QA: company profile shows company name in profile card
+847
additions
-151
deletions
4
files changed