Fix missing LGU/tenant relations and display in tables; Add LGU hierarchy tests

This commit is contained in:
ramram1515
2026-07-07 12:03:24 +08:00
parent 0379e3de0d
commit 76b70d3aea
31 changed files with 370 additions and 10 deletions

View File

@@ -31,6 +31,10 @@ class UserDetailResource extends JsonResource
'created_at' => $this->created_at?->toIso8601String(),
'profile' => $profile?->toArray(),
'has_household' => $this->headedHousehold()->exists() || $this->householdMemberships()->exists(),
'tenant' => $this->whenLoaded('tenant', fn () => [
'id' => $this->tenant->id,
'name' => $this->tenant->name,
]),
];
}
}