TidyLinker.com
TypeScript
Pull Request Opened
PR #130 opened: feat: admin jobs board
Summary
New /admin/jobs section providing full job administration.
Index page (/admin/jobs):
- Paginated list of all jobs across all statuses
- Search by description, postcode, or client name (case-insensitive via LOWER())
- Status filter tabs with live counts (Open / Pending / In Progress / Completed / Draft / Cancelled / All)
- Quote presence filter (any / has quotes / no quotes)
- Each row: status badge, client name, services, masked postcode, preferred date, budget, quote count, message thread count
- Open jobs shown first, then ordered by most recently posted
Show page (/admin/jobs/{uid}):
- Full job details: services, location (full postcode + address), property type, schedule, budget, special notes, duration estimate
- All quotes with cleaner info — each cleaner name links to admin user page
- All message threads with cleaner names (linked) and message counts
- Photos gallery using signed URLs from JobPostingPhoto::getSignedUrl()
- Review section if the job has one (star rating, title, body)
- Client and direct-booking cleaner shown in sidebar — both linked to admin user pages
- "View public page" + "Copy link" actions for open jobs (links to /jobs/{uid})
- Cancel job action (also cancels all submitted quotes)
- Reopen action for cancelled jobs
Sidebar: "Jobs" nav item added between Dashboard and Verifications.
Routes: index/show plus POST cancel/reopen actions, all admin-gated.
Tests: 17 tests covering auth, role, list filters, search, status filter, has_quotes filter, show details, public URL exposure, cancel happy path + quote cancellation + non-cancellable error, reopen happy path + non-cancelled error.
Test plan
- 93 admin tests pass (424 assertions)
- Pint, Prettier, ESLint clean
-
npm run buildclean - Visit
/admin/jobs— listing renders with all real production jobs - Click a job — show page renders with quotes, threads, photos, client
- "View public page" opens
/jobs/{uid}in new tab - "Copy link" copies the public URL
- Cancel an open job → quotes also cancelled, status changes
- Reopen cancelled job → status returns to open
+1747
additions
-1
deletions
7
files changed