feat: add branch overviews scoped outdoor plans and complete room moves

This commit is contained in:
jhartworks committed 2026-11-19 15:12:11 +01:00
1 parent 0cc4b35995
commit 9374ac9e35
9 files changed
+1144 -1025

No files matched your search

+5 -1
View File
@@ -19,11 +19,15 @@ $b['floors'][0]['building_id'] = 'ras19';
$outside = ['id' => 'garden', 'name' => 'Außen', 'building_id' => null, 'outdoor_location_id' => 'urbach', 'elevation' => 0, 'height' => 2.5,
'rooms' => [], 'openings' => [], 'placements' => [], 'outdoor' => [], 'furniture' => [['id' => 'garden-meter', 'type' => 'wallbox', 'name' => 'Gartengerät', 'entity' => 'sensor.203', 'x' => 1, 'z' => 2]]];
$b['floors'][] = $outside;
$b['floors'][] = [...$outside, 'id' => 'branch-garden', 'outdoor_location_id' => null, 'outdoor_branch_id' => 'hq', 'furniture' => [[...$outside['furniture'][0], 'id' => 'branch-meter', 'name' => 'Hofgerät']]];
$b['floors'][] = [...$outside, 'id' => 'building-garden', 'outdoor_location_id' => null, 'outdoor_building_id' => 'ras19', 'furniture' => [[...$outside['furniture'][0], 'id' => 'building-meter', 'name' => 'Terrassengerät']]];
$as('admin'); $method('authorizeApi', 'building/save', ['building' => $b]); $method('saveBuilding', $b);
check($method('building')['topology'] === $b['topology'], 'The complete hierarchy persists without changing native links');
$form = $module->GetConfigurationForm();
check(str_contains($form, 'Urbach / Zentrale / RAS19 / Erdgeschoss / Büro 2'), 'Room choices include their complete topology path');
check(str_contains($form, 'Urbach / Außen / Gartengerät'), 'Outdoor device grants belong to the location path');
check(str_contains($form, 'Urbach / Zentrale / Außen / Hofgerät'), 'Branch outdoor device grants use their own full path');
check(str_contains($form, 'Urbach / Zentrale / RAS19 / Außen / Terrassengerät'), 'Building outdoor device grants use their own full path');
$as('office');
$tree = $method('visibleTree', $method('objectTree'));
@@ -34,4 +38,4 @@ check($visible['topology'] === $b['topology'], 'Users retain the complete logica
check($visible['floors'][1]['furniture'][0]['entity'] === 'none', 'Unapproved outdoor status is still filtered server-side');
$as('empty');
check($method('visibleTree', $method('objectTree'))['variables'] === [], 'Adding topology cannot grant access to an empty account');
echo "OK: persisted five-level topology and location outdoors; complete grant choice paths; unchanged room keys; scoped state and native permissions\n";
echo "OK: persisted five-level topology with location/branch/building outdoors; complete grant choice paths; unchanged room keys; scoped state and native permissions\n";