Added icons to order when patched and cpe ready

This commit is contained in:
Frank Schubert
2021-10-19 22:46:45 +02:00
parent 43f11a20f9
commit 8371da7350

View File

@@ -268,6 +268,8 @@
$voip = false;
$hw = false;
$cpe_config_finished = false;
$patched = false;
if(count($order->products)) {
foreach($order->products as $product) {
@@ -282,16 +284,29 @@
$voip = true;
}
}
if($hw && $voip_chan) {
if(array_key_exists("bras_type", $product->product->attributes)) {
if($product->cpeprovisioning->routerconfig_finished) {
$cpe_config_finished = true;
}
}
if($hw && $voip_chan && $patched && $cpe_config_finished) {
break;
}
}
}
}
if(is_array($order->terminations) && count($order->terminations)) {
if($order->terminations[0]->patching->patched) {
$patched = true;
}
}
?>
<?=($hw) ? "<i class='fas fa-shopping-bag text-info ml-1' title='Zusatzprodukt vorhanden'></i>" : ""?>
<?=($voip) ? "<i class='fas fa-phone text-info ml-1' title='Voice Produkt vorhanden'></i>" : ""?>
<?=($patched) ? "<i class='fas fa-ethernet text-info ml-1' title='Anschluss gepatched'></i>" :""?>
<?=($cpe_config_finished) ? "<i class='fas fa-shipping-fast text-info ml-1' title='CPE versandbereit'></i>" :""?>
</td>
<td onclick="toggleOrder(<?=$order->id?>)">
<?=nl2br($order->owner->getCompanyOrName())?>