Zeiterfassung Feature Jobrad

* Implementation
 * Migration
This commit is contained in:
Daniel Spitzer
2024-07-09 17:23:11 +02:00
parent c3af1b7374
commit 1fba2e392e
8 changed files with 90 additions and 10 deletions
@@ -4,7 +4,8 @@
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= $git_merge_ts ?>" rel="stylesheet"
type="text/css"/>
<link href="<?= self::getResourcePath() ?>datatables/DataTables-2x/datatables.min.css?<?= $git_merge_ts ?>" rel="stylesheet"
<link href="<?= self::getResourcePath() ?>datatables/DataTables-2x/datatables.min.css?<?= $git_merge_ts ?>"
rel="stylesheet"
type="text/css"/>
<style>
.fa-arrow-right-from-bracket {
@@ -136,7 +137,7 @@
<th class="text-center">Sollst.</th>
<th class="text-center">Sollabweichung</th>
<th class="text-center min-w-100">Mehrst.</th>
<th class="text-center min-w-100">Ges. Überst.</th>
<th class="text-center min-w-100" title="Gesamte Gutstunden">Gutstunden</th>
<?php if ($me->superexpertEnabled()): ?>
<th class="text-center min-w-70">Black P. St.</th>
<?php endif; ?>
@@ -144,7 +145,7 @@
<th title="Überstunden 50%" class="text-center min-w-70">Ü50</th>
<th title="Überstunden 100%" class="text-center min-w-70">Ü100</th>
<th class="text-center">Diäten</th>
<th class="text-center">HO</th>
<th class="text-center" title="Homeoffice">HO</th>
</tr>
<tr id="filterrow">
<th></th>
@@ -192,8 +193,7 @@
}
?>
<tr>
<td class="text-nowrap">(<?= $employee_number ?>
) <?= $timerecording->timerecordingEmployee->user->name ?> </td>
<td class="text-nowrap">(<?= $employee_number ?>) <?= $timerecording->timerecordingEmployee->user->name ?> <?= ($timerecording->timerecordingEmployee->jobbike == 1) ? '<div class="float-right"><i title="Jobrad" class="fa-sharp fa-regular fa-person-biking"></i></div>' : '' ?></td>
<td class="text-center"><?= number_format(round($timerecording->ishours / 3600, 2), "2", ",", ".") ?></td>
<td class="text-center"><?= $nlz ?></td>
<td class="text-center"><?= number_format(round($timerecording->ishourssum / 3600, 2), "2", ",", ".") ?></td>
@@ -250,6 +250,9 @@
<div class="row">
<div class="col-12">
<table class="table ">
<tr>
<td colspan="2" id="modal-user-info"></td>
</tr>
<tr id="overtimes">
</tr>
<tr class="transfer-tr transfer-tr tr-plushours" style="display: none">
@@ -415,7 +418,11 @@
$('#submit-button').data('type', 'bpa');
$('#overtimeModal').data('id', button.data('id'));
}
console.log(button.closest('tr').find('.fa-person-biking').length);
$('#modal-user-info').html('<span class="font-weight-500 font-15">'+ button.closest('tr').find('td').eq(0).text()+'</span>');
if (button.closest('tr').find('.fa-person-biking').length) {
$('#modal-user-info').append('<div class="float-right font-15">'+button.closest('tr').find('.fa-person-biking').closest('div').html()+'</div>');
}
});
@@ -258,7 +258,6 @@ $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;
@@ -180,6 +180,17 @@ $daysSelect .= "</select>";
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label"
for="auto_workinghours">Jobrad</label>
<div class="col-lg-3">
<div class="form-check">
<input id="jobbike"
class="form-check-input" <?php if ($timerecordingemployees->jobbike) echo 'checked="checked"'; ?>
type="checkbox" name="jobbike" 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
@@ -67,6 +67,7 @@ $type[3] = "Lehrling";
<?php endif; ?>
<th class="text-center" title="Offene Urlaube">Urlaubstage</th>
<th class="text-center edit-width">Schnellb.</th>
<th class="text-center edit-width">Jobrad</th>
<th class="edit-width"></th>
</tr>
<tr id="filterrow">
@@ -86,6 +87,7 @@ $type[3] = "Lehrling";
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@@ -139,6 +141,7 @@ $type[3] = "Lehrling";
<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']) ? $timerecordingemployees[$timerecordinguser->id]['holidays_now'] . ' Tage' : '0 Tage' ?> </td>
<td class="text-center pr-3"><?= ($timerecordingemployees[$timerecordinguser->id]['auto_workinghours'] == '1') ? 'Ja' : 'Nein' ?></td>
<td class="text-center pr-3"><?= ($timerecordingemployees[$timerecordinguser->id]['jobbike'] == '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>
@@ -157,11 +160,11 @@ $type[3] = "Lehrling";
src="<?= self::getResourcePath() ?>datatables/DataTables-2x/datatables.min.js?<?= $git_merge_ts ?>"></script>
<script type="text/javascript">
var hidesearch = [ 6, 7, 8, 9, 10,12];
var columnfilter = [0,11];
var hidesearch = [ 6, 7, 8, 9, 10,13];
var columnfilter = [0,11,12];
<?php if ($me->superexpertEnabled()): ?>
var columnfilter = [0,12];
hidesearch = [ 6, 7, 8, 9, 10, 11,13];
hidesearch = [ 6, 7, 8, 9, 10, 11,14];
<?php endif; ?>
var columnoptions = '<option value=""></option><option value="Ja">Ja</option><option value="Nein">Nein</option>';