From d3ae285aba4e7e4ac7567aa592793aab9c06a199 Mon Sep 17 00:00:00 2001 From: fixclean Date: Fri, 13 Feb 2026 10:43:06 +0100 Subject: [PATCH] TODOs --- app/modules/floor_infrastructure/edit.php | 210 +++++++++++++++++++++- 1 file changed, 206 insertions(+), 4 deletions(-) diff --git a/app/modules/floor_infrastructure/edit.php b/app/modules/floor_infrastructure/edit.php index 7f81936..ce42205 100644 --- a/app/modules/floor_infrastructure/edit.php +++ b/app/modules/floor_infrastructure/edit.php @@ -45,6 +45,20 @@ if ($type === 'outlet' && $id > 0) { $pageTitle = "Wandbuchse bearbeiten: " . htmlspecialchars($outlet['name']); } } + +$panel = $panel ?? []; +$outlet = $outlet ?? []; + +$defaultPanelSize = ['width' => 140, 'height' => 40]; +$defaultOutletSize = 32; + +if ($type === 'patchpanel') { + $panel['width'] = $panel['width'] ?? $defaultPanelSize['width']; + $panel['height'] = $panel['height'] ?? $defaultPanelSize['height']; +} + +$markerWidth = $type === 'patchpanel' ? $panel['width'] : $defaultOutletSize; +$markerHeight = $type === 'patchpanel' ? $panel['height'] : $defaultOutletSize; ?>
@@ -83,11 +97,28 @@ if ($type === 'outlet' && $id > 0) {
- +
- + +
+ + +
+ +
+
+
+
+

Ziehe das Patchpanel oder klicke auf den Plan, um die Position zu setzen.

+

Koordinate:

@@ -101,7 +132,7 @@ if ($type === 'outlet' && $id > 0) { -

TODO: Drag & Drop auf dem SVG-Plan erlauben.

+

Position und Größe folgen dem Drag-&-Drop auf dem Plan, damit alle Patchpanels einheitlich bleiben.

@@ -131,12 +162,29 @@ if ($type === 'outlet' && $id > 0) {
+
+ +
+
+
+
+

Klicke oder ziehe die Wandbuchse auf dem Plan. Die Größe bleibt quadratisch.

+

Koordinate:

+
+
+
-

TODO: Wandbuchsen gezielt auf dem Stockwerksplan platzieren.

+

Wandbuchsen bleiben quadratisch, ihre Position wird über die Karte festgelegt.

@@ -178,4 +226,158 @@ if ($type === 'outlet' && $id > 0) { font-size: 0.9em; color: #555; } +.floor-plan-block { + display: flex; + flex-direction: column; + gap: 6px; +} +.floor-plan-canvas { + position: relative; + width: 100%; + min-height: 260px; + border: 1px solid #d4d4d4; + border-radius: 8px; + background-color: #fff; + background-image: + linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px), + linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px); + background-size: 40px 40px; + cursor: crosshair; + overflow: hidden; +} +.floor-plan-marker { + position: absolute; + top: 0; + left: 0; + width: var(--marker-width, 32px); + height: var(--marker-height, 32px); + transition: left 0.1s ease, top 0.1s ease; + touch-action: none; +} +.floor-plan-marker.panel-marker { + background: rgba(13, 110, 253, 0.25); + border: 2px solid #0d6efd; + border-radius: 6px; +} +.floor-plan-marker.outlet-marker { + background: rgba(25, 135, 84, 0.25); + border: 2px solid #198754; + border-radius: 4px; +} +.floor-plan-hint { + font-size: 0.85em; + color: #444; + margin: 0; +} +.floor-plan-position { + margin: 0; + font-size: 0.85em; + color: #666; +} + +