From 5840080ee3408de433bfab9e9bf9da4b8b986f6e Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 12 Oct 2019 15:29:54 +0200 Subject: [PATCH] fix bugs --- Admin/Install/db.json | 2 +- Controller/TimerecordingController.php | 53 ++++++++++++++++++++++++++ Models/Session.php | 2 + Models/SessionElement.php | 2 + Theme/Backend/Lang/en.lang.php | 32 +++++++++------- Theme/Backend/dashboard.tpl.php | 19 +++++++-- Theme/Timeterminal/overview.tpl.php | 0 info.json | 3 +- 8 files changed, 93 insertions(+), 20 deletions(-) create mode 100644 Controller/TimerecordingController.php create mode 100644 Theme/Timeterminal/overview.tpl.php diff --git a/Admin/Install/db.json b/Admin/Install/db.json index ad67b20..023babb 100644 --- a/Admin/Install/db.json +++ b/Admin/Install/db.json @@ -26,7 +26,7 @@ }, "hr_timerecording_session_busy": { "name": "hr_timerecording_session_busy", - "type": "DATETIME", + "type": "INT", "null": false }, "hr_timerecording_session_employee": { diff --git a/Controller/TimerecordingController.php b/Controller/TimerecordingController.php new file mode 100644 index 0000000..42ca1e2 --- /dev/null +++ b/Controller/TimerecordingController.php @@ -0,0 +1,53 @@ +app, $request, $response); + $view->setTemplate('/Modules/HumanResourceTimeRecording/Theme/Timeterminal/overview'); + $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1006301001, $request, $response)); + + return $view; + } +} diff --git a/Models/Session.php b/Models/Session.php index 445db01..ae31d1b 100644 --- a/Models/Session.php +++ b/Models/Session.php @@ -14,6 +14,8 @@ declare(strict_types=1); namespace Modules\HumanResourceTimeRecording\Models; +use phpOMS\Contract\ArrayableInterface; + /** * Session model * diff --git a/Models/SessionElement.php b/Models/SessionElement.php index c1ef09a..966a051 100644 --- a/Models/SessionElement.php +++ b/Models/SessionElement.php @@ -14,6 +14,8 @@ declare(strict_types=1); namespace Modules\HumanResourceTimeRecording\Models; +use phpOMS\Contract\ArrayableInterface; + /** * Session element model * diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 4513a06..65f5b63 100644 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -13,18 +13,22 @@ declare(strict_types=1); return ['HumanResourceTimeRecording' => [ - 'CS0' => 'Start', - 'CS1' => 'Pause', - 'CS2' => 'Continue', - 'CS3' => 'End', - 'CT0' => 'Office', - 'CT1' => 'Remote', - 'CT2' => 'Home', - 'CT3' => 'Vacation', - 'CT4' => 'Sick', - 'CT5' => 'On the move', - 'End' => 'End', - 'Start' => 'Start', - 'Status' => 'Status', - 'Type' => 'Type', + 'Break' => 'Break', + 'CS0' => 'Start', + 'CS1' => 'Pause', + 'CS2' => 'Continue', + 'CS3' => 'End', + 'CT0' => 'Office', + 'CT1' => 'Remote', + 'CT2' => 'Home', + 'CT3' => 'Vacation', + 'CT4' => 'Sick', + 'CT5' => 'On the move', + 'Date' => 'Date', + 'End' => 'End', + 'Recordings' => 'Recordings', + 'Start' => 'Start', + 'Status' => 'Status', + 'Total' => 'Total', + 'Type' => 'Type', ]]; diff --git a/Theme/Backend/dashboard.tpl.php b/Theme/Backend/dashboard.tpl.php index a6f198b..ec0a487 100644 --- a/Theme/Backend/dashboard.tpl.php +++ b/Theme/Backend/dashboard.tpl.php @@ -64,10 +64,21 @@ echo $this->getData('nav')->render(); ?>
-
-
-
-
+
+ + + + + + +
getHtml('Recordings') ?>
getHtml('Date'); ?> + getHtml('Start') ?> + getHtml('Break') ?> + getHtml('End') ?> + getHtml('Total') ?> +
+
+
diff --git a/Theme/Timeterminal/overview.tpl.php b/Theme/Timeterminal/overview.tpl.php new file mode 100644 index 0000000..e69de29 diff --git a/info.json b/info.json index c6acb59..649dc44 100644 --- a/info.json +++ b/info.json @@ -17,7 +17,8 @@ "description": "The administration module.", "directory": "HumanResourceTimeRecording", "dependencies": { - "Admin": "1.0.0" + "Admin": "1.0.0", + "HumanResourceManagement": "1.0.0" }, "providing": { "Navigation": "*",