Finished Preorder statistics / added statistics permission
This commit is contained in:
@@ -122,48 +122,52 @@
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
</form>
|
||||
|
||||
|
||||
<?php if((is_object($unit->rimo_workorder) && $unit->rimo_workorder->id) || (is_array($unit->ftu_data) && $unit->ftu_data->id)): ?>
|
||||
<div class="row mt-2">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
<table class="table table-sm table-striped">
|
||||
<tr>
|
||||
<td colspan="2"><h4>FTU</h4></td>
|
||||
</tr><tr>
|
||||
<th>FTU Name:</th>
|
||||
<td class="text-monospace"><?=$unit->ftu_data["name"]?>
|
||||
</tr><tr>
|
||||
<th>FTU External ID</th>
|
||||
<td class="text-monospace"><?=$unit->ftu_data["id"]?>
|
||||
</tr><tr>
|
||||
<td colspan="2"><h4>Workorder</h4></td>
|
||||
</tr><tr>
|
||||
<th>Name</th>
|
||||
<td class="text-monospace"><?=$unit->rimo_workorder->rimo_name?></td>
|
||||
</tr><tr>
|
||||
<th>External ID</th>
|
||||
<td class="text-monospace"><?=$unit->rimo_workorder->rimo_id?></td>
|
||||
</tr><tr>
|
||||
<th>Status</th>
|
||||
<td><?=$unit->rimo_workorder->rimo_status?></td>
|
||||
</tr><tr>
|
||||
<th>Erstellt</th>
|
||||
<td class="text-monospace"><?=(is_object($unit->rimo_workorder)) ? date("d.m.Y H:i:s", $unit->rimo_workorder->create) : ""?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
<table class="table table-sm table-striped">
|
||||
<tr>
|
||||
<td colspan="2"><h4>FTU</h4></td>
|
||||
</tr><tr>
|
||||
<th>FTU Name:</th>
|
||||
<td class="text-monospace"><?=$unit->ftu_data["name"]?>
|
||||
</tr><tr>
|
||||
<th>FTU External ID</th>
|
||||
<td class="text-monospace"><?=$unit->ftu_data["id"]?>
|
||||
</tr><tr>
|
||||
<td colspan="2"><h4>Workorder</h4></td>
|
||||
</tr><tr>
|
||||
<th>Name</th>
|
||||
<td class="text-monospace"><?=$unit->rimo_workorder->rimo_name?></td>
|
||||
</tr><tr>
|
||||
<th>External ID</th>
|
||||
<td class="text-monospace"><?=$unit->rimo_workorder->rimo_id?></td>
|
||||
</tr><tr>
|
||||
<th>Status</th>
|
||||
<td><?=$unit->rimo_workorder->rimo_status?></td>
|
||||
</tr><tr>
|
||||
<th>Erstellt</th>
|
||||
<td class="text-monospace"><?=(is_object($unit->rimo_workorder)) ? date("d.m.Y H:i:s", $unit->rimo_workorder->create) : ""?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="col-6">
|
||||
|
||||
<div class="card border-top-primary">
|
||||
<div class="card-body">
|
||||
@@ -107,7 +107,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-6">
|
||||
|
||||
<div class="card border-top-success pl-2 pr-2">
|
||||
<div class="card-header">
|
||||
|
||||
@@ -66,7 +66,7 @@ $chartColors = [
|
||||
|
||||
<div class="card bg-light border-top-success">
|
||||
<div class="card-header pb-0">
|
||||
<h4 class="card-title">Akquise Statistiken <small>Momentan nur für Admins sichtbar <i class="far fa-smile text-success"></i></small></h4>
|
||||
<h4 class="card-title">Akquise Statistiken</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row mb-2">
|
||||
@@ -87,7 +87,7 @@ $chartColors = [
|
||||
<div class="card-body p-0 bg-danger">
|
||||
<div style="height: 128px;" class="p-3">
|
||||
<div class="float-right">
|
||||
<i class="mdi mdi-cart text-white widget-icon"></i>
|
||||
<i class="fad fa-shopping-cart text-white widget-icon font-24"></i>
|
||||
</div>
|
||||
<h5 class="text-white font-weight-normal mt-0">Bestellungen</h5>
|
||||
<h3 class="mt-2 text-white"><?=$count_orders?> / <?=$max_connections?></h3>
|
||||
@@ -97,13 +97,28 @@ $chartColors = [
|
||||
</div> <!-- end card-body-->
|
||||
</div> <!-- end card-->
|
||||
</div> <!-- end col-->
|
||||
|
||||
|
||||
<div class="col-xl-3 col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-body p-0 bg-success">
|
||||
<div style="height: 128px;" class="p-3">
|
||||
<div class="float-right">
|
||||
<i class="fas fa-check text-white widget-icon font-24"></i>
|
||||
</div>
|
||||
<h5 class="text-white font-weight-normal mt-0">Aktive Anschlüsse</h5>
|
||||
<h3 class="mt-2 text-white"><?=$status_connected?> / <?=$count_orders?></h3>
|
||||
</div>
|
||||
<canvas style="position: absolute; bottom:0;" height="60" id="sparkline4"></canvas>
|
||||
</div> <!-- end card-body-->
|
||||
</div> <!-- end card-->
|
||||
</div> <!-- end col-->
|
||||
|
||||
<div class="col-xl-3 col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-body p-0 bg-primary">
|
||||
<div style="height: 128px;" class="p-3">
|
||||
<div class="float-right">
|
||||
<i class="mdi mdi-cart text-white widget-icon"></i>
|
||||
<i class="fad fa-building text-white widget-icon font-24"></i>
|
||||
</div>
|
||||
<h5 class="text-white font-weight-normal mt-0">Status BEP Installed (244, SD)</h5>
|
||||
<h3 class="mt-2 text-white"><?=$status_connected_single?> / <?=$count_orders?></h3>
|
||||
@@ -118,7 +133,7 @@ $chartColors = [
|
||||
<div class="card-body p-0 bg-info">
|
||||
<div style="height: 128px;" class="p-3">
|
||||
<div class="float-right">
|
||||
<i class="mdi mdi-cart text-white widget-icon"></i>
|
||||
<i class="fad fa-buildings text-white widget-icon font-24"></i>
|
||||
</div>
|
||||
<h5 class="text-white font-weight-normal mt-0">Status OTO Installed (245, MD)</h5>
|
||||
<h3 class="mt-2 text-white"><?=$status_connected_multi?> / <?=$count_orders?></h3>
|
||||
@@ -128,20 +143,7 @@ $chartColors = [
|
||||
</div> <!-- end card-->
|
||||
</div> <!-- end col-->
|
||||
|
||||
<div class="col-xl-3 col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-body p-0 bg-warning">
|
||||
<div style="height: 128px;" class="p-3">
|
||||
<div class="float-right">
|
||||
<i class="mdi mdi-cart text-dark widget-icon"></i>
|
||||
</div>
|
||||
<h5 class="text-dark font-weight-normal mt-0">Aktive Anschlüsse</h5>
|
||||
<h3 class="mt-2 text-dark"><?=$status_connected?> / <?=$count_orders?></h3>
|
||||
</div>
|
||||
<canvas style="position: absolute; bottom:0;" height="60" id="sparkline4"></canvas>
|
||||
</div> <!-- end card-body-->
|
||||
</div> <!-- end card-->
|
||||
</div> <!-- end col-->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -199,9 +201,9 @@ $chartColors = [
|
||||
<?php $j=0; foreach($status as $status_id => $count): ?>
|
||||
<?php if($status_id == "total") continue; ?>
|
||||
<tr style="border-bottom: 1px solid <?=$chartColors[$j]?>;">
|
||||
<td><span style="background-color: <?=$chartColors[$j]?>; color: <?=$chartColors[$j]?>">##</span></td>
|
||||
<td class="pl-2 pr-2" style="white-space: nowrap;"><?=round(($count / $status['total']) * 100, 1)?>% (<?=($count)?>)</td>
|
||||
<td title="<?=$stati[$status_id]["code"]?> - <?=$stati[$status_id]["name"]?>" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
|
||||
<td class="align-top"><span style="background-color: <?=$chartColors[$j]?>; color: <?=$chartColors[$j]?>">##</span></td>
|
||||
<td class="align-top pl-2 pr-2" style="white-space: nowrap;"><?=round(($count / $status['total']) * 100, 1)?>% (<?=($count)?>)</td>
|
||||
<td title="<?=$stati[$status_id]["code"]?> - <?=$stati[$status_id]["name"]?>">
|
||||
<?=$stati[$status_id]["code"]." - ".$stati[$status_id]["name"]?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -371,7 +373,7 @@ $chartColors = [
|
||||
labels: [
|
||||
<?php foreach($status as $status_id => $count): ?>
|
||||
<?php if($status_id == "total") continue; ?>
|
||||
<?=$stati[$status_id]->code?> - <?=$stati[$status_id]->name?> " (<?=round($count / $status["total"] * 100, 1)?>%)",
|
||||
"<?=$stati[$status_id]['code']?> - <?=$stati[$status_id]['name']?> (<?=round($count / $status["total"] * 100, 1)?>%)",
|
||||
<?php endforeach; ?>
|
||||
|
||||
],
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<select name="address_id" id="address_id" class="form-control">
|
||||
<option value=""></option>
|
||||
<?php foreach($addresses as $address): ?>
|
||||
<option value="<?=$address->id?>" <?=($address->id == $user->address_id || $address->id == $user->address_id) ? "selected='selected'" : ""?>><?=($address->company) ? $address->company : $address->getFullName()?></option>
|
||||
<option value="<?=$address->id?>" <?=($address->id == $user->address_id || $address->id == $user->address_id) ? "selected='selected'" : ""?>><?=($address->company) ? $address->company : $address->getFullName()?><?=($address->customer_number) ? " (".$address->customer_number.")" : ""?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -219,6 +219,13 @@
|
||||
<label for="can_fibu" class="form-check-label">Buchhaltung</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<div class="form-group form-check">
|
||||
<input type="checkbox" class="form-check-input" name="can[Statistics]" id="can_statistics" value="1" <?=($user && $user->can("Statistics")) ? "checked='checked'" : ""?> />
|
||||
<label for="can_statistics" class="form-check-label">Statistiken anzeigen</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -248,9 +255,9 @@
|
||||
<form method="post" action="<?=self::getUrl("User", "generateApikey")?>">
|
||||
<input type="hidden" name="id" value="<?=$user->id?>" />
|
||||
<?php if($user->apikey): ?>
|
||||
<button type="submit" class="btn btn-primary" onclick="if(!confirm('Achtung: Dadurch wird der bisherige API Key ungültig. Wirklich neuen API Key generieren?')) return false;">Neuen API Key generieren</button>
|
||||
<button type="submit" class="btn btn-outline-primary" onclick="if(!confirm('Achtung: Dadurch wird der bisherige API Key ungültig. Wirklich neuen API Key generieren?')) return false;">Neuen API Key generieren</button>
|
||||
<?php else: ?>
|
||||
<button type="submit" class="btn btn-primary">API Key generieren</button>
|
||||
<button type="submit" class="btn btn-outline-primary">API Key generieren</button>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user