UI Improvements and TV mode
This commit is contained in:
@@ -57,6 +57,18 @@ function personRequiresPinToActivate(?array $person): bool {
|
||||
return ($person['role'] ?? '') === ROLE_HEAD && !empty($person['pin_hash']);
|
||||
}
|
||||
|
||||
/**
|
||||
* True when at least one person is recorded as Head of household (setup complete).
|
||||
*/
|
||||
function familyHubHasHeadOfHousehold(array $people): bool {
|
||||
foreach ($people as $p) {
|
||||
if (($p['role'] ?? '') === ROLE_HEAD) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function assertHoHCanManagePeople(array $people): void {
|
||||
if (count($people) === 0) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user