Zeiterfassung Anpassungen

This commit is contained in:
Spitzer Daniel
2024-01-23 16:34:14 +01:00
parent 5d01cbe6d1
commit 5f26e8ec26
22 changed files with 2005 additions and 190 deletions

View File

@@ -2,7 +2,7 @@
?>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= MFAPPFILE_VERSION ?>" rel="stylesheet"
type="text/css"/>
<style>

View File

@@ -1,6 +1,6 @@
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<link href="<?=self::getResourcePath()?>assets/css/select2-cstm.css?<?=date('U')?>" rel="stylesheet" type="text/css" />
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet" type="text/css"/>
<link href="<?=self::getResourcePath()?>assets/css/select2-cstm.css?<?= MFAPPFILE_VERSION ?>" rel="stylesheet" type="text/css" />
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= MFAPPFILE_VERSION ?>" rel="stylesheet" type="text/css"/>
<?php
foreach ($devicetypes as $devicetype) {
$deviceTypes[$devicetype->id] = $devicetype->devicemanufactor->name . " " . $devicetype->name;

View File

@@ -1,5 +1,35 @@
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
$daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
$monthger[1] = "Jänner";
$monthger[2] = "Februar";
$monthger[3] = "März";
$monthger[4] = "April";
$monthger[5] = "Mai";
$monthger[6] = "Juni";
$monthger[7] = "Juli";
$monthger[8] = "August";
$monthger[9] = "September";
$monthger[10] = "Oktober";
$monthger[11] = "November";
$monthger[12] = "Dezember";
$time = time();
for ($i = 1; $i <= 25; $i++) {
$kw = date('W', $time);
$year = date('Y', $time);
$timestamp_montag = strtotime("{$year}-W{$kw}");
$timestamp_freitag = strtotime("{$year}-W{$kw}-5");
$weeks[$time] = "KW" . $kw . " " . $year . " (" . date('d.m', $timestamp_montag) . "-" . date('d.m', $timestamp_freitag) . ")";
$time = $time - 604800;
}
$time = time();
for ($i = 1; $i <= 12; $i++) {
$mon = date('n', $time);
$year = date('Y', $time);
$month[$time] = $monthger[$mon] . " " . $year;
$time = strtotime('-1 month', $time);
}
?>
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
@@ -31,10 +61,21 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
.edit-placeholder {
height: 15px;
width: 19px;
width: 27px;
display: inline-block;
}
.fa-trash {
cursor: pointer;
}
.text-bold {
font-weight: 500;
color: #000;
}
.text-normal {
color: #000;
}
</style>
<!-- start page title -->
@@ -64,12 +105,16 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
<select id="timerecordingCategory_id" name="timerecordingCategory_id"
class="select2 form-control" required="required">
<?php foreach ($timerecordingCategoriess as $timerecordingCategories): ?>
<option value="<?= $timerecordingCategories->id ?>"
data-approval="<?= $timerecordingCategories->approval ?>"
data-comment="<?= $timerecordingCategories->require_comment ?>"
data-hourday="<?= $timerecordingCategories->hourday ?>"><?= $timerecordingCategories->name ?></option>
<?php endforeach; ?>
<?php foreach ($timerecordingCategoriess as $timerecordingCategories):
if ($timerecordingCategories->only_admin == 0) :
?>
<option value="<?= $timerecordingCategories->id ?>"
data-approval="<?= $timerecordingCategories->approval ?>"
data-comment="<?= $timerecordingCategories->require_comment ?>"
data-hourday="<?= $timerecordingCategories->hourday ?>"><?= $timerecordingCategories->name ?></option>
<?php
endif;
endforeach; ?>
</select>
</div>
@@ -126,6 +171,11 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
</button>
</div>
</div>
<div class=" row mt-2">
<div class="col-lg-4" id="message-box">
</div>
</div>
</div>
@@ -133,14 +183,58 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
</div>
<div class="card">
<div class="card-body mb-3">
<div class="row">
<div class="col-12">
<div class="float-left">
<h4 class="header-title">Liste aller Buchungen</h4>
<div class="form-group module-row row mb-3">
<div class="col-6 col-lg-1">
<label class="col-form-label label-calendar" for="lenght">Buchungszeitraum:</label>
</div>
<div class="col-6 col-lg-1 text-center">
<i class="fa-regular fa-calendar-week display-calendar active-calendar" title="Kalenderwoche"
data-datatype="1"></i> <i class="fa-regular fa-calendar-days display-calendar"
title="Kalendermonat" data-datatype="2"></i>
</div>
<div class="col-lg-2">
<div class="form-row">
<div class="col" id="dataweek-col">
<div class="input-group">
<select id="dataweek" class="form-control select2">
<?php foreach ($weeks as $key => $week): ?>
<option value="<?= $key ?>"><?= $week ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="col" id="datamonth-col" style="display:none">
<div class="input-group">
<select id="datamonth" class="form-control select2">
<?php foreach ($month as $key => $Month): ?>
<option value="<?= $key ?>"><?= $Month ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="form-row">
<div class="col text-center">
<div class="input-group ">
<label class="col-form-label form-control"><span
class="text-bold">Sollzeit: </span><span id="must-time"
class="ml-1 text-normal"></span></label>
</div>
</div>
<div class="col text-center">
<div class="input-group ">
<label class="col-form-label form-control"><span class="text-bold">Istzeit: </span><span
id="is-time"
class="ml-1 text-normal"></span></label>
</div>
</div>
</div>
</div>
</div>
<table id="datatable" class="table table-hover table-sm">
<thead>
<tr>
@@ -163,72 +257,6 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
</tr>
</thead>
<tbody>
<?php
foreach ($timerecordings as $timerecording):
$state = "";
$enddate = "";
$sum = "-";
$day = "";
$orderdate = $timerecording->start;
if ($timerecording->timerecordingCategory->hourday == 1) {
$date = date("d.m.Y", $timerecording->start);
$datadate = date("Y-m-d", $timerecording->start);
$start = date("H:i", $timerecording->start);
$end = date("H:i", $timerecording->end);
$seconds = $timerecording->end - $timerecording->start;
$minutes = floor(($seconds % 3600) / 60);
$hours = floor($seconds / 3600);
$sum = sprintf("%02d", $hours) . ":" . sprintf("%02d", $minutes);
$day = $daysgerm[date("w", $timerecording->start)];
} else if ($timerecording->timerecordingCategory->hourday == 2) {
$date = date("d.m.", $timerecording->start) . " - " . $daysgerm[date("w", $timerecording->end)] . " " . date("d.m.Y", $timerecording->end);
$datadate = date("Y-m-d", $timerecording->start);
$enddate = date("Y-m-d", $timerecording->end);
$start = "-";
$end = "-";
$day=$daysgerm[date("w", $timerecording->start)];
} else if ($timerecording->timerecordingCategory->hourday == 3 || $timerecording->timerecordingCategory->hourday == 4) {
$date = date("d.m.Y", $timerecording->start);
$datadate = date("Y-m-d", $timerecording->start);
$start = "-";
$end = "-";
$day = $daysgerm[date("w", $timerecording->start)];
}
if ($timerecording->timerecordingCategory->approval == 1 && $timerecording->approved == 0) {
$state = '<i class="fa-regular fa-clock mr-1"></i>';
} else if ($timerecording->timerecordingCategory->approval == 1 && $timerecording->approved == 1) {
$state = '<i class="fa-regular fa-circle-check mr-1"></i>';
}
?>
<tr class="">
<td data-order="<?= $orderdate ?>" class="text-nowrap "><?= $state ?><?= $day . " " . $date ?></td>
<td class="text-nowrap text-center"><?= $start ?></td>
<td class="text-nowrap text-center"><?= $end ?></td>
<td class="text-nowrap text-center"><?= $sum ?></td>
<td class="text-nowrap"><?= $timerecording->timerecordingCategory->name ?></td>
<td><?= $timerecording->commend ?></td>
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
<?php if ($timerecording->completed == 0):
if ($timerecording->approved == 0) : ?>
<i class="far fa-edit edit-button" data-id="<?= $timerecording->id ?>"
data-date="<?= $datadate ?>"
data-category="<?= $timerecording->timerecordingCategory->id ?>"
data-start="<?= $start ?>"
data-end="<?= $end ?>"
data-enddate="<?= $enddate ?>"
data-commend="<?= $timerecording->commend ?>"
title="Bearbeiten"></i>
<?php else : ?>
<div class="edit-placeholder"></div>
<?php endif; ?>
<a href="<?= self::getUrl("Timerecording", "delete", ["id" => $timerecording->id]) ?>"
onclick="if(!confirm('Buchung wirklich löschen?')) return false;" class="text-danger"
title="Löschen"><i class="fas fa-trash"></i></a>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
@@ -241,96 +269,14 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
<script type="text/javascript">
var hidesearch = [1, 2, 3, 6];
let insertUrl = "<?= self::getUrl("Timerecording", "save") ?>";
let deleteUrl = "<?= self::getUrl("Timerecording", "delete") ?>";
let requestUrl = "<?= self::getUrl("Timerecording", "api", ['do' => 'getTimerecordings']) ?>";
$(document).ready(function () {
$(".select2").select2();
$("body").on("change", "#timerecordingCategory_id", function () {
if (parseInt($(this).find(':selected').data('hourday')) === 2) {
$("#endtime-div").hide();
$("#endtime-div").find('input').each(function () {
$(this).prop("required", false);
});
$("#enddate-div").show();
$("#enddate-div").find('input').each(function () {
$(this).prop("required", true);
$(this).prop("min", $('#date').val());
$(this).val($('#date').val());
})
} else if (parseInt($(this).find(':selected').data('hourday')) === 1) {
$("#endtime-div").show();
$("#endtime-div").find('input').each(function () {
$(this).prop("required", true);
$(this).prop("disabled", false);
});
$("#enddate-div").hide();
$("#enddate-div").find('input').each(function () {
$(this).prop("required", false);
$(this).prop("min", '');
$(this).val('');
})
} else if (parseInt($(this).find(':selected').data('hourday')) === 3 || parseInt($(this).find(':selected').data('hourday')) === 4) {
$("#endtime-div").hide();
$("#endtime-div").find('input').each(function () {
$(this).prop("required", false);
$(this).prop("disabled", true);
});
$("#enddate-div").hide();
$("#enddate-div").find('input').each(function () {
$(this).prop("required", false);
$(this).prop("min", '');
$(this).val('');
})
}
if (parseInt($(this).find(':selected').data('comment')) === 1) {
$('#commend').prop("required", true);
} else {
$('#commend').prop("required", false);
}
});
$("body").on("change", "#date", function () {
if ($('#enddate-div').css('display') === "block") {
if ($('#date').val() > $('#enddate').val()) {
$('#enddate').prop("min", $('#date').val());
$('#enddate').val($('#date').val());
}
}
});
$("body").on("change", "#date", function () {
if ($('#endtime').css('display') === "block") {
if ($('#start').val() > $('#end').val()) {
console.log('größer');
$('#end').prop("min", $('#start').val());
$('#end').val($('#start').val());
}
}
});
$("body").on("click", ".edit-button", function () {
$('#submit-button').hide().removeClass('btn-primary').addClass('btn-danger').show();
$('#submit-button').text('Ändern');
$('#cancel-button').show();
$('#timerecordingCategory_id').val($(this).data('category')).change();
$('#id').val($(this).data('id'));
$('#date').val($(this).data('date'));
$('#start').val($(this).data('start'));
$('#end').val($(this).data('end'));
$('#enddate').val($(this).data('enddate'));
$('#commend').val($(this).data('commend'));
$('.alert-success').remove();
window.scrollTo(0, 0);
});
$("body").on("click", "#cancel-button", function () {
$('#submit-button').hide().removeClass('btn-danger').addClass('btn-primary').show();
$('#submit-button').text('Speichern');
$('#cancel-button').hide();
$('#id').val('');
});
});
</script>
<script type="text/javascript"
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
src="<?= self::getResourcePath() ?>js/pages/timerecording/index.js?<?= date('U') ?>"></script>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>

View File

@@ -65,7 +65,7 @@
<label class="col-lg-2 col-form-label" for="approval">Genehmigungspflichtig</label>
<div class="col-lg-3">
<div class="form-check">
<input class="form-check-input" <?php if ($timerecordingcategoriess->approval) echo 'checked="checked"'; ?>
<input id="approval" class="form-check-input" <?php if ($timerecordingcategoriess->approval) echo 'checked="checked"'; ?>
type="checkbox" name="approval" value="1" id="olt">
</div>
</div>
@@ -75,7 +75,7 @@
Pflichtfeld</label>
<div class="col-lg-3">
<div class="form-check">
<input class="form-check-input" <?php if ($timerecordingcategoriess->require_comment) echo 'checked="checked"'; ?>
<input id="require_comment" class="form-check-input" <?php if ($timerecordingcategoriess->require_comment) echo 'checked="checked"'; ?>
type="checkbox" name="require_comment" value="1">
</div>
</div>
@@ -84,7 +84,7 @@
<label class="col-lg-2 col-form-label" for="only_admin">Nur für Buchhaltung zu buchen</label>
<div class="col-lg-3">
<div class="form-check">
<input class="form-check-input" <?php if ($timerecordingcategoriess->only_admin) echo 'checked="checked"'; ?>
<input id="only_admin" class="form-check-input" <?php if ($timerecordingcategoriess->only_admin) echo 'checked="checked"'; ?>
type="checkbox" name="only_admin" value="1">
</div>
</div>

View File

@@ -0,0 +1,219 @@
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
$daysSelect = '<select required="required" name="day[]" class="select2 form-control" readonly="readonly" >';
foreach ($days as $key => $day) {
$daysSelect .= '<option value="' . $key . '">' . $day . '</option>';
}
$daysSelect .= "</select>";
?>
<script>
var daysselect = `<?= $daysSelect ?>`;
</script>
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<style>
.fa-circle-plus {
color: #00b125;
cursor: pointer;
font-size: 17px;
float: right;
}
.remove-workinghours {
cursor: pointer;
color: #ff0606;
font-size: 17px;
float: right;
margin-left: 7px;
margin-top: 8px;
}
</style>
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="<?= self::getUrl("Dashboard") ?>"><?= MFAPPNAME_SLUG ?></a>
</li>
<li class="breadcrumb-item"><a
href="<?= self::getUrl("TimerecordingEmployee") ?>">Personaladministration</a></li>
<li class="breadcrumb-item active"><?= ($timerecordingemployees->id) ? "bearbeiten" : "Neu" ?></li>
</ol>
</div>
<h4 class="page-title"><?= ($timerecordingemployees->id) ? "Personaladministration" : "Personaladministration" ?></h4>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-lg-12">
<div class="card bg-light">
<div class="card-body">
<h4 class="header-title mb-2"><?= ($timerecordingemployees->id) ? "Personaladministration" : "Personaladministration" ?></h4>
<form class="form-horizontal" method="post"
action="<?= self::getUrl("TimerecordingEmployee", "save") ?>">
<div class="card no-shadow">
<div class="card-body">
<input type="hidden" name="id" value="<?= $timerecordingemployees->id ?>"/>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="user_id">Mitarbeiter *</label>
<div class="col-lg-3">
<select required="required" id="user_id" name="user_id"
class="select2 form-control">
<option value="<?= $timerecordinguser[0]->id ?>"><?= $timerecordinguser[0]->name ?></option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="holidays">Initiale Urlaubstage</label>
<div class="col-lg-1">
<input required="required" type="number" id="holidays" name="holidays"
class="form-control"
value="<?= $timerecordingemployees->holidays ?>"/>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="plushours">Initiale Gutstunden</label>
<div class="col-lg-1">
<input required="required" type="text" id="plushours" name="plushours"
class="form-control"
value="<?= str_replace(".", ",", $timerecordingemployees->plushours / 3600) ?>"/>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label"
for="auto_workinghours">Schnellbuchung</label>
<div class="col-lg-3">
<div class="form-check">
<input id="auto_workinghours"
class="form-check-input" <?php if ($timerecordingemployees->auto_workinghours) echo 'checked="checked"'; ?>
type="checkbox" name="auto_workinghours" value="1"/>
</div>
</div>
</div>
<div id="workinghours_div">
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="workinghours">Sollzeiten
Arbeitswoche <i
class="fa-regular fa-circle-plus add-workinghours"></i></label>
<div class="col-lg-2 text-center">
<label class="col-form-label" for="workinghours"><span
id="workinghours-text">0 Stunden 0 Minuten</span></label>
</div>
</div>
<?php
if ($timerecordingworkinghours):
foreach ($timerecordingworkinghours as $timerecordingworkinghour): ?>
<div class="form-group row wtime">
<div class="col-lg-2">
<i class="fa-regular fa-circle-minus remove-workinghours"></i>
</div>
<div class="col-lg-2">
<select required="required" name="day[]"
class="select2 form-control"
readonly="readonly">
<?php foreach ($days as $key => $day) : ?>
<option value="<?= $key ?>" <?= ($key == $timerecordingworkinghour->day) ? "selected='selected'" : "" ?>><?= $day ?></option>';
<?php endforeach;
?>
</select>
</div>
<div class="col-lg-1">
<input type="time" name="timestart[]" class="form-control timestart"
value="<?= $timerecordingworkinghour->start ?>"
required="required"/>
</div>
<div class="col-lg-1">
<input required="required" type="time" name="timeend[]"
class="form-control timeend"
value="<?= $timerecordingworkinghour->end ?>"/>
</div>
</div>
<?php
endforeach;
endif
?>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2"></label>
<div class="col-lg-10">
<button type="submit" class="btn btn-primary">Speichern</button>
<a href="<?= self::getUrl("TimerecordingEmployee") ?>">
<button type="button" class="btn btn-secondary">Abbrechen</button>
</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function checktime() {
var sum = 0;
$(".wtime").each(function (index) {
console.log($(this).find('.timeend').val());
var newdatestart = new Date('2020/01/01 ' + $(this).find('.timestart').val() + ':00');
var newdateend = new Date('2020/01/01 ' + $(this).find('.timeend').val() + ':00');
var differenz = (newdateend - newdatestart) / 1000;
sum = sum + differenz;
});
var timenew = Math.floor(sum / 3600) + ' Stunden ' + Math.floor((sum % 3600) / 60) + ' Minuten';
$('#workinghours-text').text(timenew);
}
$(".select2").select2({placeholder: ""});
// disable mousewheel on a input number field when in focus
$('form').on('focus', 'input[type=number]', function (e) {
$(this).on('wheel.disableScroll', function (e) {
e.preventDefault()
})
});
$('form').on('blur', 'input[type=number]', function (e) {
$(this).off('wheel.disableScroll')
});
$("#workinghours_div").on("change", "input", function () {
checktime();
});
$("body").on("click", ".remove-workinghours", function () {
$(this).closest('.form-group').remove();
checktime();
});
$("body").on("click", ".add-workinghours", function () {
$('#workinghours_div').append(`<div class="form-group row wtime"><div class="col-lg-2"><i class="fa-regular fa-circle-minus remove-workinghours"></i></div><div class="col-lg-2">` +
daysselect + `</div><div class="col-lg-1"><input type="time" name="timestart[]" class="form-control timestart"
value="07:00" required="required" /></div><div class="col-lg-1"><input required="required" type="time" name="timeend[]" class="form-control timeend"
value="15:00" /></div>`);
checktime();
$(".select2").select2({placeholder: ""});
})
$(document).ready(function () {
checktime();
});
</script>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>

View File

@@ -0,0 +1,94 @@
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="<?= self::getUrl("Dashboard") ?>"><?= MFAPPNAME_SLUG ?></a>
</li>
<li class="breadcrumb-item active">Personaladministration</li>
</ol>
</div>
<h4 class="page-title">Personaladministration</h4>
</div>
</div>
</div>
<!-- end page title -->
<div class="card">
<div class="card-body mb-3">
<div class="row">
<div class="col-12">
<div class="float-left">
<h4 class="header-title">Liste aller Personaladministration</h4>
</div>
<div class="float-right">
</div>
</div>
</div>
<div class="col-lg-12">
<table id="datatable" class="table table-striped table-hover table-sm">
<thead>
<tr>
<th class="text-center">Mitarbeiter</th>
<th class="text-center">Sollzeiten</th>
<th class="text-center">Sollstunden</th>
<th class="text-center edit-width">Schnellbuchung</th>
<th class="edit-width"></th>
</tr>
<tr id="filterrow">
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach ($timerecordingusers as $timerecordinguser):
if ($timerecordingworkinghours) {
$seconds = $timerecordingworkinghours[$timerecordinguser->id]['secondcounter'];
$minutes = floor(($seconds % 3600) / 60);
$hours = floor($seconds / 3600);
$sum = sprintf("%02d", $hours) . ":" . sprintf("%02d", $minutes);
} else {
$sum = "";
}
?>
<tr>
<td><?= $timerecordinguser->name ?></td>
<td class="text-center"><?= ($timerecordingworkinghours) ? $timerecordingworkinghours[$timerecordinguser->id]['datetimetext'] : "" ?></td>
<td class="text-center"><?= $sum ?></td>
<td class="text-center"><?= ($timerecordingemployees[$timerecordinguser->id]['auto_workinghours'] == '1') ? 'Ja' : 'Nein' ?></td>
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
<a href="<?= self::getUrl("TimerecordingEmployee", "edit", ['id'=> $timerecordingemployees[$timerecordinguser->id]['id'],"userid" => $timerecordinguser->id]) ?>"><i
class="far fa-edit" title="Bearbeiten"></i></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var hidesearch = [4];
$(document).ready(function () {
});
</script>
<script type="text/javascript"
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>

View File

@@ -36,17 +36,17 @@
<label class="col-lg-2 col-form-label" for="timestamp">Datum *</label>
<div class="col-lg-3">
<input required="required" type="date" id="timestamp" name="timestamp" class="form-control"
value="<?= date("Y-m-d",$timerecordingholidays->timestamp) ?>"/>
value="<?= ($timerecordingholidays->timestamp) ? date("Y-m-d",$timerecordingholidays->timestamp) : date("Y-m-d",time()) ?>"/>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="description">Name *</label>
<div class="col-lg-3">
<input required="required" type="text" id="description" name="description" class="form-control"
value="<?= $timerecordingholidays->description ?>"/>
<input required="required" type="text" id="description" name="description" class="form-control"
value="<?= $timerecordingholidays->description ?>"/>
</div>
</div>
</div>
</div>
<div class="form-group row">