Added buttons to Order/Index

This commit is contained in:
Frank Schubert
2021-08-27 19:42:34 +02:00
parent 1a0f51360f
commit a40dc708fa
6 changed files with 199 additions and 10 deletions

View File

@@ -51,6 +51,35 @@
<span class="status not-connected" title="Tiefbau ausständig">BNC</span>
<?php endif; ?>
<?php endif; ?>
<?php
$voip = false;
$hw = 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($hw && $voip_chan) {
break;
}
}
}
}
?>
<?=($voip) ? "<i class='fas fa-phone text-pink ml-1'></i>" : ""?>
<?=($hw) ? "<i class='fas fa-shopping-bag text-pink ml-1'></i>" : ""?>
</td>
<td>
<?=nl2br($order->owner->getCompanyOrName())?>
@@ -70,6 +99,8 @@
<td class="text-monospace"><?=date("d.m.Y", $order->edit)?></td>
<td class="text-monospace"><?=$order->editor->name?></td>
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
<a href="<?=self::getUrl("Order", "downloadServicePin", ["id" => $order->id])?>"><i class="fas fa-file-alt" title="Service PIN als PDF per Email an Vertragsinhaber"></i></a>
<a href="<?=self::getUrl("Order", "sendServicePin", ["id" => $order->id])?>" onclick="if(!confirm('Soll der Service-PIN an den Vertragsinhaber gesendet werden?')) return false;"><i class="fas fa-paper-plane" title="Service PIN als PDF per Email an Vertragsinhaber"></i></a>
<a href="<?=self::getUrl("Order", "edit", ["id" => $order->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
<a href="<?=self::getUrl("Order", "delete", ["id" => $order->id])?>" onclick="if(!confirm('Bestellung wirklich löschen?')) return false;" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
</td>