diff --git a/Layout/default/Timerecording/Index.php b/Layout/default/Timerecording/Index.php
index dc073fd1f..af5b2dcee 100644
--- a/Layout/default/Timerecording/Index.php
+++ b/Layout/default/Timerecording/Index.php
@@ -294,7 +294,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
-
diff --git a/Layout/default/TimerecordingCalendar/Index.php b/Layout/default/TimerecordingCalendar/Index.php
index aa7a9ae75..502f4d150 100644
--- a/Layout/default/TimerecordingCalendar/Index.php
+++ b/Layout/default/TimerecordingCalendar/Index.php
@@ -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 = [];
@@ -176,12 +177,34 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
id: = $counter ?>,
start: '= date("Y-m-d", $timerecordingholiday->timestamp) ?>',
end: '= date("Y-m-d", $timerecordingholiday->timestamp) ?>',
- title: '= $timerecordingholiday->description ?>'
+ title: '= $timerecordingholiday->description ?>',
+ description: '= $timerecordingholiday->description ?>'
});
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 ?>)'
+ });
+
+
cindex = = $counter ?>;
$.getJSON(requestUrl, function (data) {
@@ -223,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)',
@@ -232,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, {
@@ -265,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();
});
diff --git a/Layout/default/TimerecordingEmployee/Form.php b/Layout/default/TimerecordingEmployee/Form.php
index 40ab0f030..7cf2ddf2d 100644
--- a/Layout/default/TimerecordingEmployee/Form.php
+++ b/Layout/default/TimerecordingEmployee/Form.php
@@ -89,6 +89,15 @@ $daysSelect .= "";
value="= ($timerecordingemployees->startdate) ? date('Y-m-d', $timerecordingemployees->startdate): "" ?>"/>
+