Merge branch 'spidev' into 'master'
Zeiterfassung See merge request fronk/thetool!1609
This commit is contained in:
@@ -97,10 +97,7 @@
|
||||
background-color: #d7d7d7;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
@@ -126,7 +123,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<?php
|
||||
$plugs[1] = "LC";
|
||||
$plugs[2] = "SC";
|
||||
|
||||
@@ -134,6 +134,14 @@ $daysSelect .= "</select>";
|
||||
value="<?= ($timerecordingemployees->birthday) ? date('Y-m-d', $timerecordingemployees->birthday) : "" ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="insurance_number">SV-Nummer (4 stellig)</label>
|
||||
<div class="col-lg-1">
|
||||
<input type="number" id="insurance_number" name="insurance_number"
|
||||
class="form-control" max="9999"
|
||||
value="<?= ($timerecordingemployees->insurance_number) ?: "" ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($me->superexpertEnabled()): ?>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="bpahours">Black Pig Stunden</label>
|
||||
|
||||
@@ -56,6 +56,7 @@ $type[3] = "Lehrling";
|
||||
<th class="text-center edit-width-medium">Aktiv</th>
|
||||
<th class="text-center">Mitarbeiter</th>
|
||||
<th class="text-center">Geburtstag</th>
|
||||
<th class="text-center">SV-Nummer</th>
|
||||
<th class="text-center">Vertragsart</th>
|
||||
<th title="Zeiterfassung Start" class="text-center">ZE Start</th>
|
||||
<th title="Zeiterfassung Ende" class="text-center">ZE Ende</th>
|
||||
@@ -80,6 +81,7 @@ $type[3] = "Lehrling";
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<?php if ($me->superexpertEnabled()): ?>
|
||||
<th></th>
|
||||
<?php endif; ?>
|
||||
@@ -127,6 +129,9 @@ $type[3] = "Lehrling";
|
||||
<td><?= $timerecordinguser->name ?></td>
|
||||
<td class="text-center"
|
||||
data-order="<?= $timerecordingemployees[$timerecordinguser->id]['birthday'] ?>"><?= ($timerecordingemployees[$timerecordinguser->id]['birthday']) ? date("d.m.Y", $timerecordingemployees[$timerecordinguser->id]['birthday']) : "-" ?></td>
|
||||
<td class="text-center"
|
||||
data-order="<?= $timerecordingemployees[$timerecordinguser->id]['insurance_number'] ?>"><?= ($timerecordingemployees[$timerecordinguser->id]['insurance_number']) ?: "-" ?></td>
|
||||
|
||||
<td><?= $type[$timerecordingemployees[$timerecordinguser->id]['type']] ?></td>
|
||||
<td class="text-center"
|
||||
data-order="<?= $timerecordingemployees[$timerecordinguser->id]['startdate'] ?>"><?= ($timerecordingemployees[$timerecordinguser->id]['startdate']) ? date("d.m.Y", $timerecordingemployees[$timerecordinguser->id]['startdate']) : "-" ?></td>
|
||||
@@ -164,11 +169,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, 13];
|
||||
var columnfilter = [0, 11, 12];
|
||||
<?php if ($me->superexpertEnabled()): ?>
|
||||
var hidesearch = [7, 8, 9, 10, 11, 14];
|
||||
var columnfilter = [0, 12, 13];
|
||||
hidesearch = [6, 7, 8, 9, 10, 11, 14];
|
||||
<?php if ($me->superexpertEnabled()): ?>
|
||||
var columnfilter = [0, 13, 14];
|
||||
hidesearch = [7, 8, 9, 10, 11, 15];
|
||||
<?php endif; ?>
|
||||
|
||||
var columnoptions = '<option value=""></option><option value="Ja">Ja</option><option value="Nein">Nein</option>';
|
||||
|
||||
@@ -204,9 +204,11 @@ class TimerecordingEmployeeController extends mfBaseController
|
||||
if (!$data['overtime']) {
|
||||
$data['overtime'] = 0;
|
||||
}
|
||||
|
||||
if (!$data['bmd_active']) {
|
||||
$data['bmd_active'] = 0;
|
||||
}
|
||||
|
||||
if (!$data['enddate']) {
|
||||
$data['enddate'] = null;
|
||||
}
|
||||
@@ -216,6 +218,13 @@ class TimerecordingEmployeeController extends mfBaseController
|
||||
} else {
|
||||
$data['birthday'] = null;
|
||||
}
|
||||
if ($r->insurance_number) {
|
||||
$data['insurance_number'] = $r->insurance_number;
|
||||
} else {
|
||||
$data['insurance_number'] = null;
|
||||
}
|
||||
|
||||
|
||||
if (!$data['user_id']) {
|
||||
$this->layout()->setFlash("Mitarbeiter darf nicht leer sein", "error");
|
||||
$this->redirect("TimerecordingEmployee");
|
||||
|
||||
@@ -22,6 +22,7 @@ class TimerecordingEmployeeModel
|
||||
private $jobbike;
|
||||
private $only_admin;
|
||||
private $birthday;
|
||||
private $insurance_number;
|
||||
public static $employeetypesbmd = array('1' => '1000', '2' => '1200', '3' => '1400');
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class TimerecordingEmployeeAddInsuranceNumber extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("TimerecordingEmployee", ["signed" => true]);
|
||||
$table->addColumn("insurance_number", "string", ["null" => true, "after" => "birthday"]);
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$this->table("TimerecordingEmployee")->removeColumn("only_admin")->save();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user