@@ -77,9 +77,6 @@ $isEndpointAllowed = static function (string $type, int $id) use ($occupiedByTyp
|
||||
if ($id <= 0) {
|
||||
return false;
|
||||
}
|
||||
if ($type === 'outlet') {
|
||||
return true;
|
||||
}
|
||||
if ($type === $portAType && $id === $portAId) {
|
||||
return true;
|
||||
}
|
||||
@@ -173,7 +170,14 @@ foreach ($outletPorts as $row) {
|
||||
if (!$isEndpointAllowed('outlet', $id)) {
|
||||
continue;
|
||||
}
|
||||
$parts = array_filter([(string)($row['floor_name'] ?? ''), (string)($row['room_name'] ?? ''), (string)$row['outlet_name'], (string)$row['name']]);
|
||||
$portName = trim((string)($row['name'] ?? ''));
|
||||
$includePortName = ($portName !== '' && strcasecmp($portName, 'Port 1') !== 0);
|
||||
$parts = array_filter([
|
||||
(string)($row['floor_name'] ?? ''),
|
||||
(string)($row['room_name'] ?? ''),
|
||||
(string)$row['outlet_name'],
|
||||
$includePortName ? $portName : '',
|
||||
]);
|
||||
$endpointOptions['outlet'][] = [
|
||||
'id' => $id,
|
||||
'label' => implode(' / ', $parts),
|
||||
|
||||
Reference in New Issue
Block a user