Zeiterfassung update
This commit is contained in:
@@ -179,9 +179,9 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" id="businesstrip-div">
|
||||
|
||||
<div class="col-lg-2 mb-2" id="businesstrip-div">
|
||||
<div class="col-lg-2 mb-2">
|
||||
|
||||
<div class="form-check text-center mt-1">
|
||||
<input class="form-check-input" type="checkbox" name="businesstrip" value=""
|
||||
|
||||
@@ -70,6 +70,16 @@ $daysSelect .= "</select>";
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="type">Vertragsart *</label>
|
||||
<div class="col-lg-3">
|
||||
<select class="select2 form-control " name="type" id="type">
|
||||
<option value="1" <?= ($timerecordingemployees->type == '1') ? "selected='selected'" : "" ?>>Angestellter</option>
|
||||
<option value="2" <?= ($timerecordingemployees->type == '2') ? "selected='selected'" : "" ?>>Arbeiter</option>
|
||||
<option value="3" <?= ($timerecordingemployees->type == '3') ? "selected='selected'" : "" ?>>Lehrling</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="startdate">Startdatum
|
||||
Zeiterfassung</label>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
||||
$type[1] = "Angestellter";
|
||||
$type[2] = "Arbeiter";
|
||||
$type[3] = "Lehrling";
|
||||
?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- start page title -->
|
||||
@@ -34,6 +38,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Mitarbeiter</th>
|
||||
<th class="text-center">Vertragsart</th>
|
||||
<th class="text-center">Start Zeitaufzeichnung</th>
|
||||
<th class="text-center">Sollzeiten</th>
|
||||
<th class="text-center">Sollstunden</th>
|
||||
@@ -47,6 +52,7 @@
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -63,12 +69,13 @@
|
||||
|
||||
<tr>
|
||||
<td><?= $timerecordinguser->name ?></td>
|
||||
<td class="text-center"><?= ($timerecordingemployees[$timerecordinguser->id]['startdate']) ? date("d.m.Y",$timerecordingemployees[$timerecordinguser->id]['startdate']) : "-" ?></td>
|
||||
<td><?= $type[$timerecordingemployees[$timerecordinguser->id]['type']] ?></td>
|
||||
<td class="text-center"><?= ($timerecordingemployees[$timerecordinguser->id]['startdate']) ? date("d.m.Y", $timerecordingemployees[$timerecordinguser->id]['startdate']) : "-" ?></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
|
||||
<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>
|
||||
|
||||
@@ -271,25 +271,25 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
|
||||
</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 fixed-state"><span
|
||||
class="text-bold">Urlaubstage: </span><span id="holidays"
|
||||
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 fixed-state"><span
|
||||
class="text-bold">Gutzeit: </span><span
|
||||
id="plushours"
|
||||
class="ml-1 text-normal"></span></label>
|
||||
</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 fixed-state"><span-->
|
||||
<!-- class="text-bold">Urlaubstage: </span><span id="holidays"-->
|
||||
<!-- 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 fixed-state"><span-->
|
||||
<!-- class="text-bold">Gutzeit: </span><span-->
|
||||
<!-- id="plushours"-->
|
||||
<!-- class="ml-1 text-normal"></span></label>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -106,9 +106,9 @@ class TimerecordingEmployeeController extends mfBaseController
|
||||
$data['user_id'] = trim($r->user_id);
|
||||
$data['auto_workinghours'] = trim($r->auto_workinghours);
|
||||
$data['holidays'] = trim($r->holidays);
|
||||
$data['businesstrip'] = trim($r->businesstrip);
|
||||
$data['plushours'] = $plushours;
|
||||
$data['startdate'] = strtotime($r->startdate);
|
||||
$data['type'] = trim($r->type);
|
||||
|
||||
|
||||
if (!$data['user_id']) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
class TimerecordingEmployeeModel
|
||||
{
|
||||
private $user_id;
|
||||
private $type;
|
||||
private $auto_workinghours;
|
||||
private $holidays;
|
||||
private $plushours;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class TimerecordingEmployeeAddFieldType extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("TimerecordingEmployee", ["signed" => true]);
|
||||
$table->addColumn("type", "integer", ["null" => false, "default" => '1', "after" => "user_id", "comment" => "1:Angestellter/2:Arbeiter/3:Lehrling"]);
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$this->table("TimerecordingEmployee")->removeColumn("type")->save();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user