Added additional icons to upper orders
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -88,7 +88,7 @@ class CpeprovisioningController extends mfBaseController {
|
||||
}
|
||||
|
||||
$prov_data = [];
|
||||
$prov_data["termination_id"] = $r->termination_id;
|
||||
$prov_data["termination_id"] = ($r->termination_id) ? $r->termination_id : null;
|
||||
$prov_data["order_id"] = $r->order_id;
|
||||
$prov_data["orderproduct_id"] = $r->orderproduct_id;
|
||||
$prov_data["routerconfig_finished"] = ($r->routerconfig_finished) ? 1 : 0;
|
||||
@@ -162,4 +162,4 @@ class CpeprovisioningController extends mfBaseController {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user