add todos from github

This commit is contained in:
Dennis Eichhorn 2019-12-31 19:54:45 +01:00
parent f5497970f3
commit 893259c22b
3 changed files with 6 additions and 14 deletions

View File

@ -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
{

View File

@ -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
*/

View File

@ -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();