Correction de quelques bogues dans Recettes (backOffice)

This commit is contained in:
2021-05-17 22:25:27 +02:00
parent eb07edcf38
commit 75b8950fe0
8 changed files with 68 additions and 40 deletions

View File

@@ -165,11 +165,10 @@ class BackController extends BaseAdminController
}
public function addProduct($contentId)
public function addProduct($contentId, $recipeId)
{
$pseId = (int) $this->getRequest()->get('pse_id');
$quantityNeeded = (string) $this->getRequest()->get('quantity_needed');
$recipeId = (int) $this->getRequest()->get('recipe_id');
$quantityProposed = (int) $this->getRequest()->get('quantity_proposed');
(new RecipeProducts())
@@ -179,7 +178,7 @@ class BackController extends BaseAdminController
->setNbOfProducts($quantityProposed)
->save();
return $this->render('includes/related-products', [ 'content_id' => $contentId ]);
return $this->render('includes/related-products', [ 'recipe_id' => $recipeId, 'content_id' => $contentId ]);
}