fix duplicating timesheet if allow overlapping is deactivated (#2732)

This commit is contained in:
Kevin Papst
2021-08-25 19:31:48 +02:00
committed by GitHub
parent 5023fa6189
commit fae525c82f
4 changed files with 7 additions and 6 deletions

View File

@@ -215,7 +215,7 @@ abstract class TimesheetAbstractController extends AbstractController
{
$copyTimesheet = clone $timesheet;
$form = $this->getDuplicateForm($timesheet);
$form = $this->getDuplicateForm($copyTimesheet, $timesheet);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
@@ -605,7 +605,7 @@ abstract class TimesheetAbstractController extends AbstractController
return $query;
}
abstract protected function getDuplicateForm(Timesheet $entry): FormInterface;
abstract protected function getDuplicateForm(Timesheet $entry, Timesheet $original): FormInterface;
abstract protected function getCreateForm(Timesheet $entry): FormInterface;
}