Merge branch 'spidev' into 'master'
Zeiterfassung Update See merge request fronk/thetool!275
This commit is contained in:
@@ -316,7 +316,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
|
||||
<table id="datatable" class="table table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th 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>
|
||||
|
||||
@@ -365,7 +365,6 @@ class TimerecordingController extends mfBaseController
|
||||
$data['holidays_now'] = $holidays_now;
|
||||
$employeeupdate->update($data);
|
||||
$employeeupdate->save();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -386,10 +385,13 @@ class TimerecordingController extends mfBaseController
|
||||
$endtime = date("Y-m-d", $endtime);
|
||||
$endtime = strtotime($endtime . " 23:59:00");
|
||||
|
||||
|
||||
$return = $this->getTimerecordingsApi(5, null, null, null, $plushours_timestamp, $endtime);
|
||||
$diffTime = $return['is'] - $return['must'];
|
||||
$plushours_now = $plushours_now + $diffTime;
|
||||
if ($plushours_timestamp > 0) {
|
||||
$return = $this->getTimerecordingsApi(5, null, null, null, $plushours_timestamp, $endtime);
|
||||
$diffTime = $return['is'] - $return['must'];
|
||||
$plushours_now = $plushours_now + $diffTime;
|
||||
} else {
|
||||
$diffTime = 0;
|
||||
}
|
||||
if ($employee->plushours_now != $diffTime) {
|
||||
$employeeupdate = new TimerecordingEmployee($employee->id);
|
||||
$data = [];
|
||||
@@ -721,21 +723,24 @@ class TimerecordingController extends mfBaseController
|
||||
if (!$holiDay[$dDate]) {
|
||||
if ($workingHours[$dDay]) {
|
||||
foreach ($workingHours[$dDay] as $workingHour) {
|
||||
|
||||
$starttime = strtotime($dDate . " " . $workingHour['start'] . ":00");
|
||||
$endtime = strtotime($dDate . " " . $workingHour['end'] . ":00");
|
||||
$check = $this->checkTimerecording($starttime, $endtime);
|
||||
if ($check['state'] == "success") {
|
||||
$update = 1;
|
||||
$data = [];
|
||||
$data['user_id'] = $this->me->id;
|
||||
$data['start'] = $starttime;
|
||||
$data['end'] = $endtime;
|
||||
$data['timerecordingCategory_id'] = 1;
|
||||
$data['comment'] = "Automatisch eingetragen";
|
||||
$data['businesstrip'] = 0;
|
||||
$data['businesstrip_info'] = NULL;
|
||||
$timerecordings = TimerecordingModel::create($data);
|
||||
$id = $timerecordings->save();
|
||||
if ($employee[0]->startdate <= $starttime) {
|
||||
if ($check['state'] == "success") {
|
||||
$update = 1;
|
||||
$data = [];
|
||||
$data['user_id'] = $this->me->id;
|
||||
$data['start'] = $starttime;
|
||||
$data['end'] = $endtime;
|
||||
$data['timerecordingCategory_id'] = 1;
|
||||
$data['comment'] = "Automatisch eingetragen";
|
||||
$data['businesstrip'] = 0;
|
||||
$data['businesstrip_info'] = NULL;
|
||||
$timerecordings = TimerecordingModel::create($data);
|
||||
$id = $timerecordings->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ class TimerecordingModel
|
||||
$endtime = $filter['endtime'];
|
||||
$id = $filter['id'];
|
||||
if (is_numeric($starttime) && is_numeric($endtime)) {
|
||||
$where .= " AND (((`start` <= $starttime AND `end` >= $starttime ) OR (`start` >= $endtime AND `end` <= $endtime) OR (`start` >= $starttime AND `end` >= $starttime AND `start` <= $endtime AND `end` <= $endtime) OR (`start` >= $starttime AND `end` >= $starttime AND `start` <= $endtime AND `end` >= $endtime)) OR ( `start` <= $starttime AND `end` IS NULL)) ORDER by user_id ASC";
|
||||
$where .= " AND (((`start` <= $starttime AND `end` > $starttime ) OR (`start` > $endtime AND `end` < $endtime) OR (`start` > $starttime AND `end` > $starttime AND `start` <= $endtime AND `end` < $endtime) OR (`start` > $starttime AND `end` > $starttime AND `start` < $endtime AND `end` > $endtime) OR (`start` = $starttime AND `end` = $endtime )) OR ( `start` <= $starttime AND `end` IS NULL)) ORDER by user_id ASC";
|
||||
if ($id && is_numeric($id)) {
|
||||
$where .= " AND `id` != $id";
|
||||
}
|
||||
|
||||
@@ -125,26 +125,32 @@ table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) {
|
||||
width: unset;
|
||||
display: table-cell;
|
||||
}
|
||||
.deny-button
|
||||
{
|
||||
|
||||
.deny-button {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.edit-td {
|
||||
text-align: left;
|
||||
letter-spacing: 12px;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
.display-calendar
|
||||
{
|
||||
color:#0d6efd;
|
||||
|
||||
.display-calendar {
|
||||
color: #0d6efd;
|
||||
font-size: 30px;
|
||||
margin-right:10px;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.active-calendar
|
||||
{
|
||||
color:#25b343;
|
||||
|
||||
.active-calendar {
|
||||
color: #25b343;
|
||||
}
|
||||
|
||||
.select2-minw {
|
||||
min-width: 150px;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.fa-circle-xmark, .fa-ban, .fa-trash, .fa-edit, .fa-square-check, .fa-arrows-up-down-left-right {
|
||||
font-size: 25px;
|
||||
@@ -212,17 +218,21 @@ table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) {
|
||||
font-size: 14px;
|
||||
margin: 12px 3px 7px 0px;
|
||||
}
|
||||
.display-calendar
|
||||
{
|
||||
font-size:35px;
|
||||
margin-top:5px;
|
||||
margin-right:10px;
|
||||
margin-bottom:20px;
|
||||
|
||||
.display-calendar {
|
||||
font-size: 35px;
|
||||
margin-top: 5px;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
}
|
||||
.label-calendar
|
||||
{
|
||||
margin-top:7px;
|
||||
|
||||
.label-calendar {
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.select2-minw {
|
||||
min-width: unset;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,10 +280,11 @@ table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before
|
||||
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out, -webkit-box-shadow .15s ease-in-out;
|
||||
}
|
||||
table.dataTable.table-hover>tbody>tr:hover>* {
|
||||
|
||||
table.dataTable.table-hover > tbody > tr:hover > * {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1)>* {
|
||||
box-shadow: none;
|
||||
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) > * {
|
||||
box-shadow: none;
|
||||
}
|
||||
@@ -35,7 +35,7 @@ $('#filterrow th').each(function (i) {
|
||||
options += '<option data-userid="' + $(this).val() + '" value="' + $(this).text() + '">' + $(this).text() + '</option>';
|
||||
});
|
||||
|
||||
$(this).html('<select style="padding: 0;height: 28px;;text-align: center;" id="selectsearch" class="form-control form-control-select form-control-special select2" data-index="' + i + '">' + options + '</select>');
|
||||
$(this).html('<select id="selectsearch" class="form-control form-control-select form-control-special select2 select2-minw" data-index="' + i + '">' + options + '</select>');
|
||||
|
||||
} else {
|
||||
$(this).html('<input type="text" placeholder="' + title + '" class="form-control" data-index="' + i + '" value="" />');
|
||||
|
||||
Reference in New Issue
Block a user