fix: include tenantEmail and tenantEmailStatus in fetchAllLocations projection

Added tenantEmail and tenantEmailStatus fields to the MongoDB projection
in fetchAllLocations() so LocationCard can display email status indicators.

Previously these fields were always undefined in LocationCard because they
weren't included in the aggregation pipeline's $project stage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-12-29 21:11:07 +01:00
parent db9c57472d
commit fea0f48cec

View File

@@ -446,6 +446,8 @@ export const fetchAllLocations = withUser(async (user:AuthenticatedUser, year:nu
"bills.payedAmount": 1,
"bills.proofOfPayment.uploadedAt": 1,
"seenByTenantAt": 1,
"tenantEmail": 1,
"tenantEmailStatus": 1,
// "bills.attachment": 0,
// "bills.notes": 0,
// "bills.hub3aText": 1,