diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index de0284e..cfeb663 100644 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -56,7 +56,7 @@ "icon": null, "order": 1, "from": "HumanResourceTimeRecording", - "permission": { "permission": 2, "type": null, "element": null }, + "permission": { "permission": 2, "type": 2, "element": null }, "parent": 1003401001, "children": [] } diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 807f202..02fd366 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -80,6 +80,7 @@ final class BackendController extends Controller $lastOpenSession = SessionMapper::getMostPlausibleOpenSessionForEmployee($employee); $start = new SmartDateTime('now'); + $start = $start->getEndOfDay(); $limit = $start->getEndOfMonth(); $limit->smartModify(0, -2, 0); diff --git a/Models/SessionMapper.php b/Models/SessionMapper.php index 63983d7..9a8c33e 100644 --- a/Models/SessionMapper.php +++ b/Models/SessionMapper.php @@ -181,7 +181,7 @@ final class SessionMapper extends DataMapperAbstract $query = new Builder(self::$db); $query = self::getQuery($query) ->where(self::$table . '.hr_timerecording_session_employee', '=', $employee) - ->andWhere(self::$table . '.' . self::$createdAt, '<=', $start->format('Y-m-d')) + ->andWhere(self::$table . '.' . self::$createdAt, '<=', $start->format('Y-m-d H:i:s')) ->orderBy(self::$table . '.' . self::$createdAt, 'DESC') ->offset($offset) ->limit($limit); diff --git a/Theme/Backend/private-dashboard.tpl.php b/Theme/Backend/private-dashboard.tpl.php index c3fd024..4ddea96 100644 --- a/Theme/Backend/private-dashboard.tpl.php +++ b/Theme/Backend/private-dashboard.tpl.php @@ -80,7 +80,13 @@ show additional section with vacation days