Release 2.0.10 (#3927)

* allow API calls via GET
* allow to stop timesheet via GET
* improve form handling and validation
* improve stop button handling
* bump version
This commit is contained in:
Kevin Papst
2023-03-15 23:02:28 +01:00
committed by GitHub
parent 1a8c78944a
commit f007697a73
15 changed files with 34 additions and 99 deletions

View File

@@ -9,6 +9,7 @@
namespace App\Form\Type;
use App\Entity\User;
use App\Model\QuickEntryModel;
use App\Validator\Constraints\QuickEntryTimesheet;
use DateTime;
@@ -129,8 +130,12 @@ final class QuickEntryWeekType extends AbstractType
return $transformValue;
}
$user = $transformValue->getUser();
if ($user === null && $options['user'] instanceof User) {
$user = $options['user'];
}
foreach ($transformValue->getTimesheets() as $timesheet) {
$timesheet->setUser($transformValue->getUser() ?? $options['user']);
$timesheet->setUser($user);
$timesheet->setProject($project);
$timesheet->setActivity($activity);
}