From 808551c04feda1ba16265e65dd1e61ab23bd621a Mon Sep 17 00:00:00 2001 From: Spitzer Daniel Date: Mon, 12 Feb 2024 10:55:03 +0100 Subject: [PATCH] Zeiterfassung update --- Layout/default/Timerecording/Index.php | 54 +++++++++++++------ .../default/TimerecordingCategories/Form.php | 9 ++++ .../default/TimerecordingCategories/Index.php | 17 +++--- .../TimerecordingCategoryController.php | 9 +++- .../TimerecordingCategoryModel.php | 3 ++ .../TimerecordingEmployeeController.php | 2 +- ...ording_category_add_field_businesstrip.php | 30 +++++++++++ ..._timerecording_add_fields_businesstrip.php | 33 ++++++++++++ public/js/pages/timerecording/index.js | 17 +++++- 9 files changed, 147 insertions(+), 27 deletions(-) create mode 100644 db/migrations/20240205130959_timerecording_category_add_field_businesstrip.php create mode 100644 db/migrations/20240206164915_timerecording_add_fields_businesstrip.php diff --git a/Layout/default/Timerecording/Index.php b/Layout/default/Timerecording/Index.php index a78cf1924..6c9501679 100644 --- a/Layout/default/Timerecording/Index.php +++ b/Layout/default/Timerecording/Index.php @@ -19,10 +19,10 @@ for ($i = 1; $i <= 25; $i++) { $year = date('Y', $time); $timestamp_montag = strtotime("{$year}-W{$kw}"); $timestamp_freitag = strtotime("{$year}-W{$kw}-5"); - $weeks[$time] = "KW" . $kw . " " . $year . " (" . date('d.m', $timestamp_montag) . "-" . date('d.m', $timestamp_freitag) . ")"; $time = $time - 604800; } + $time = time(); for ($i = 1; $i <= 12; $i++) { $mon = date('n', $time); @@ -34,9 +34,8 @@ for ($i = 1; $i <= 12; $i++) { $years[time() + 31536000] = date('Y', time() + 31536000); $years[time()] = date('Y', time()); $years[time() - 31536000] = date('Y', time() - 31536000); - - ?> +
@@ -122,7 +125,8 @@ $years[time() - 31536000] = date('Y', time() - 31536000); + data-hourday="hourday ?>" + data-businesstrip="businesstrip ?>">name ?> @@ -170,24 +174,44 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
-
+ + +
+ +
+ +
+ + +
+
+
+ +
+
+
+
+ + +
-
-
- - -
-
+
- @@ -229,7 +253,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
@@ -314,8 +338,6 @@ $years[time() - 31536000] = date('Y', time() - 31536000); let insertUrl = ""; let deleteUrl = ""; let requestUrl = " 'getTimerecordings']) ?>"; - - diff --git a/Layout/default/TimerecordingCategories/Form.php b/Layout/default/TimerecordingCategories/Form.php index 47c969c5b..8dfae15f3 100644 --- a/Layout/default/TimerecordingCategories/Form.php +++ b/Layout/default/TimerecordingCategories/Form.php @@ -80,6 +80,15 @@
+
+ +
+
+ businesstrip) echo 'checked="checked"'; ?> + type="checkbox" name="businesstrip" value="1"> +
+
+
diff --git a/Layout/default/TimerecordingCategories/Index.php b/Layout/default/TimerecordingCategories/Index.php index 5dd43f9d2..db42124fa 100644 --- a/Layout/default/TimerecordingCategories/Index.php +++ b/Layout/default/TimerecordingCategories/Index.php @@ -40,6 +40,7 @@ BMD KZ Buchungszeitraum Genehmigungspflichtig + Dienstreisemöglichkeit Anmerkung Pflichtfeld Nur Buchhaltung @@ -52,17 +53,19 @@ + - name ?> - short ?> - hourday] ?> - approval] ?> - require_comment] ?> - only_admin] ?> + name ?> + short ?> + hourday] ?> + approval] ?> + businesstrip] ?> + require_comment] ?> + only_admin] ?> $timerecordingcategories->id]) ?>"> @@ -83,7 +86,7 @@