From 06a148c915a78c06016701d802948ab88bd45fb1 Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Sat, 11 Oct 2025 17:29:05 +0200 Subject: [PATCH] =?UTF-8?q?Zeiterfassung=20Update=20*=20Monatsansicht=20f?= =?UTF-8?q?=C3=BCr=20Mitarbeiter=20nun=203=20Monate=20in=20der=20Zukunft?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Layout/default/Timerecording/Index.php | 18 ++++++++++++------ public/assets/css/datatables-std.css | 4 ++-- public/js/pages/Calendar/View.js | 6 +++--- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Layout/default/Timerecording/Index.php b/Layout/default/Timerecording/Index.php index 128067ed6..e2c277573 100644 --- a/Layout/default/Timerecording/Index.php +++ b/Layout/default/Timerecording/Index.php @@ -30,14 +30,19 @@ $monthger = [ $month = []; $date = new DateTime('first day of this month'); +$time = time(); +$timenow = $time; -for ($i = 1; $i <= 12; $i++) { - $mon = $date->format('n'); - $year = $date->format('Y'); - $month[$date->getTimestamp()] = $monthger[$mon] . " " . $year; - $date->modify('-1 month'); +$time = strtotime('first day of this month', $time); +$time = strtotime('+3 month', $time); +for ($i = 1; $i <= 15; $i++) { + $mon = date('n', $time); + $year = date('Y', $time); + $month[$time] = $monthger[$mon] . " " . $year; + $time = strtotime('-1 month', $time); } + $years[time() + 31536000] = date('Y', time() + 31536000); $years[time()] = date('Y', time()); $years[time() - 31536000] = date('Y', time() - 31536000); @@ -305,7 +310,8 @@ $mindate = date("Y-m-d", strtotime("+ 1 Month", $closedmonth));
diff --git a/public/assets/css/datatables-std.css b/public/assets/css/datatables-std.css index ead8bbd51..967acecc9 100644 --- a/public/assets/css/datatables-std.css +++ b/public/assets/css/datatables-std.css @@ -158,8 +158,8 @@ table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) { .display-calendar { color: #0d6efd; - font-size: 30px; - margin-right: 10px; + font-size: 28px; + margin-right: 0; cursor: pointer; } diff --git a/public/js/pages/Calendar/View.js b/public/js/pages/Calendar/View.js index 1f815b28f..4924c0190 100644 --- a/public/js/pages/Calendar/View.js +++ b/public/js/pages/Calendar/View.js @@ -99,9 +99,9 @@ function reinitializeAttendeesSelect() { // ÄNDERUNG: Verstecke/Deaktiviere Teilnehmer-Zeile wenn keine Microsoft-ID if (hasMicrosoftId == '0' || hasMicrosoftId === 0 || !hasMicrosoftId) { // Verstecke die gesamte Teilnehmer-Zeile - $('#calendar-attendees').closest('.row').hide(); - // Optional: Leere auch die Auswahl - $('#calendar-attendees').val(null).trigger('change'); + // $('#calendar-attendees').closest('.row').hide(); + // // Optional: Leere auch die Auswahl + // $('#calendar-attendees').val(null).trigger('change'); return; // Beende Funktion früh } else { // Zeige die Teilnehmer-Zeile wieder an