Added additional icons to upper orders

This commit is contained in:
Frank Schubert
2021-10-20 19:40:41 +02:00
parent 40b32b63ec
commit 5eb3f62b43
2 changed files with 49 additions and 4 deletions

View File

@@ -108,6 +108,7 @@
<table class="table">
<tr>
<th></th>
<th></th>
<th>Kunde</th>
<th>Adresse</th>
<th>Bestelldatum</th>
@@ -118,7 +119,51 @@
<?php $order_count = 0; ?>
<?php foreach($lonelyOrders as $order): ?>
<tr class="order-list-tr pb-0 <?=($order_count % 2 == 0) ? "table-bg-even" : ""?>" id="order-<?=$order->id?>">
<td onclick="toggleOrder(<?=$order->id?>)"><?=$order->id?></td>
<td onclick="toggleOrder(<?=$order->id?>)"><?=$order->id?></td>
<td>
<?php
$voip = false;
$hw = false;
$cpe_config_finished = false;
$patched = false;
if(count($order->products)) {
foreach($order->products as $product) {
if(is_array($product->product->attributes) && count($product->product->attributes)) {
if(array_key_exists("hw_only", $product->product->attributes)) {
if($product->product->attributes["hw_only"]->value) {
$hw = true;
}
}
if(array_key_exists("voip_chan", $product->product->attributes)) {
if($product->product->attributes["voip_chan"]->value) {
$voip = true;
}
}
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-pink ml-1' title='Anschluss gepatched'></i>" :""?>
<?=($cpe_config_finished) ? "<i class='fas fa-shipping-fast text-pink ml-1' title='CPE vorbereitet'></i>" :""?>
</td>
<td onclick="toggleOrder(<?=$order->id?>)">
<?=nl2br($order->owner->getCompanyOrName())?>
<?=($order->owner->spin) ? "<br /><span class='text-pink'>".$order->owner->spin."</span>" : ""?>
@@ -139,7 +184,7 @@
</td>
</tr>
<tr class="building-list-tr <?=($order_count % 2 == 0) ? "table-bg-even" : ""?>" id="order-dates-<?=$order->id?>">
<td onclick="toggleOrder(<?=$order->id?>)" class="pt-0" style="border-top: none;"></td>
<td onclick="toggleOrder(<?=$order->id?>)" colspan="2" class="pt-0" style="border-top: none;"></td>
<td onclick="toggleOrder(<?=$order->id?>)" colspan="6" class="pt-0" style="border-top: none;">
<div class="row">
<div class="mr-4 order-date-pill">Versandtermin: <span class="text-monospace">--.--.----</span></div>