diff --git a/Layout/default/TimerecordingCalendar/Index.php b/Layout/default/TimerecordingCalendar/Index.php index ee8c98054..ddeabde04 100644 --- a/Layout/default/TimerecordingCalendar/Index.php +++ b/Layout/default/TimerecordingCalendar/Index.php @@ -248,6 +248,7 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"); var holidays = []; var colorcount = 0; var oldname = ""; + var category; $.each(json, function (index, value) { if (oldname != value.user.user) { colorcount++; @@ -256,14 +257,21 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"); } oldname = value.user.user; } + if (value.ccategory.ccategory == "Sterbefall") { + console.log('cool'); + category = "Sonderurlaub"; + } else { + category = value.ccategory.ccategory; + } + if (value.hourday.hourday != '5') { holidays.push({ id: cindex, backgroundColor: bgcolors[colorcount], start: value.cstart.cstart, end: value.cend.cend, - title: value.ccategory.ccategory + " " + value.user.user, - description: value.ccategory.ccategory + " " + value.user.user + title: category + " " + value.user.user, + description: category + " " + value.user.user }); cindex++; }