Devices OLT Kunden Update

Bei OLT Kunden wo Seriennummern gefunden es aber keine Kundenummer gibt, wird nun die Adresse angezeigt.

PopRacks Device Verlinkung
This commit is contained in:
Spi
2023-11-21 17:32:48 +01:00
parent 0ee388f3d6
commit 1cf99818c6
5 changed files with 19 additions and 37 deletions

View File

@@ -335,8 +335,8 @@ if ($devices->power != "0.0") {
<div class="float-right">
<a id="create-backup-href"
href="<?= self::getUrl("Device", "api", ['do' => 'createconfig', 'ip' => $devices->ip, 'id' => $devices->id]) ?>"
<button class="btn btn-primary "><span id="create-backup-button-text">Backup erstellen</span>
<span id="create-backup-load"></i></span></button>
<button class="btn btn-primary "><span id="create-backup-button-text">Backup erstellen</span>
<span id="create-backup-load"></i></span></button>
</a></div>
</div>
<?php
@@ -717,8 +717,10 @@ if ($devices->power != "0.0") {
allonts++;
if (typeof customers[ont['serial']] !== "undefined") {
customerid = customers[ont['serial']]['customer_number'];
if (customers[ont['serial']]['lastname'] != "") {
if (customers[ont['serial']]['lastname'] != "" && customers[ont['serial']]['lastname'] != null) {
customername = customers[ont['serial']]['lastname'] + " " + customers[ont['serial']]['firstname'];
} else if (customers[ont['serial']]['lastname'] == null) {
customername = customers[ont['serial']]['street'] + ", " + customers[ont['serial']]['zip'] + " " + customers[ont['serial']]['city']
} else {
customername = "" + customers[ont['serial']]['company'] + " (C)";
}
@@ -736,7 +738,6 @@ if ($devices->power != "0.0") {
<td class="sp-ont-text"><div class="text-decoration-underline" data-port="` + item['portsimple'] + `" data-ontid="` + o + `" data-portid="` + item['portindex'] + `" data-snr="` + ont['serial'] + `" data-toggle="modal" data-target="#ontDetailInfo">` + ont['serial'] + `</div></td>
</tr>
`);
});
$('#olt-splitter').append('<tr><td class=""><span title="Doppelklick zum editieren" data-portid="' + item['portindex'] + '" class="float-left sp-splitter-count-left ">' + allonts + '</span><span data-shown="0" data-port="' + item['portsimple'] + '" data-portid="' + item['portindex'] + '" data-splitcounter="' + datacounter + '" data-oltport=' + i + ' class="sp-splitter-count-show">show</span><span class="float-right sp-splitter-count-right"><span style="color: green">' + online + '</span>/<span style="color: red">' + offline + '</span></span></td></tr>');
} else {