Allow to directly add build as stock to the associated builds part.

This commit is contained in:
Jan Böhmer 2023-01-22 23:27:45 +01:00
parent 015c71cbd2
commit 2f42eb7cff
7 changed files with 207 additions and 3 deletions

View file

@ -92,7 +92,9 @@ class ProjectController extends AbstractController
$form->handleRequest($request);
if ($form->isSubmitted()) {
if ($form->isValid()) {
$buildHelper->doWithdrawForProjectBuildRequest($projectBuildRequest);
//We have to do a flush already here, so that the newly created partLot gets an ID and can be logged to DB later.
$entityManager->flush();
$buildHelper->doBuild($projectBuildRequest);
$entityManager->flush();
$this->addFlash('success', 'project.build.flash.success');