Merge branch 'spidev' into 'master'

Zeiterfassung Update

See merge request fronk/thetool!276
This commit is contained in:
Frank Schubert
2024-03-05 13:07:07 +00:00
16 changed files with 515 additions and 87 deletions

View File

@@ -126,7 +126,9 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
data-approval="<?= $timerecordingCategories->approval ?>"
data-comment="<?= $timerecordingCategories->require_comment ?>"
data-hourday="<?= $timerecordingCategories->hourday ?>"
data-businesstrip="<?= $timerecordingCategories->businesstrip ?>"><?= $timerecordingCategories->name ?></option>
data-businesstrip="<?= $timerecordingCategories->businesstrip ?>"
data-homeoffice="<?= ($timerecordingCategories->hourday==1) ? 1 : 0 ?>"><?= $timerecordingCategories->name ?></option>
</option>
<?php
endif;
endforeach; ?>
@@ -179,9 +181,19 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
</div>
<div class="row" id="businesstrip-div">
<div class="row" >
<div class="col-lg-1 mb-2" id="homeoffice-div">
<div class="col-lg-2 mb-2">
<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"
@@ -191,7 +203,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
</label>
</div>
</div>
<div class="col-lg-2">
<div class="col-lg-2 businesstrip-div">
<input style="display:none" type="text" id="businesstrip_info" name="businesstrip_info"
placeholder="Ort"
class="form-control"/>

View File

@@ -223,16 +223,19 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
}
oldname = value.user.user;
}
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
});
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
});
cindex++;
}
oldname = value.user.user;
cindex++;
});
var initialLocaleCode = 'en';

View File

@@ -65,7 +65,8 @@
<label class="col-lg-2 col-form-label" for="approval">Genehmigungspflichtig</label>
<div class="col-lg-3">
<div class="form-check">
<input id="approval" 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,25 +76,30 @@
Pflichtfeld</label>
<div class="col-lg-3">
<div class="form-check">
<input id="require_comment" 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>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="businesstrip">Dienstreisemöglichkeit</label>
<label class="col-lg-2 col-form-label"
for="businesstrip">Dienstreisemöglichkeit</label>
<div class="col-lg-3">
<div class="form-check">
<input id="businesstrip" class="form-check-input" <?php if ($timerecordingcategoriess->businesstrip) echo 'checked="checked"'; ?>
<input id="businesstrip"
class="form-check-input" <?php if ($timerecordingcategoriess->businesstrip) echo 'checked="checked"'; ?>
type="checkbox" name="businesstrip" value="1">
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="only_admin">Nur für Buchhaltung zu buchen</label>
<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 id="only_admin" 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>
@@ -130,6 +136,15 @@
$('form').on('blur', 'input[type=number]', function (e) {
$(this).off('wheel.disableScroll')
});
$(document).ready(function () {
$("body").on("change", "#hourday", function () {
if ($(this).val() == 5) {
$("#only_admin").prop("checked", true);
} else {
}
});
$("#hourday").change();
});
</script>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>

View File

