Ho Ngoc Hai
b60b327508
feat(agents): consolidate getDashboard into single aggregate SQL query
Replaces 7 separate Prisma/DB round-trips (findUniqueOrThrow + groupBy +
2x inquiry.count + 2x listing.count + review.aggregate) with a single
parameterised CTE query via \$queryRaw. Response shape is unchanged.
- Adds AgentStatsRow interface for typed raw result
- Removes now-unused getInquiryStats / getListingStats private helpers
- Updates test to mock \$queryRaw; adds "agent not found" error path test
- All agents tests pass (35 tests, pre-existing env-secret failure skipped)
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 14:03:08 +07:00
..
2026-04-24 14:03:08 +07:00
2026-04-09 01:23:06 +07:00
2026-04-14 14:57:59 +07:00
2026-04-07 23:52:33 +07:00
2026-04-24 13:59:21 +07:00
2026-04-08 13:15:36 +07:00
2026-04-24 13:55:03 +07:00
2026-04-08 00:24:42 +07:00