mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-14 04:16:54 +01:00
* [MOD] Implemented in-line client/category creation from account view
* [FIX] Minor bugfixes
This commit is contained in:
@@ -27,7 +27,10 @@ namespace SP\Modules\Web\Controllers;
|
||||
use SP\Controller\RequestControllerTrait;
|
||||
use SP\Core\SessionUtil;
|
||||
use SP\DataModel\DataModelInterface;
|
||||
use SP\Mvc\View\Components\SelectItemAdapter;
|
||||
use SP\Services\Account\AccountService;
|
||||
use SP\Services\Category\CategoryService;
|
||||
use SP\Services\Client\ClientService;
|
||||
use SP\Util\Json;
|
||||
|
||||
/**
|
||||
@@ -74,6 +77,24 @@ class ItemsController
|
||||
Json::returnJson($this->JsonResponse);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \SP\Core\Dic\ContainerException
|
||||
* @throws \SP\Core\Exceptions\SPException
|
||||
*/
|
||||
public function clientsAction()
|
||||
{
|
||||
Json::returnRawJson((new SelectItemAdapter((new ClientService())->getAllForUser()))->getJsonItemsFromModel());
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \SP\Core\Dic\ContainerException
|
||||
* @throws \SP\Core\Exceptions\SPException
|
||||
*/
|
||||
public function categoriesAction()
|
||||
{
|
||||
Json::returnRawJson((new SelectItemAdapter((new CategoryService())->getAllBasic()))->getJsonItemsFromModel());
|
||||
}
|
||||
|
||||
/**
|
||||
* Preparar los elementos para devolverlos
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user