This commit is contained in:
@@ -3,35 +3,94 @@
|
||||
require('../config.php');
|
||||
|
||||
require('../CrewbrainApi.php');
|
||||
|
||||
use chillerlan\QRCode\{
|
||||
QRCode,
|
||||
QROptions
|
||||
};
|
||||
|
||||
require('../vendor/autoload.php');
|
||||
|
||||
$options = new QROptions([
|
||||
'imageBase64' => false,
|
||||
'qrCodeHeight' => 75,
|
||||
'qrCodeWidth' => 75,
|
||||
'version' => -1,
|
||||
'quietzoneSize' => 1
|
||||
]);
|
||||
|
||||
|
||||
$CrewBrain = new CrewBrain();
|
||||
|
||||
|
||||
$result = $Epi->requestEpiApi('/v1/packingnote/open?isco=False&cl=' . Epirent_Mandant);
|
||||
$result = $CrewBrain->requestCrewBrainApi('api/tasklist/5');
|
||||
$data_output = json_decode($result)->payload;
|
||||
|
||||
$result = $CrewBrain->requestCrewBrainApi('api/tasklist/' . CrewBrain_TaskListID . '/tasks');
|
||||
|
||||
|
||||
foreach ($data_output as $packingjob) {
|
||||
$data_output = json_decode($result);
|
||||
|
||||
$date = new DateTime($packingjob->date_end);
|
||||
$date->setTime(0, 0, 0);
|
||||
$today = new DateTime();
|
||||
$today->setTime(0, 0, 0);
|
||||
if ($date == $today) {
|
||||
|
||||
echo "<tr class='text-dark bg-warning'>";
|
||||
} else if ($date < $today) {
|
||||
echo "<tr class=' bg-danger'>";
|
||||
} else {
|
||||
echo "<tr>";
|
||||
foreach ($data_output as $aufgabe) {
|
||||
|
||||
|
||||
|
||||
if ($aufgabe->Geloescht == null) {
|
||||
|
||||
$AufgabeDetail = json_decode($CrewBrain->requestCrewBrainApi('api/task/'.$aufgabe->ID));
|
||||
|
||||
if ($aufgabe->Zieldatum == null) {
|
||||
echo "<tr>";
|
||||
} else {
|
||||
|
||||
$date = new DateTime($aufgabe->Zieldatum);
|
||||
$date->setTime(0, 0, 0);
|
||||
$today = new DateTime();
|
||||
$today->setTime(0, 0, 0);
|
||||
if ($date == $today) {
|
||||
|
||||
echo "<tr class='text-dark bg-warning'>";
|
||||
} else if ($date < $today) {
|
||||
echo "<tr class=' bg-danger'>";
|
||||
} else {
|
||||
echo "<tr>";
|
||||
}
|
||||
}
|
||||
if (Enable_QR_Code_CrewBrainAufgaben) {
|
||||
echo "<td>" . '<div style="width: 5vb;">' . (new QRCode($options))->render(CrewBrain_Connectionprotocol . '://' . CrewBrain_Server . '/aufgaben/' . CrewBrain_TaskListID . '/aufgabe/' . $aufgabe->ID) . "</div></td>";
|
||||
} else {
|
||||
echo "<td>" . $aufgabe->ID . "</td>";
|
||||
}
|
||||
echo "<td>";
|
||||
|
||||
|
||||
foreach($AufgabeDetail->Responsibles as $bearbeiter){
|
||||
echo $bearbeiter->Name;
|
||||
}
|
||||
echo "</td>";
|
||||
echo "<td>" . $aufgabe->Titel . "</td>";
|
||||
if ($aufgabe->Zieldatum != null) {
|
||||
echo "<td>" . date_format(new \DateTime($aufgabe->Zieldatum), 'd.m.Y') . "</td>";
|
||||
} else {
|
||||
echo "<td>nA</td>";
|
||||
}
|
||||
|
||||
|
||||
switch ($aufgabe->Prioritaet) {
|
||||
case -1:
|
||||
echo '<td> <span class="badge badge-primary">Niedrig</span></td>';
|
||||
break;
|
||||
case 0:
|
||||
echo '<td> <span class="badge badge-success">Normal</span></td>';
|
||||
break;
|
||||
case 1:
|
||||
'<td> <span class="badge badge-warning">Höher</span></td>';
|
||||
break;
|
||||
case 2:
|
||||
'<td> <span class="badge badge-danger">Hoch</span></td>';
|
||||
break;
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "<td>" . $packingjob->primary_key . "</td>";
|
||||
echo "<td>" . $packingjob->contact->name . "</td>";
|
||||
echo "<td>" . $packingjob->event . "</td>";
|
||||
echo "<td>" . date_format(new \DateTime($packingjob->date_start), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_start) . "</td>";
|
||||
echo "<td>" . date_format(new \DateTime($packingjob->date_end), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_end) . "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
function getTimeFromSeconds(string $timestring) {
|
||||
|
||||
Reference in New Issue
Block a user