Zeiterfassung Update
* Neue migration für Homeoffice * Soll zeiten nun vom Startdatum abhängig * Neue Summierung der Sollzeiten in der Personalverwaltung * Urlaubstage werden nun Tage statt Stunden angezeigt (in Buchungen und Auswertungen) * Urlaube werden nun bis 1.1.2024 berücksichtigt * Homeoffice Flag nun möglich
This commit is contained in:
@@ -224,16 +224,24 @@ $(document).ready(function () {
|
||||
}
|
||||
|
||||
if (parseInt($(this).find(':selected').data('businesstrip')) === 1) {
|
||||
$('#businesstrip-div').show();
|
||||
$('.businesstrip-div').show();
|
||||
$('#businesstrip').prop("checked", false);
|
||||
$('#businesstrip_info').val('');
|
||||
$('#businesstrip_info').hide();
|
||||
} else {
|
||||
$('#businesstrip-div').hide();
|
||||
$('.businesstrip-div').hide();
|
||||
$('#businesstrip').prop("checked", false);
|
||||
$('#businesstrip_info').val('');
|
||||
$('#businesstrip_info').hide();
|
||||
}
|
||||
|
||||
if (parseInt($(this).find(':selected').data('homeoffice')) === 1) {
|
||||
$('#homeoffice-div').show();
|
||||
$('#homeoffice').prop("checked", false);
|
||||
} else {
|
||||
$('#homeoffice').prop("checked", false);
|
||||
$('#homeoffice-div').hide();
|
||||
}
|
||||
});
|
||||
$("body").on("change", "#date", function () {
|
||||
if ($('#enddate-div').css('display') === "block") {
|
||||
@@ -269,6 +277,12 @@ $(document).ready(function () {
|
||||
$('#businesstrip_info').val($(this).data('businesstripinfo'));
|
||||
$('#businesstrip_info').show();
|
||||
$('#businesstrip_info').prop('required', true);
|
||||
$('#homeoffice-div').hide();
|
||||
}
|
||||
if ($(this).data('homeoffice') == 1) {
|
||||
$('.businesstrip-div').hide();
|
||||
$('#homeoffice').prop("checked", true);
|
||||
$('#homeoffice-div').show();
|
||||
}
|
||||
$('.alert-success').remove();
|
||||
window.scrollTo(0, 0);
|
||||
@@ -278,6 +292,12 @@ $(document).ready(function () {
|
||||
$('#submit-button').text('Speichern');
|
||||
$('#cancel-button').hide();
|
||||
$('#id').val('');
|
||||
$('.businesstrip-div').hide();
|
||||
$('#businesstrip').prop("checked", false);
|
||||
$('#businesstrip_info').val('');
|
||||
$('#businesstrip_info').hide();
|
||||
$('#homeoffice').prop("checked", false);
|
||||
$('#timerecordingCategory_id').change();
|
||||
});
|
||||
|
||||
$("body").on("change", "#dataweek,#datamonth,#datayear", function () {
|
||||
@@ -312,15 +332,33 @@ $(document).ready(function () {
|
||||
if ($(this).prop('checked') == true) {
|
||||
$('#businesstrip_info').show();
|
||||
$('#businesstrip_info').prop('required', true);
|
||||
$('#homeoffice').prop('checked', false);
|
||||
$('#homeoffice-div').hide();
|
||||
|
||||
} else {
|
||||
$('#businesstrip_info').hide();
|
||||
$('#businesstrip_info').val('');
|
||||
$('#businesstrip_info').prop('required', false);
|
||||
$('#timerecordingCategory_id').change();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
$("body").on("click", "#homeoffice", function () {
|
||||
if ($(this).prop('checked') == true) {
|
||||
$('#businesstrip').prop('checked', false);
|
||||
$('.businesstrip-div').hide();
|
||||
$('#businesstrip_info').hide();
|
||||
$('#businesstrip_info').val('');
|
||||
$('#businesstrip_info').prop('required', false);
|
||||
|
||||
} else {
|
||||
$('#timerecordingCategory_id').change();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$("body").on("click", "#auto-workinghours-button", function () {
|
||||
var timestamp = $('#dataweek').val() * 1000
|
||||
const date = new Date(timestamp);
|
||||
@@ -363,9 +401,13 @@ $(document).ready(function () {
|
||||
e.preventDefault();
|
||||
$('#alert-box').remove();
|
||||
var businesstrip = false;
|
||||
var homeoffice = false;
|
||||
if ($('#businesstrip').prop('checked') == true) {
|
||||
businesstrip = 1;
|
||||
}
|
||||
if ($('#homeoffice').prop('checked') == true) {
|
||||
homeoffice = 1;
|
||||
}
|
||||
$.post(insertUrl, {
|
||||
id: $.trim($('#id').val()),
|
||||
timerecordingCategory_id: $.trim($('#timerecordingCategory_id').val()),
|
||||
@@ -376,6 +418,7 @@ $(document).ready(function () {
|
||||
comment: $.trim($('#comment').val()),
|
||||
businesstrip: businesstrip,
|
||||
businesstrip_info: $.trim($('#businesstrip_info').val()),
|
||||
homeoffice: homeoffice,
|
||||
hourday: $.trim($('#timerecordingCategory_id').find(':selected').data('hourday')),
|
||||
ajax: 1
|
||||
}).done(function (data) {
|
||||
|
||||
Reference in New Issue
Block a user