TidyLinker.com
TypeScript
Pull Request Merged
PR #55 merged: Add cleaner earnings, dashboard KPIs, and client invoice PDFs
Summary
- KPI Dashboard Widgets: Replace "Coming Soon" placeholders with real data (earnings this month, jobs completed, hours worked, average rating)
- Cleaner Earnings Ledger: New page at
/cleaner/earningswith payment history and payout status badges - Client Invoice PDFs: Download PDF invoices for completed jobs with cleaner amount, platform fee, and total breakdown
Changes
Backend
CleanerDashboardStatsDataDTO for dashboard KPIsEarningsControllerwith paginated payment historyEarningEntryDataDTO for earnings entriesInvoiceDataDTO andGenerateInvoicePdfaction using laravel-dompdfPaymentPolicywithviewInvoiceauthorizationpayments()hasManyThrough relationship on JobPosting
Frontend
- Updated cleaner Dashboard with real KPI values
- New
Earnings/Index.tsxpage with summary cards and payment table - Added payout status types to StatusBadge (
processing,paid,failed) - Download Invoice button on completed job view
Tests
- 22 feature tests covering DTOs, controllers, and actions
- 13 browser tests for dashboard stats, earnings page, and invoice download
Test plan
- Login as cleaner, verify dashboard shows real earnings/jobs/rating
- Visit
/cleaner/earnings, verify payment history displays correctly - Login as client with completed job, verify Download Invoice button appears
- Click Download Invoice, verify PDF downloads with correct details
+2834
additions
-81
deletions
32
files changed