Implement that recipe ingredients can have arbitrary quantity units (references #32)

This commit is contained in:
Bernd Bestel
2018-08-09 17:24:04 +02:00
parent 3e73a44576
commit 71b9d11ff5
8 changed files with 119 additions and 18 deletions

View File

@@ -76,8 +76,9 @@ class RecipesController extends BaseController
{
return $this->AppContainer->view->render($response, 'recipeposform', [
'mode' => 'create',
'recipe' => $this->Database->recipes($args['recipeId']),
'products' => $this->Database->products()->orderBy('name')
'recipe' => $this->Database->recipes($args['recipeId']),
'products' => $this->Database->products()->orderBy('name'),
'quantityUnits' => $this->Database->quantity_units()->orderBy('name')
]);
}
else
@@ -85,8 +86,9 @@ class RecipesController extends BaseController
return $this->AppContainer->view->render($response, 'recipeposform', [
'mode' => 'edit',
'recipe' => $this->Database->recipes($args['recipeId']),
'recipePos' => $this->Database->recipes_pos($args['recipePosId']),
'products' => $this->Database->products()->orderBy('name')
'recipePos' => $this->Database->recipes_pos($args['recipePosId']),
'products' => $this->Database->products()->orderBy('name'),
'quantityUnits' => $this->Database->quantity_units()->orderBy('name')
]);
}
}