feat: apply season task deadlines to all open checklist entries
This commit is contained in:
1 parent
3fe510e64e
commit
300bb2058f
5 files changed
+81
-1
No files matched your search
@@ -46,6 +46,9 @@ class TaskDeadlineController extends AbstractController
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$applyToAll = true === $form->get('applyToAll')->getData();
|
||||
$appliedCount = $applyToAll ? ($seasonAssignment?->applyDeadlinesToOpenTasks($task) ?? 0) : 0;
|
||||
|
||||
$this->entityManager->flush();
|
||||
|
||||
$this->logger->info('Change season assignment task deadlines', [
|
||||
@@ -54,9 +57,13 @@ class TaskDeadlineController extends AbstractController
|
||||
'task' => $task->getTaskKey(),
|
||||
'deadline_override_1' => $task->getDeadlineOverride1()?->format('Y-m-d'),
|
||||
'deadline_override_2' => $task->getDeadlineOverride2()?->format('Y-m-d'),
|
||||
'apply_to_all' => $applyToAll,
|
||||
'applied_count' => $appliedCount,
|
||||
]);
|
||||
|
||||
$this->addFlash('success', 'Die Fristen wurden gespeichert');
|
||||
$this->addFlash('success', $applyToAll
|
||||
? 'Die Fristen wurden für alle offenen Einträge gespeichert'
|
||||
: 'Die Fristen wurden gespeichert');
|
||||
|
||||
return new HxRedirectResponse($returnUrl);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user