v1.4.0: Progressbar

v1.4.1: Bugfix Progressbar
This commit is contained in:
2024-03-23 15:49:15 +01:00
parent 8e4bbf130f
commit 31ae18b8a0
3 changed files with 29 additions and 3 deletions

View File

@@ -68,6 +68,7 @@ $Epi = new Epirent();
<th scope="col">Event</th>
<th scope="col">Dispo-Start<br><i>VB-Start</i></th>
<th scope="col">Dispo-Ende<br><i>VB-Ende</i></th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody id="getCheckOutTableHolder">
@@ -94,6 +95,7 @@ $Epi = new Epirent();
<th scope="col">Event</th>
<th scope="col">Dispo-Start<br><i>RP-Start</i></th>
<th scope="col">Dispo-Ende<br><i>RP-Ende</i></th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody id="getCheckInTableHolder">

View File

@@ -63,10 +63,10 @@ foreach ($data_output as $packingjob) {
$today = new DateTime();
$today->setTime(0, 0, 0);
$todayFilter = new DateTime();
$todayFilter->setTime(0,0,0);
if (CheckIn_FutureDays == -1 || $date <= ($todayFilter->modify('+'.CheckIn_FutureDays.' day'))) {
$todayFilter->setTime(0, 0, 0);
if (CheckIn_FutureDays == -1 || $date <= ($todayFilter->modify('+' . CheckIn_FutureDays . ' day'))) {
//prüfe, ob entweder unbegrenzte (-1) Anzeige Aktiv ist, oder das Datum kleiner oder Gleich heute + Zukunftsspanne ist
if ($date == $today) {
echo "<tr class='text-dark bg-warning'>";
@@ -92,6 +92,19 @@ foreach ($data_output as $packingjob) {
} else {
echo "<td>" . date_format(new \DateTime($packingjob->date_end), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_end) . "</td>";
}
echo "<td>";
if ($packingjob->is_all_in == 0) {
echo "<span class='badge badge-success'>";
} else {
echo '<div class="progress"><div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: '.((($packingjob->ps_parameters->result->total_pieces-abs($packingjob->is_all_out))-abs($packingjob->is_all_in)) /($packingjob->ps_parameters->result->total_pieces - abs($packingjob->is_all_out)))*100 .'%" aria-valuenow="' . ($packingjob->ps_parameters->result->total_pieces-abs($packingjob->is_all_out)) . '" aria-valuemin="0" aria-valuemax="' . $packingjob->ps_parameters->result->total_pieces - abs($packingjob->is_all_out) . '"></div></div>';
echo "<span class='badge badge-info'>";
}
echo (($packingjob->ps_parameters->result->total_pieces-abs($packingjob->is_all_out))-abs($packingjob->is_all_in)) . "/" . $packingjob->ps_parameters->result->total_pieces - abs($packingjob->is_all_out). " (".$packingjob->ps_parameters->result->total_pieces.")" ;
echo "</tr>";
}
}

View File

@@ -91,6 +91,17 @@ foreach ($data_output as $packingjob) {
} else {
echo "<td>" . date_format(new \DateTime($packingjob->date_end), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_end) . "</td>";
}
echo "<td>";
if ($packingjob->is_all_out == 0) {
echo "<span class='badge badge-success'>";
} else {
echo '<div class="progress"><div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: '.(($packingjob->ps_parameters->result->total_pieces - abs($packingjob->is_all_out))/$packingjob->ps_parameters->result->total_pieces)*100 .'%" aria-valuenow="' . ($packingjob->ps_parameters->result->total_pieces - abs($packingjob->is_all_out)) . '" aria-valuemin="0" aria-valuemax="' . $packingjob->ps_parameters->result->total_pieces . '"></div></div>';
echo "<span class='badge badge-info'>";
}
echo ($packingjob->ps_parameters->result->total_pieces - abs($packingjob->is_all_out)) . "/" . $packingjob->ps_parameters->result->total_pieces;
echo "</span><td>";
echo "</tr>";
}
}