mirror of
https://github.com/Karaka-Management/oms-HumanResourceTimeRecording.git
synced 2026-01-27 11:08:42 +00:00
add todos from github
This commit is contained in:
parent
f5497970f3
commit
893259c22b
|
|
@ -14,6 +14,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\HumanResourceTimeRecording\Controller;
|
||||
|
||||
use Modules\Dashboard\Models\DashboardElementInterface;
|
||||
use Modules\HumanResourceTimeRecording\Models\SessionMapper;
|
||||
|
||||
use phpOMS\Contract\RenderableInterface;
|
||||
|
|
@ -32,19 +33,10 @@ use phpOMS\Views\PaginationView;
|
|||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
*/
|
||||
final class BackendController extends Controller
|
||||
final class BackendController extends Controller implements DashboardElementInterface
|
||||
{
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param mixed $data Generic data
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function viewDashboard(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||
{
|
||||
|
|
|
|||
|
|
@ -102,8 +102,9 @@ final class SessionMapper extends DataMapperAbstract
|
|||
*
|
||||
* @return Session[]
|
||||
*
|
||||
* @todo: consider selecting only active employees
|
||||
* @todo: consider using a datetime to limit the results to look for
|
||||
* @todo Orange-Management/Modules#189
|
||||
* Currently the last work session of all employees is returned. This should be optionally reduced to only return active employees.
|
||||
* Alternatively it might make sense to limit the last session by an oldest date.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ $lastOpenSession = $this->getData('lastSession');
|
|||
$type = $lastOpenSession !== null ? $lastOpenSession->getType() : ClockingType::OFFICE;
|
||||
$status = $lastOpenSession !== null ? $lastOpenSession->getStatus() : ClockingStatus::END;
|
||||
|
||||
// @todo: users may have a different definition of week start!
|
||||
/** @var \phpOMS\Stdlib\Base\SmartDateTime $startWeek */
|
||||
$startWeek = new SmartDateTime('now');
|
||||
$startWeek = $startWeek->getStartOfWeek();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user