Pop Erweiterung

- RackModule können nun beim Bearbeiten getauscht werden
This commit is contained in:
Daniel Spitzer
2025-06-03 12:50:39 +02:00
parent 0fbce611eb
commit fc088d8ab1
2 changed files with 13 additions and 4 deletions

View File

@@ -91,7 +91,6 @@ class PoprackmoduleController extends mfBaseController
}
}
$data = [];
if ($r->type == 0) {
$data['ports'] = ($r->ports) ? $r->ports : null;
$data['plug'] = ($r->plug) ? $r->plug : null;
@@ -102,7 +101,7 @@ class PoprackmoduleController extends mfBaseController
}
} else if ($poprackmodulepatchcounter < $data['ports']) {
$datapatchModel=[];
$datapatchModel = [];
for ($i = $poprackmodulepatchcounter + 1; $i <= $data['ports']; $i++) {
$datapatchModel['poprackmodule_id'] = $id;
$datapatchModel['port'] = $i;
@@ -111,6 +110,12 @@ class PoprackmoduleController extends mfBaseController
}
}
} else {
$data['ports'] = null;
$data['plug'] = null;
}
if (is_numeric($r->type)) {
$data['type'] = $r->type;
}
$data['name'] = ($r->name);
$poprackmodule->update($data);