Added general history in Preorder

This commit is contained in:
Frank Schubert
2024-07-18 14:28:41 +02:00
parent 578e813727
commit f08111c9a4
5 changed files with 415 additions and 305 deletions

View File

@@ -8,10 +8,10 @@
<li class="nav-item"><a class="nav-link active" href="#preorder-detail-<?=$preorder->id?>-detail" data-toggle="tab" aria-expanded="false">Details</a></li>
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-address" data-toggle="tab" aria-expanded="false">Adressdetails</a></li>
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-rimo" data-toggle="tab" aria-expanded="false">RIMO</a></li>
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-history" data-toggle="tab" aria-expanded="false">Status-Historie</a></li>
<?php if($me->is("Admin") && $preorder->adb_hausnummer->borderpoint_lat && $preorder->adb_hausnummer->borderpoint_long): ?>
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-map" data-toggle="tab" aria-expanded="false" onclick="loadBorderpointMap(<?=$preorder->id?>)">Übergabepunkt</a></li>
<?php endif; ?>
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-history" data-toggle="tab" aria-expanded="false">History</a></li>
</ul>
</div>
@@ -471,11 +471,11 @@
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="card-header bg-info text-white pl-2 pr-2 pt-1 pb-1">Addressdetails</div>
<div class="card-header bg-info text-white pl-2 pr-2 pt-1 pb-1">History</div>
<div class="row">
<div class="col-12">
<h3>Status-Historie</h3>
<h3>Status Historie</h3>
<table class="table table-sm table-striped">
<tr>
<th>Zeitpunkt</th>
@@ -484,7 +484,7 @@
<th>Neuer Status</th>
</tr>
<?php foreach($preorder->history as $history): ?>
<?php if($history->key != "preorderstatus_id") continue; ?>
<?php if($history->key != "status_id") continue; ?>
<tr>
<td><?=date("d.m.Y H:i:s", $history->create)?></td>
<td><?=$history->creator->name?></td>
@@ -493,6 +493,26 @@
</tr>
<?php endforeach; ?>
</table>
<h3>Gesamte Historie</h3>
<table class="table table-sm table-striped">
<tr>
<th>Zeitpunkt</th>
<th>Benutzer</th>
<th>Feld</th>
<th>Alter Wert</th>
<th>Neuer Wert</th>
</tr>
<?php foreach($preorder->history as $history): ?>
<tr>
<td><?=date("d.m.Y H:i:s", $history->create)?></td>
<td><?=$history->creator->name?></td>
<td><?=$history->key?></td>
<td><?=$history->getText("old")?></td>
<td><?=$history->getText("new")?></td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
</div>