Übersicht: auch vermietete Anhänger und Truhen getrennt ausweisen
Analog zu den freien Einheiten gibt es jetzt "Vermietete Anhänger" und "Vermietete Truhen" (x von y). Die Gesamtsumme "Heute vermietet" entfällt.
This commit is contained in:
parent
5caec63bf3
commit
0f122d020c
1 changed files with 12 additions and 3 deletions
|
|
@ -7,7 +7,8 @@
|
|||
/** @var int $openReminderCount */
|
||||
/** @var int $handoverCount */
|
||||
/** @var int $employeeScope */
|
||||
$rentedToday = 0;
|
||||
$rentedTrailers = 0;
|
||||
$rentedChests = 0;
|
||||
$freeTrailers = 0;
|
||||
$freeChests = 0;
|
||||
$totalTrailers = 0;
|
||||
|
|
@ -20,7 +21,11 @@ foreach ($roadmap as $row) {
|
|||
$totalTrailers++;
|
||||
}
|
||||
if ($row['bookings']) {
|
||||
$rentedToday++;
|
||||
if ($isChest) {
|
||||
$rentedChests++;
|
||||
} else {
|
||||
$rentedTrailers++;
|
||||
}
|
||||
} elseif ($isChest) {
|
||||
$freeChests++;
|
||||
} else {
|
||||
|
|
@ -48,7 +53,11 @@ $isEmployeeView = $employeeScope > 0;
|
|||
<section class="kpi-grid" aria-label="Kennzahlen">
|
||||
<article class="kpi">
|
||||
<span class="kpi__icon kpi__icon--blue"><svg class="ico" aria-hidden="true"><use href="#i-truck"/></svg></span>
|
||||
<div><strong><?= $rentedToday ?> von <?= count($trailers) ?></strong><span>Heute vermietet</span></div>
|
||||
<div><strong><?= $rentedTrailers ?> von <?= $totalTrailers ?></strong><span>Vermietete Anhänger</span></div>
|
||||
</article>
|
||||
<article class="kpi">
|
||||
<span class="kpi__icon kpi__icon--blue"><svg class="ico" aria-hidden="true"><use href="#i-snow"/></svg></span>
|
||||
<div><strong><?= $rentedChests ?> von <?= $totalChests ?></strong><span>Vermietete Truhen</span></div>
|
||||
</article>
|
||||
<article class="kpi">
|
||||
<span class="kpi__icon kpi__icon--green"><svg class="ico" aria-hidden="true"><use href="#i-check"/></svg></span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue