post release fixes (#584)
This commit is contained in:
@@ -37,5 +37,5 @@ class Constants
|
||||
/**
|
||||
* Used in multiple views
|
||||
*/
|
||||
public const HOMEPAGE = 'https://v2.kimai.org';
|
||||
public const HOMEPAGE = 'https://www.kimai.org';
|
||||
}
|
||||
|
||||
@@ -70,7 +70,6 @@ class InvoiceController extends AbstractController
|
||||
$query->setOrder(InvoiceQuery::ORDER_ASC);
|
||||
$query->setBegin($begin);
|
||||
$query->setEnd($end);
|
||||
$query->setUser($this->getUser());
|
||||
$query->setState(InvoiceQuery::STATE_STOPPED);
|
||||
|
||||
return $query;
|
||||
|
||||
@@ -120,7 +120,7 @@ class TimesheetEditForm extends AbstractType
|
||||
]);
|
||||
} else {
|
||||
$builder->add('end', DateTimePickerType::class, [
|
||||
'label' => 'label.begin',
|
||||
'label' => 'label.end',
|
||||
'model_timezone' => $timezone,
|
||||
'view_timezone' => $timezone,
|
||||
'required' => false,
|
||||
|
||||
@@ -119,8 +119,17 @@ class TimesheetVoter extends AbstractVoter
|
||||
*/
|
||||
protected function canStart(Timesheet $timesheet, User $user, TokenInterface $token)
|
||||
{
|
||||
// we could check the amount of active entries
|
||||
// if a teamlead starts an entry for another user, check that this user is part of his team
|
||||
// possible improvements for the future:
|
||||
// we could check the amount of active entries (maybe slow)
|
||||
// if a teamlead starts an entry for another user, check that this user is part of his team (needs to be done for teams)
|
||||
|
||||
if (null === $timesheet->getActivity()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (null === $timesheet->getProject()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$timesheet->getActivity()->getVisible() || !$timesheet->getProject()->getVisible()) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user