false,
'qrCodeHeight' => 75,
'qrCodeWidth' => 75,
'version' => -1,
'quietzoneSize' => 1
]);
$CrewBrain = new CrewBrain();
$result = $CrewBrain->requestCrewBrainApi('api/tasklist/' . CrewBrain_TaskListID . '/tasks');
$data_output = json_decode($result);
foreach ($data_output as $aufgabe) {
if ($aufgabe->Geloescht == null) {
$AufgabeDetail = json_decode($CrewBrain->requestCrewBrainApi('api/task/'.$aufgabe->ID));
if ($aufgabe->Zieldatum == null) {
echo "
";
} else {
$date = new DateTime($aufgabe->Zieldatum);
$date->setTime(0, 0, 0);
$today = new DateTime();
$today->setTime(0, 0, 0);
if ($date == $today) {
echo "
";
} else if ($date < $today) {
echo "
";
} else {
echo "
";
}
}
if (Enable_QR_Code_CrewBrainAufgaben) {
echo "| " . ' ' . (new QRCode($options))->render(CrewBrain_Connectionprotocol . '://' . CrewBrain_Server . '/aufgaben/' . CrewBrain_TaskListID . '/aufgabe/' . $aufgabe->ID) . " | ";
} else {
echo "" . $aufgabe->ID . " | ";
}
echo "";
$i=0;
foreach($AufgabeDetail->Responsibles as $bearbeiter){
echo $bearbeiter->Name;
if($i>0){
echo ", ";
}
$i++;
}
echo " | ";
echo "" . $aufgabe->Titel . " | ";
if ($aufgabe->Zieldatum != null) {
echo "" . date_format(new \DateTime($aufgabe->Zieldatum), 'd.m.Y') . " | ";
} else {
echo "nA | ";
}
switch ($aufgabe->Prioritaet) {
case -1:
echo ' Niedrig | ';
break;
case 0:
echo ' Normal | ';
break;
case 1:
echo ' Höher | ';
break;
case 2:
echo ' Hoch | ';
break;
}
echo "
";
}
}
function getTimeFromSeconds(string $timestring) {
$hours = floor($timestring / 3600);
$mins = floor($timestring / 60 % 60);
$secs = floor($timestring % 60);
$timeFormat = sprintf('%02d:%02d', $hours, $mins);
return $timeFormat;
}
?>