mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 20:36:15 +02:00
bug fixes following merge
This commit is contained in:
parent
40631ff60d
commit
5402319a2c
|
|
@ -38,19 +38,4 @@ class BaseApiController extends BaseController
|
|||
'error_message' => $errorMessage
|
||||
));
|
||||
}
|
||||
|
||||
protected function getApiKeyService()
|
||||
{
|
||||
return ApiKeyService::getInstance();
|
||||
}
|
||||
|
||||
protected function getChoresService()
|
||||
{
|
||||
return ChoresService::getInstance();
|
||||
}
|
||||
|
||||
protected function getFilesService()
|
||||
{
|
||||
return FilesService::getInstance();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ use \Grocy\Services\CalendarService;
|
|||
use \Grocy\Services\SessionService;
|
||||
use \Grocy\Services\RecipesService;
|
||||
use \Grocy\Services\TasksService;
|
||||
use \Grocy\Services\FilesService;
|
||||
use \Grocy\Services\ChoresService;
|
||||
use \Grocy\Services\ApiKeyService;
|
||||
|
||||
class BaseController
|
||||
{
|
||||
|
|
@ -144,12 +147,25 @@ class BaseController
|
|||
return UsersService::getInstance();
|
||||
}
|
||||
|
||||
private $userfieldsService = null;
|
||||
|
||||
protected function getUserfieldsService()
|
||||
{
|
||||
return UserfieldsService::getInstance();
|
||||
}
|
||||
|
||||
protected function getApiKeyService()
|
||||
{
|
||||
return ApiKeyService::getInstance();
|
||||
}
|
||||
|
||||
protected function getChoresService()
|
||||
{
|
||||
return ChoresService::getInstance();
|
||||
}
|
||||
|
||||
protected function getFilesService()
|
||||
{
|
||||
return FilesService::getInstance();
|
||||
}
|
||||
|
||||
protected $AppContainer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class RecipesController extends BaseController
|
|||
'recipe' => $this->getDatabase()->recipes($recipeId),
|
||||
'recipePositions' => $this->getDatabase()->recipes_pos()->where('recipe_id', $recipeId),
|
||||
'mode' => 'edit',
|
||||
'products' => $this->getDatabase()->products()->orderBy('name'),,
|
||||
'products' => $this->getDatabase()->products()->orderBy('name'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units(),
|
||||
'recipePositionsResolved' => $this->getRecipesService()->GetRecipesPosResolved(),
|
||||
'recipesResolved' => $this->getRecipesService()->GetRecipesResolved(),
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class StockController extends BaseController
|
|||
|
||||
public function Transfer(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
{
|
||||
return $this->View->render($response, 'transfer', [
|
||||
return $this->renderPage($response, 'transfer', [
|
||||
'products' => $this->getDatabase()->products()->orderBy('name'),
|
||||
'recipes' => $this->getDatabase()->recipes()->orderBy('name'),
|
||||
'locations' => $this->getDatabase()->locations()->orderBy('name')
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class CalendarService extends BaseService
|
|||
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->includes_recipe_id)->name,
|
||||
'start' => FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->recipe_id)->name,
|
||||
'date_format' => 'date',
|
||||
'description' => $this->getUrlManager()->ConstructUrl('/mealplan' . '?week=' . FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->recipe_id)->name)
|
||||
'description' => $this->UrlManager()->ConstructUrl('/mealplan' . '?week=' . FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->recipe_id)->name)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user