Zeiterfassung Update/Bugfix

* TimerecordingReportController.php verweist in einer gewissen Datenbank-Eintragskonstellation auf einen ungültigen Array Index. Hab die gesamtsollzeitberechnung temporär ausgeschalten
* Neu Migration (Vorbereiten der DB auf eigenes Ü-Zeitkonto)
* Kalender Feiertagsdescription angepasst
* Geburtstage nun möglich in Personaladministration und Kalender
* Initiale Überstunden sind nun möglich
* Berechnung Urlaubstage nun exakt
This commit is contained in:
Spitzer Daniel
2024-02-26 21:01:50 +01:00
parent 634ba2ee6e
commit 09b4aade1c
11 changed files with 437 additions and 9 deletions

View File

@@ -169,6 +169,7 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
let requestUrl = "<?= self::getUrl("TimerecordingReport", "api", ['do' => 'getTimerecordings', 'datatype' => '3', 'datayear' => time()]) ?>";
var cindex = 1;
var holiDays = [];
var birthdays = [];
<?php
$counter = 1;
foreach ($timerecordingholidays as $timerecordingholiday) :?>
@@ -182,7 +183,28 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
<?php
$counter++;
endforeach;
foreach ($timerecordingemployees as $timerecordingemployee) :
if ($timerecordingemployee->birthday) :
$year = date("Y", time());
$year = $year - 1;
$Byear = date("Y", $timerecordingemployee->birthday);
for ($i = 0; $i < 5; $i++) :
$age = $year - $Byear;
?>
birthdays.push({
id: <?= $counter ?>,
start: '<?= date("$year-m-d", $timerecordingemployee->birthday) ?>',
end: '<?= date("$year-m-d", $timerecordingemployee->birthday) ?>',
title: '<?= $timerecordingemployee->user->name ?> (<?= $age ?>)',
description: 'Geburtstag <?= $timerecordingemployee->user->name ?> (<?= $age ?>)'
});
<?php
$year++;
endfor;
$counter++;
endif;
endforeach; ?>
cindex = <?= $counter ?>;
$.getJSON(requestUrl, function (data) {
@@ -224,7 +246,7 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
// Calendar Event Source
// Birthday Events Source
var birthdayEvents = {
var holiDayEvents = {
id: 1,
backgroundColor: 'rgba(255, 0, 0 , 1)',
borderColor: 'rgba(255, 0, 0 , 1)',
@@ -233,12 +255,19 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
};
var holidayEvents = {
id: 5,
id: 7,
backgroundColor: 'rgba(0,204,204,.25)',
borderColor: 'rgb(192 0 255)',
borderColor: 'rgb(8 241 8)',
textColor: '#000',
events: holidays
};
var birthdayEvents = {
id: 5,
backgroundColor: 'rgb(68 15 241 / 76%)',
borderColor: 'rgb(68 15 241 / 76%)',
textColor: '#fff',
events: birthdays
};
var initialLocaleCode = 'en';
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
@@ -266,7 +295,7 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
navLinks: 'true',
events: [],
height: 800,
eventSources: [holidayEvents, birthdayEvents]
eventSources: [birthdayEvents, holiDayEvents, holidayEvents]
});
calendar.render();
});