mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 05:16: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
|
'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\SessionService;
|
||||||
use \Grocy\Services\RecipesService;
|
use \Grocy\Services\RecipesService;
|
||||||
use \Grocy\Services\TasksService;
|
use \Grocy\Services\TasksService;
|
||||||
|
use \Grocy\Services\FilesService;
|
||||||
|
use \Grocy\Services\ChoresService;
|
||||||
|
use \Grocy\Services\ApiKeyService;
|
||||||
|
|
||||||
class BaseController
|
class BaseController
|
||||||
{
|
{
|
||||||
|
|
@ -144,12 +147,25 @@ class BaseController
|
||||||
return UsersService::getInstance();
|
return UsersService::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
private $userfieldsService = null;
|
|
||||||
|
|
||||||
protected function getUserfieldsService()
|
protected function getUserfieldsService()
|
||||||
{
|
{
|
||||||
return UserfieldsService::getInstance();
|
return UserfieldsService::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getApiKeyService()
|
||||||
|
{
|
||||||
|
return ApiKeyService::getInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getChoresService()
|
||||||
|
{
|
||||||
|
return ChoresService::getInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getFilesService()
|
||||||
|
{
|
||||||
|
return FilesService::getInstance();
|
||||||
|
}
|
||||||
|
|
||||||
protected $AppContainer;
|
protected $AppContainer;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ class RecipesController extends BaseController
|
||||||
'recipe' => $this->getDatabase()->recipes($recipeId),
|
'recipe' => $this->getDatabase()->recipes($recipeId),
|
||||||
'recipePositions' => $this->getDatabase()->recipes_pos()->where('recipe_id', $recipeId),
|
'recipePositions' => $this->getDatabase()->recipes_pos()->where('recipe_id', $recipeId),
|
||||||
'mode' => 'edit',
|
'mode' => 'edit',
|
||||||
'products' => $this->getDatabase()->products()->orderBy('name'),,
|
'products' => $this->getDatabase()->products()->orderBy('name'),
|
||||||
'quantityunits' => $this->getDatabase()->quantity_units(),
|
'quantityunits' => $this->getDatabase()->quantity_units(),
|
||||||
'recipePositionsResolved' => $this->getRecipesService()->GetRecipesPosResolved(),
|
'recipePositionsResolved' => $this->getRecipesService()->GetRecipesPosResolved(),
|
||||||
'recipesResolved' => $this->getRecipesService()->GetRecipesResolved(),
|
'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)
|
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'),
|
'products' => $this->getDatabase()->products()->orderBy('name'),
|
||||||
'recipes' => $this->getDatabase()->recipes()->orderBy('name'),
|
'recipes' => $this->getDatabase()->recipes()->orderBy('name'),
|
||||||
'locations' => $this->getDatabase()->locations()->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,
|
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->includes_recipe_id)->name,
|
||||||
'start' => FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->recipe_id)->name,
|
'start' => FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->recipe_id)->name,
|
||||||
'date_format' => 'date',
|
'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