post release fixes (#584)

This commit is contained in:
Kevin Papst
2019-02-22 17:20:41 +01:00
committed by GitHub
parent fd4a87e3a6
commit 239be527b8
7 changed files with 16 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2017-2018 Kevin Papst
Copyright (c) 2017-2019 Kevin Papst @ https://www.kevinpapst.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -37,5 +37,5 @@ class Constants
/**
* Used in multiple views
*/
public const HOMEPAGE = 'https://v2.kimai.org';
public const HOMEPAGE = 'https://www.kimai.org';
}

View File

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

View File

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

View File

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

View File

@@ -60,7 +60,7 @@
{% endif %}
<tr>
<td>{{ entry.begin|date_short }}</td>
<td class="hidden-xs hidden-sm">{{ widgets.username(entry.user) }}</td>
<td class="hidden-xs hidden-sm">{{ widgets.label_user(entry.user) }}</td>
<td class="hidden-xs hidden-sm timesheet-description">
{% if entry.description is not empty %}
{{ entry.description|desc2html }}

View File

@@ -131,7 +131,7 @@
{# colors = purple, blue, aqua, red, green #}
<li><a href="#">{{ 'label.id'|trans }} <span class="pull-right badge bg-aqua">{{ user.id }}</span></a></li>
<li><a href="#">{{ 'label.username'|trans }} <span class="pull-right badge bg-blue">{{ user.username }}</span></a></li>
<li><a href="#">{{ 'profile.first_entry'|trans }} <span class="pull-right badge bg-purple">{{ stats.firstEntry|date }}</span></a></li>
<li><a href="#">{{ 'profile.first_entry'|trans }} <span class="pull-right badge bg-purple">{{ stats.firstEntry|date_short }}</span></a></li>
{% if is_granted('view_rate_own_timesheet') %}
<li><a href="#">{{ 'label.hourly_rate'|trans }} <span class="pull-right badge bg-blue">{{ user.preferenceValue('hourly_rate') }}</span></a></li>
{% endif %}