Add user count column to residences admin page

- Add user_count field to ResidenceResponse DTO
- Update residence handler to preload Users and calculate count
- Count includes owner (1) plus all shared users
- Add Users column to admin residences list

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-09 18:40:30 -06:00
parent 68a4c28d68
commit 56b60fcfc8
4 changed files with 12 additions and 1 deletions
@@ -57,6 +57,10 @@ const columns: ColumnDef<Residence>[] = [
accessorKey: 'owner_name',
header: 'Owner',
},
{
accessorKey: 'user_count',
header: 'Users',
},
{
accessorKey: 'city',
header: 'Location',
+1
View File
@@ -109,6 +109,7 @@ export interface Residence {
purchase_price?: number;
is_primary: boolean;
is_active: boolean;
user_count: number;
created_at: string;
updated_at: string;
}