go back to calendar after editing and creation of time-records (#519)

This commit is contained in:
Kevin Papst
2019-01-23 17:30:45 +01:00
committed by GitHub
parent ee32d6f926
commit 572f01ed74
9 changed files with 38 additions and 27 deletions

View File

@@ -79,14 +79,9 @@ class CalendarController extends AbstractController
->setUser($this->getUser())
->setState(TimesheetQuery::STATE_ALL)
->setResultType(TimesheetQuery::RESULT_TYPE_QUERYBUILDER)
->setEnd($end)
;
// running entries should only occur for the current month, but they won't
// be found if we add the end to the query
if ((new \DateTime())->getTimestamp() > $end->getTimestamp()) {
$query->setEnd($end);
}
$repository = $this->getDoctrine()->getRepository(Timesheet::class);
/* @var $entries Timesheet[] */