diff --git a/Admin/Routes/Web/Timerecording.php b/Admin/Routes/Web/Timerecording.php
index ae44f6a..16ac398 100644
--- a/Admin/Routes/Web/Timerecording.php
+++ b/Admin/Routes/Web/Timerecording.php
@@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb;
return [
- '^.*?$' => [
+ '^/timerecording$' => [
[
'dest' => '\Modules\HumanResourceTimeRecording\Controller\TimerecordingController:viewDashboard',
'verb' => RouteVerb::GET,
diff --git a/Controller/TimerecordingController.php b/Controller/TimerecordingController.php
index 42ca1e2..9b3ac0e 100644
--- a/Controller/TimerecordingController.php
+++ b/Controller/TimerecordingController.php
@@ -18,6 +18,7 @@ use phpOMS\Contract\RenderableInterface;
use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract;
use phpOMS\Views\View;
+use Modules\HumanResourceTimeRecording\Models\SessionMapper;
/**
* TimeRecording controller class.
@@ -48,6 +49,9 @@ final class TimerecordingController extends Controller
$view->setTemplate('/Modules/HumanResourceTimeRecording/Theme/Timeterminal/overview');
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1006301001, $request, $response));
+ $list = SessionMapper::getNewest(50);
+ $view->addData('sessions', $list);
+
return $view;
}
}
diff --git a/Theme/Backend/dashboard.tpl.php b/Theme/Backend/dashboard.tpl.php
index 84b4214..6239a34 100644
--- a/Theme/Backend/dashboard.tpl.php
+++ b/Theme/Backend/dashboard.tpl.php
@@ -41,7 +41,9 @@ echo $this->getData('nav')->render(); ?>
| = $session->getStart()->format('Y-m-d'); ?>
| Status Here
- | = $session->getEmployee()->getProfile()->getAccount()->getName1(); ?>, = $session->getEmployee()->getProfile()->getAccount()->getName2(); ?>
+ |
+ = $this->printHtml($session->getEmployee()->getProfile()->getAccount()->getName1()); ?>,
+ = $this->printHtml($session->getEmployee()->getProfile()->getAccount()->getName2()); ?>
| = $session->getStart()->format('H:i:s'); ?>
| = (int) ($session->getBreak() / 3600); ?>h = ((int) ($session->getBreak() / 60) % 60); ?>m
| = $session->getEnd() !== null ? $session->getEnd()->format('H:i') : ''; ?>
diff --git a/Theme/Timeterminal/Lang/en.lang.php b/Theme/Timeterminal/Lang/en.lang.php
index e69de29..fb00b86 100644
--- a/Theme/Timeterminal/Lang/en.lang.php
+++ b/Theme/Timeterminal/Lang/en.lang.php
@@ -0,0 +1,41 @@
+ [
+ 'Break' => 'Break',
+ 'CS0' => 'Start',
+ 'CS1' => 'Pause',
+ 'CS2' => 'Continue',
+ 'CS3' => 'End',
+ 'CT0' => 'Office',
+ 'CT1' => 'Remote',
+ 'CT2' => 'Home',
+ 'CT3' => 'Vacation',
+ 'CT4' => 'Sick',
+ 'CT5' => 'On the move',
+ 'D0' => 'Sunday',
+ 'D1' => 'Monday',
+ 'D2' => 'Tuesday',
+ 'D3' => 'Wednesday',
+ 'D4' => 'Thursday',
+ 'D5' => 'Friday',
+ 'D6' => 'Saturday',
+ 'Date' => 'Date',
+ 'End' => 'End',
+ 'Recordings' => 'Recordings',
+ 'Start' => 'Start',
+ 'Status' => 'Status',
+ 'Total' => 'Total',
+ 'Type' => 'Type',
+]];
diff --git a/Theme/Timeterminal/overview.tpl.php b/Theme/Timeterminal/overview.tpl.php
index e69de29..29f81ab 100644
--- a/Theme/Timeterminal/overview.tpl.php
+++ b/Theme/Timeterminal/overview.tpl.php
@@ -0,0 +1,110 @@
+getData('sessions');
+
+echo $this->getData('nav')->render(); ?>
+
+
+
+
+
+
+
+
+
+ | This month |
+ | | Last month |
+ | | This year |
+ |
+
+
+
+
+
+
+
+
+
+ | Used Vacation |
+ | | Last Vacation |
+ | | Next Vacation |
+ |
+
+
+
+
+
+
+
+
+
+ = $this->getHtml('Recordings') ?>
+
+
+ | = $this->getHtml('Date'); ?>
+ | Status
+ | = $this->getHtml('Start') ?>
+ | = $this->getHtml('Break') ?>
+ | = $this->getHtml('End') ?>
+ | = $this->getHtml('Total') ?>
+ |
+ |
+ |
+
+
+ | = $session->getStart()->format('Y-m-d'); ?> - = $this->getHtml('D' . $session->getStart()->format('w')); ?>
+ | Status Here
+ | = $session->getStart()->format('H:i'); ?>
+ | = (int) ($session->getBreak() / 3600); ?>h = ((int) ($session->getBreak() / 60) % 60); ?>m
+ | = $session->getEnd() !== null ? $session->getEnd()->format('H:i') : ''; ?>
+ | = (int) ($session->getBusy() / 3600); ?>h = ((int) ($session->getBusy() / 60) % 60); ?>m
+
+ |
+
+
+
|