Zeiterfassungs Update

* Neuer Buchungszeitraum bei den Buchungskategorien ZA Uhrzeit (von/bis)
 * Überprüfungen/Berechungen/Errorhandling ZAs
 * Anpassungen Freigaben nun mit Standartfilter Offen
This commit is contained in:
Spitzer Daniel
2024-03-12 13:30:52 +01:00
parent 6e02b849bd
commit d1a25a23c2
13 changed files with 341 additions and 62 deletions
+8 -4
View File
@@ -127,7 +127,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
data-comment="<?= $timerecordingCategories->require_comment ?>"
data-hourday="<?= $timerecordingCategories->hourday ?>"
data-businesstrip="<?= $timerecordingCategories->businesstrip ?>"
data-homeoffice="<?= ($timerecordingCategories->hourday==1) ? 1 : 0 ?>"><?= $timerecordingCategories->name ?></option>
data-homeoffice="<?= ($timerecordingCategories->hourday == 1) ? 1 : 0 ?>"><?= $timerecordingCategories->name ?></option>
</option>
<?php
endif;
@@ -178,10 +178,13 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
<label class="col-form-label" for="comment">Anmerkung</label>
<input type="text" id="comment" name="comment" class="form-control"/>
</div>
<div class="form-group col-lg-4" id="div-calc-overtime" style="display:none">
<label class="col-form-label mobile-hide" for="comment">&nbsp;</label>
<div class=" d-block" style="padding: 0.45rem 0.9rem;" id="calc-overtime"></div>
</div>
</div>
<div class="row" >
<div class="row">
<div class="col-lg-1 mb-2" id="homeoffice-div">
<div class="form-check text-center mt-1">
@@ -354,7 +357,8 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
let insertUrl = "<?= self::getUrl("Timerecording", "save") ?>";
let deleteUrl = "<?= self::getUrl("Timerecording", "delete") ?>";
let requestUrl = "<?= self::getUrl("Timerecording", "api", ['do' => 'getTimerecordings']) ?>";
let autoWorkinghoursUrl = "<?= self::getUrl("Timerecording", "api", ['do' => 'fillWorkinghours']) ?>";
let autoWorkinghoursUrl = "<?= self::getUrl("Timerecording", "api", ['do' => 'fillWorkinghours']) ?>";
let checkWorkinghoursUrl = "<?= self::getUrl("Timerecording", "api", ['do' => 'checkWorkinghours']) ?>";
</script>
<script type="text/javascript"
@@ -33,7 +33,7 @@
</div>
</div>
</div>
<table id="datatable" class="table table-striped table-hover table-sm">
<table id="datatable" class="table table-hover table-sm">
<thead>
<tr>
<th class="text-center">Beizeichnung</th>
+10 -2
View File
@@ -42,7 +42,7 @@ $type[3] = "Lehrling";
</div>
</div>
<div class="col-lg-12">
<table id="datatable" class="table table-striped table-hover table-sm">
<table id="datatable" class="table table-hover table-sm">
<thead>
<tr>
<th class="text-center">Mitarbeiter</th>
@@ -87,6 +87,14 @@ $type[3] = "Lehrling";
$plusHours = $timerecordingemployees[$timerecordinguser->id]['plushours_now'];
$plusHours = sprintf('%02dh:%02dm', floor($plusHours / 3600), floor($plusHours / 60 % 60));
}
if ($timerecordingemployees[$timerecordinguser->id]['overtime_now'] < 0) {
$overTime = $timerecordingemployees[$timerecordinguser->id]['overtime_now'] * -1;
$overTime = "-" . sprintf('%02dh:%02dm', floor($overTime / 3600), floor($overTime / 60 % 60));
} else {
$overTime = $timerecordingemployees[$timerecordinguser->id]['overtime_now'];
$overTime = sprintf('%02dh:%02dm', floor($overTime / 3600), floor($overTime / 60 % 60));
}
?>
<tr>
@@ -97,7 +105,7 @@ $type[3] = "Lehrling";
<td class="text-center"><?= $sum ?></td>
<td class="text-center"
data-order="<?= ($timerecordingemployees[$timerecordinguser->id]['plushours_now']) ? $timerecordingemployees[$timerecordinguser->id]['plushours_now'] : 0 ?>"><?= $plusHours ?></td>
<td class="text-center" data-order="<?= $timerecordingemployees[$timerecordinguser->id]['overtime'] ?>"><?= sprintf('%02d:%02d', floor($timerecordingemployees[$timerecordinguser->id]['overtime'] / 3600), floor($timerecordingemployees[$timerecordinguser->id]['overtime'] / 60 % 60)) ?></td>
<td class="text-center" data-order="<?= $timerecordingemployees[$timerecordinguser->id]['overtime_now'] ?>"><?= $overTime ?></td>
<td class="text-center" data-order="<?= ($timerecordingemployees[$timerecordinguser->id]['holidays_now']) ? $timerecordingemployees[$timerecordinguser->id]['holidays_now'] : '' ?>"><?= ($timerecordingemployees[$timerecordinguser->id]['holidays_now']) ? $timerecordingemployees[$timerecordinguser->id]['holidays_now'] . ' Tage' : '' ?> </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;">
@@ -37,7 +37,7 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
</div>
</div>
</div>
<table id="datatable" class="table table-striped table-hover table-sm">
<table id="datatable" class="table table-hover table-sm">
<thead>
<tr>
<th style="width: 200px;" class="text-center">Datum</th>
+2 -2
View File
@@ -182,9 +182,9 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
<script type="text/javascript">
var hidesearch = [2, 3, 4, 8];
var columnfilter = [7];
var columnoptions = '<option value=""></option><option value="Offen">Offen</option><option value="Genehmigt">Genehmigt</option><option value="Abgelehnt">Abgelehnt</option>';
var columnoptions = '<option value=""></option><option selected="selected" value="Offen">Offen</option><option value="Genehmigt">Genehmigt</option><option value="Abgelehnt">Abgelehnt</option>';
$(document).ready(function () {
$('#selectsearch').change();
});
</script>
+45 -40
View File
@@ -92,6 +92,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
.fixed-state {
background-color: #d0fbd9;
}
.form-check-label {
margin-top: 2px;
}
@@ -200,56 +201,60 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
<div class="form-group col-lg-2">
<label class="col-form-label" for="comment">Anmerkung</label>
<input type="text" id="comment" name="comment" class="form-control"
<input type="text" id="comment" name="comment" class="form-control">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-1 mb-2" id="homeoffice-div">
<div class="form-check text-center mt-1">
<input class="form-check-input" type="checkbox" name="homeoffice"
id="homeoffice" value="1">
<label class="form-check-label" for="homeoffice">
Homeoffice
</label>
<div class="form-group col-lg-2" id="div-calc-overtime" style="display:none">
<label class="col-form-label mobile-hide" for="comment">&nbsp;</label>
<div class=" d-block" style="padding: 0.45rem 0.9rem;" id="calc-overtime"></div>
</div>
</div>
<div class="col-lg-2 mb-2 businesstrip-div">
<div class="form-check text-center mt-1">
<input class="form-check-input" type="checkbox" name="businesstrip"
id="businesstrip" value="1">
<label class="form-check-label" for="businesstrip">
Dienstreise > 12KM
</label>
<div class="row">
<div class="col-lg-1 mb-2" id="homeoffice-div">
<div class="form-check text-center mt-1">
<input class="form-check-input" type="checkbox" name="homeoffice"
id="homeoffice" value="1">
<label class="form-check-label" for="homeoffice">
Homeoffice
</label>
</div>
</div>
<div class="col-lg-2 mb-2 businesstrip-div">
<div class="form-check text-center mt-1">
<input class="form-check-input" type="checkbox" name="businesstrip"
id="businesstrip" value="1">
<label class="form-check-label" for="businesstrip">
Dienstreise > 12KM
</label>
</div>
</div>
<div class="col-lg-2 businesstrip-div">
<input style="display:none" type="text" id="businesstrip_info" name="businesstrip_info"
placeholder="Ort"
class="form-control"/>
</div>
</div>
<div class="col-lg-2 businesstrip-div">
<input style="display:none" type="text" id="businesstrip_info" name="businesstrip_info"
placeholder="Ort"
class="form-control"/>
<div class=" row mt-2">
<div class="col-lg-2 ">
<button id="submit-button" type="submit" class="btn btn-primary">Speichern</button>
<button id="cancel-button" type="button" class="btn btn-secondary" style="display:none">
Abbrechen
</button>
</div>
</div>
<div class=" row mt-2">
<div class="col-lg-4" id="message-box">
</div>
</div>
</div>
<div class=" row mt-2">
<div class="col-lg-2 ">
<button id="submit-button" type="submit" class="btn btn-primary">Speichern</button>
<button id="cancel-button" type="button" class="btn btn-secondary" style="display:none">Abbrechen
</button>
</div>
</div>
<div class=" row mt-2">
<div class="col-lg-4" id="message-box">
</div>
</div>
</div>
</form>
</div>
<div class="card">
<div class="card-body mb-3">
<div class="form-group module-row row mb-3">
@@ -375,7 +380,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
let deleteUrl = "<?= self::getUrl("Timerecording", "delete") ?>";
let requestUrl = "<?= self::getUrl("TimerecordingReport", "api", ['do' => 'getTimerecordings']) ?>";
let requestTimesUrl = "<?= self::getUrl("TimerecordingReport", "api", ['do' => 'getTimerecordingsTimes']) ?>";
let checkWorkinghoursUrl = "<?= self::getUrl("Timerecording", "api", ['do' => 'checkWorkinghours']) ?>";
</script>
<script type="text/javascript"