@@ -5,6 +5,14 @@ $type[3] = "Lehrling";
?>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<style>
.border-dark {
border-color: #cbcbcb !important;
}
.border-bottom {
border-bottom: 1px dotted #adadad !important;
}
</style>
<!-- start page title -->
<div class="row">
<div class="col-12">
@@ -71,6 +79,14 @@ $type[3] = "Lehrling";
} else {
$sum = "";
}
if ($timerecordingemployees[$timerecordinguser->id]['plushours_now'] < 0) {
$plusHours = $timerecordingemployees[$timerecordinguser->id]['plushours_now'] * -1;
$plusHours = "-" . sprintf('%02dh:%02dm', floor($plusHours / 3600), floor($plusHours / 60 % 60));
} else {
$plusHours = $timerecordingemployees[$timerecordinguser->id]['plushours_now'];
$plusHours = sprintf('%02dh:%02dm', floor($plusHours / 3600), floor($plusHours / 60 % 60));
}
?>
<tr>
@@ -79,9 +95,10 @@ $type[3] = "Lehrling";
<td class="text-center"><?= ($timerecordingemployees[$timerecordinguser->id]['startdate']) ? date("d.m.Y", $timerecordingemployees[$timerecordinguser->id]['startdate']) : "-" ?></td>
<td class="text-center text-nowrap"><?= ($timerecordingworkinghours) ? $timerecordingworkinghours[$timerecordinguser->id]['datetimetext'] : "" ?></td>
<td class="text-center"><?= $sum ?></td>
<td class="text-center"><?= sprintf('%02d:%02d', ($timerecordingemployees[$timerecordinguser->id]['plushours_now']/ 3600),($timerecordingemployees[$timerecordinguser->id]['plushours_now']/ 60 % 60)) ?></td>
<td class="text-center"><?= sprintf('%02d:%02d', ($timerecordingemployees[$timerecordinguser->id]['overtime_now']/ 3600),($timerecordingemployees[$timerecordinguser->id]['overtime_now']/ 60 % 60)) ?></td>
<td class="text-center"><?= ($timerecordingemployees[$timerecordinguser->id]['holidays_now']) ? $timerecordingemployees[$timerecordinguser->id]['holidays_now'].' Tage' : '' ?> </td>
<td class="text-center"
data-order="<?= ($timerecordingemployees[$timerecordinguser->id]['plushours_now']) ? $timerecordingemployees[$timerecordinguser->id]['plushours_now'] : 0 ?>"><?= $plusHours ?></td>
<td class="text-center"><?= sprintf('%02d:%02d', floor($timerecordingemployees[$timerecordinguser->id]['overtime_now'] / 3600), floor($timerecordingemployees[$timerecordinguser->id]['overtime_now'] / 60 % 60)) ?></td>
<td class="text-center"><?= ($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;">
<a href="<?= self::getUrl("TimerecordingEmployee", "edit", ['id' => $timerecordingemployees[$timerecordinguser->id]['id'], "userid" => $timerecordinguser->id]) ?>"><i
@@ -100,7 +117,7 @@ $type[3] = "Lehrling";
<script type="text/javascript">
var hidesearch = [3,4,5,6,7,9];
var hidesearch = [3, 4, 5, 6, 7, 9];
$(document).ready(function () {

View File

@@ -92,7 +92,9 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
.fixed-state {
background-color: #d0fbd9;
}
.form-check-label {
margin-top: 2px;
}
</style>
<!-- start page title -->
<div class="row">
@@ -140,7 +142,8 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
data-approval="<?= $timerecordingCategories->approval ?>"
data-comment="<?= $timerecordingCategories->require_comment ?>"
data-hourday="<?= $timerecordingCategories->hourday ?>"
data-businesstrip="<?= $timerecordingCategories->businesstrip ?>"><?= $timerecordingCategories->name ?></option>
data-businesstrip="<?= $timerecordingCategories->businesstrip ?>"
data-homeoffice="<?= ($timerecordingCategories->hourday == 1) ? 1 : 0 ?>"><?= $timerecordingCategories->name ?></option>
<?php
endforeach; ?>
</select>
@@ -185,6 +188,16 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
</div>
</div>
<div id="days-div" class="col-lg-1" style="display:none">
<div class="form-row">
<div class="form-group col">
<label class=" col-form-label" for="days">Anzahl Tage</label>
<input type="number" id="days" name="days" class="form-control "
placeholder=""/>
</div>
</div>
</div>
<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"
@@ -192,9 +205,18 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
</div>
</div>
<div class="row" id="businesstrip-div">
<div class="row">
<div class="col-lg-1 mb-2" id="homeoffice-div">
<div class="col-lg-2 mb-2">
<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"
@@ -204,7 +226,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
</label>
</div>
</div>
<div class="col-lg-2">
<div class="col-lg-2 businesstrip-div">
<input style="display:none" type="text" id="businesstrip_info" name="businesstrip_info"
placeholder="Ort"
class="form-control"/>
@@ -316,7 +338,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
<table id="datatable" class="table table-hover table-sm">
<thead>
<tr>
<th style="min-width: 250px;" class="text-center text-nowrap ">Mitarbeiter</th>
<th style="min-width: 250px;" class="text-center text-nowrap ">Mitarbeiter</th>
<th style="width: 200px;" class="text-center text-nowrap ">Datum</th>
<th class="text-nowrap edit-width text-center">Von</th>
<th class="text-nowrap edit-width text-center">Bis</th>

View File

@@ -36,9 +36,9 @@
<li class="has-submenu"><a href="#"><i class="far fa-fw fa-calendar-clock"></i>Zeiterfassung <div class="arrow-down"></div></a>
<ul class="submenu">
<li><a href="<?=self::getUrl("Timerecording")?>"><i class="far fa-fw fa-calendar text-info"></i> Buchungen</a></li>
<li><a href="<?=self::getUrl("TimerecordingCalendar")?>"><i class="far fa-fw fa-calendar-days text-info"></i> Abwesenheitskalender</a></li>
<?php if ($me->can('Fibu')): ?>
<li><a href="<?=self::getUrl("TimerecordingPermit")?>"><i class="far fa-fw fa-calendar-check text-info"></i> Freigaben</a></li>
<li><a href="<?=self::getUrl("TimerecordingCalendar")?>"><i class="far fa-fw fa-calendar-days text-info"></i> Abwesenheitskalender</a></li>
<li><a href="<?=self::getUrl("TimerecordingReport")?>"><i class="far fa-fw fa-chart-pie text-info"></i> Auswertung/Korrektur</a></li>
<li><a href="<?=self::getUrl("TimerecordingCategory")?>"><i class="far fa-fw fa-list text-info"></i> Buchungsarten</a></li>
<li><a href="<?=self::getUrl("TimerecordingHoliday")?>"><i class="far fa-fw fa-umbrella-beach text-info"></i> Feiertage</a></li>