Device Update
* Customer Search erweitert
This commit is contained in:
@@ -211,7 +211,9 @@ foreach ($devicesall as $deviceall) {
|
||||
<?php if ($devices->parent_id) : ?>
|
||||
<tr>
|
||||
<th>Parent Device</th>
|
||||
<td><a href="<?= self::getUrl("Device", "Detail", ["id" => $devices->parent_id]) ?>"><?= $DevicesAll[$devices->parent_id]?></a></td>
|
||||
<td>
|
||||
<a href="<?= self::getUrl("Device", "Detail", ["id" => $devices->parent_id]) ?>"><?= $DevicesAll[$devices->parent_id] ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
@@ -728,13 +730,21 @@ foreach ($devicesall as $deviceall) {
|
||||
allonts++;
|
||||
if (typeof customers[ont['serial']] !== "undefined") {
|
||||
customerid = customers[ont['serial']]['customer_number'];
|
||||
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 {
|
||||
|
||||
|
||||
if (customers[ont['serial']]['company'] != "" && customers[ont['serial']]['company'] != null) {
|
||||
|
||||
customername = "" + customers[ont['serial']]['company'] + " (C)";
|
||||
} else if (customers[ont['serial']]['lastname'] != "" && customers[ont['serial']]['lastname'] != null) {
|
||||
customername = customers[ont['serial']]['lastname'] + " " + customers[ont['serial']]['firstname'];
|
||||
} else if (customers[ont['serial']]['TerminationContact'] != "" && customers[ont['serial']]['TerminationContact'] != null) {
|
||||
customername = customers[ont['serial']]['TerminationContact'];
|
||||
} else if (customers[ont['serial']]['BuildingContact'] != "" && customers[ont['serial']]['BuildingContact'] != null) {
|
||||
customername = customers[ont['serial']]['BuildingContact'];
|
||||
} else if (customers[ont['serial']]['lastname'] == null) {
|
||||
|
||||
}
|
||||
customername +=' <br>'+ customers[ont['serial']]['street'] + ", " + customers[ont['serial']]['zip'] + " " + customers[ont['serial']]['city']
|
||||
} else {
|
||||
customername = "N/A";
|
||||
customerid = "N/A";
|
||||
@@ -749,20 +759,25 @@ foreach ($devicesall as $deviceall) {
|
||||
<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 {
|
||||
$('#olt-splitter').append('<tr><td class=""><span title="Doppelklick zum editieren" data-portid="' + item['portindex'] + '" class="float-left sp-splitter-count-left ">N/A</span><span class="float-right sp-splitter-count-right">N/A</span></td></tr>');
|
||||
}
|
||||
datacounter++;
|
||||
});
|
||||
}
|
||||
)
|
||||
;
|
||||
$('#olt-datatables').show();
|
||||
}
|
||||
|
||||
$('.spinner-big').hide();
|
||||
$('#olt-info').show();
|
||||
|
||||
}).done(function (data) {
|
||||
}
|
||||
).done(function (data) {
|
||||
var hidesearch = [3];
|
||||
let table;
|
||||
if (typeof hidesearch === "undefined") {
|
||||
|
||||
@@ -144,7 +144,7 @@ class DeviceModel
|
||||
{
|
||||
$items = [];
|
||||
$db = FronkDB::singleton();
|
||||
$sql = "Select Patching.id,lastname,firstname,customer_number,company,device_name,device_port,value_string,Building.`street`,Building.`zip`, Building.`city` FROM Workflowvalue
|
||||
$sql = "Select Patching.id,lastname,firstname,customer_number,company,device_name,device_port,value_string,Building.`street`,Building.`zip`, `Building`.`city`,`Building`.`contact` `BuildingContact`,`Termination`.`contact` TerminationContact FROM Workflowvalue
|
||||
LEFT JOIN Termination ON Termination.id=Workflowvalue.object_id LEFT JOIN Patching ON Termination.id = Patching.termination_id
|
||||
LEFT JOIN OrderProduct ON (Patching.termination_id=OrderProduct.termination_id)
|
||||
LEFT JOIN `Order` ON (`Order`.id=OrderProduct.order_id)
|
||||
|
||||
Reference in New Issue
Block a user