added new logout button and fixed pdf viewing

This commit is contained in:
2025-08-14 10:41:31 +02:00
parent f91a87054d
commit 33c0f1c76c
4 changed files with 291 additions and 129 deletions

View File

@@ -706,7 +706,7 @@ class WarehouseShippingNoteController extends TTCrud {
$endTimestamp = $endDate->setTime(23, 59, 59)->getTimestamp();
$filteredEvents = array_filter($allEvents, function ($event) use ($startTimestamp, $endTimestamp, $calendarId) {
if (!isset($event['cstart']) && !isset($event['category']) || (intval($event['calendar_id']['calendar_id']) !== $calendarId)) {
if (!isset($event['cstart']) && !isset($event['category']) || (intval($event['calendar_id']['calendar_id']) != $calendarId)) {
return false;
}
$eventStartTimestamp = strtotime($event['cstart']['cstart'] ?? $event['cstart']);
@@ -739,6 +739,15 @@ class WarehouseShippingNoteController extends TTCrud {
self::returnJson($finalResponse);
}
protected function warehouseLogoutAction() {
if (isset($_SESSION[MFAPPNAME . '_warehouse_login_override'])) {
unset($_SESSION[MFAPPNAME . '_warehouse_login_override']);
self::returnJson(['success' => true, 'message' => 'Logout erfolgreich']);
} else {
self::returnJson(['success' => false, 'message' => 'Kein aktiver Login gefunden']);
}
}
protected function createNewLogAction() {
$postData = json_decode(file_get_contents('php://input'), true);