Zeiterfassung neues Feature:
Features für Project 7832: * Das Pickerldatum Zusatzfeld * Auftrennen PKW und Anhänger * Dokumente Upload * Standardsortierung * Ausgeschieden Flag mit Datum * zusätzliche migration
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
||||
if (isset($_GET['returnto']) && $_GET['returnto'] == "detail") {
|
||||
$cancelUrl = self::getUrl("TimerecordingCar", "Detail", ["id" => $timerecordingcars->id]);
|
||||
if ($_GET['hash']) {
|
||||
$hash = $_GET['hash'];
|
||||
} else {
|
||||
$cancelUrl = self::getUrl("TimerecordingCar");
|
||||
$hash = "";
|
||||
}
|
||||
if (isset($_GET['returnto']) && $_GET['returnto'] == "detail") {
|
||||
$cancelUrl = self::getUrl("TimerecordingCar", "Detail", ["id" => $timerecordingcars->id, "hash" => $_GET['hash']]);
|
||||
} else {
|
||||
$cancelUrl = self::getUrl("TimerecordingCar") . "#" . $hash;
|
||||
}
|
||||
foreach ($timerecordingusers as $timerecordinguser) {
|
||||
$timerecordingUsers[$timerecordinguser->name] = $timerecordinguser->id;
|
||||
@@ -43,7 +48,7 @@ $cartypes = TimerecordingCarModel::$carTypes;
|
||||
<h4 class="header-title mb-2"><?= ($timerecordingcars->id) ? "Fahrzeug bearbeiten" : "Neues Fahrzeug" ?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post"
|
||||
action="<?= self::getUrl("TimerecordingCar", "save", ["returnto" => $_GET["returnto"]]) ?>">
|
||||
action="<?= self::getUrl("TimerecordingCar", "save", ["returnto" => $_GET["returnto"], "hash" => $_GET['hash']]) ?>">
|
||||
<div class="card no-shadow">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
@@ -195,8 +200,8 @@ $cartypes = TimerecordingCarModel::$carTypes;
|
||||
</div>
|
||||
<div class="attachment-div mb-2">
|
||||
<?php foreach ($timerecordingcarDokuments as $timerecordingcarDokument):
|
||||
$filesize=$timerecordingcarDokument->file_size;
|
||||
if ($filesize<1024) {
|
||||
$filesize = $timerecordingcarDokument->file_size;
|
||||
if ($filesize < 1024) {
|
||||
$filesize = number_format($filesize, 2) . " B";
|
||||
} elseif ($filesize < 1024 * 1024) {
|
||||
$filesize = number_format($filesize / 1024, 2) . " KB";
|
||||
@@ -204,14 +209,15 @@ $cartypes = TimerecordingCarModel::$carTypes;
|
||||
$filesize = number_format($filesize / 1024 / 1024, 2) . " MB";
|
||||
}
|
||||
$uploadDate = date("d.m.y", $timerecordingcarDokument->file->create);
|
||||
$mimetype=$timerecordingcarDokument->file->mimetype;
|
||||
$mimetype = $timerecordingcarDokument->file->mimetype;
|
||||
if (!array_key_exists($mimetype, $mimetypes)) {
|
||||
$mimetype = "fa-file";
|
||||
} else
|
||||
$mimetype = $mimetypes[$mimetype];
|
||||
?>
|
||||
<div class="doc-main-div"
|
||||
data-name="<?= $timerecordingcarDokument->file->name ?>" data-id="<?= $timerecordingcarDokument->id?>">
|
||||
data-name="<?= $timerecordingcarDokument->file->name ?>"
|
||||
data-id="<?= $timerecordingcarDokument->id ?>">
|
||||
<div class="d-inline-block doc-icon-div"><i
|
||||
class="fa-duotone fa-solid <?= $mimetype ?>"></i>
|
||||
</div>
|
||||
@@ -225,7 +231,7 @@ $cartypes = TimerecordingCarModel::$carTypes;
|
||||
class="fas fa-trash fa-del-document ml-2"></i></span>
|
||||
<span class="float-right ml-1">(<?= $uploadDate ?>)</span>
|
||||
<span class="float-right"><?= $filesize ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
@@ -285,6 +291,7 @@ $cartypes = TimerecordingCarModel::$carTypes;
|
||||
let requestDocumentUrl = "<?= self::getUrl("File", "download") ?>";
|
||||
let requestDocumentUploadUrl = "<?= self::getUrl("TimerecordingCar", "api", ['do' => 'uploadDocuments']) ?>";
|
||||
let requestDocumentDeleteUrl = "<?= self::getUrl("TimerecordingCar", "api", ['do' => 'deleteDocument']) ?>";
|
||||
let requestRetireUrl = "<?= self::getUrl('TimerecordingCar', 'retire') ?>";
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="<?= self::getResourcePath() ?>plugins/tinymce/tinymce.min.js?<?= $git_merge_ts ?>"></script>
|
||||
|
||||
Reference in New Issue
Block a user