mirror of
https://github.com/Karaka-Management/oms-Navigation.git
synced 2026-02-13 23:38:41 +00:00
fix billing process
This commit is contained in:
parent
dff2729866
commit
5e8dcb81fb
14
.github/user_bug_report.md
vendored
14
.github/user_bug_report.md
vendored
|
|
@ -8,9 +8,11 @@ assignees: ''
|
||||||
---
|
---
|
||||||
|
|
||||||
# Bug Description
|
# Bug Description
|
||||||
|
|
||||||
A clear and concise description of what the bug is.
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
# How to Reproduce
|
# How to Reproduce
|
||||||
|
|
||||||
Steps to reproduce the behavior:
|
Steps to reproduce the behavior:
|
||||||
|
|
||||||
1. Go to '...'
|
1. Go to '...'
|
||||||
|
|
@ -19,16 +21,20 @@ Steps to reproduce the behavior:
|
||||||
4. See error
|
4. See error
|
||||||
|
|
||||||
# Expected Behavior
|
# Expected Behavior
|
||||||
|
|
||||||
A clear and concise description of what you expected to happen.
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
# Screenshots
|
# Screenshots
|
||||||
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
# System Information
|
# System Information
|
||||||
- System: [e.g. PC or iPhone11, ...]
|
|
||||||
- OS: [e.g. iOS]
|
- System: [e.g. PC or iPhone11, ...]
|
||||||
- Browser [e.g. chrome, safari]
|
- OS: [e.g. iOS]
|
||||||
- KarakaVersion [e.g. 22]
|
- Browser [e.g. chrome, safari]
|
||||||
|
- KarakaVersion [e.g. 22]
|
||||||
|
|
||||||
# Additional Information
|
# Additional Information
|
||||||
|
|
||||||
Add any other context about the problem here.
|
Add any other context about the problem here.
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ final class ApiController extends Controller
|
||||||
private function validateNavElementCreate(RequestAbstract $request) : array
|
private function validateNavElementCreate(RequestAbstract $request) : array
|
||||||
{
|
{
|
||||||
$val = [];
|
$val = [];
|
||||||
if (($val['name'] = empty($request->getData('name')))) {
|
if (($val['name'] = !$request->hasData('name'))) {
|
||||||
return $val;
|
return $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ final class BackendController extends Controller
|
||||||
$this->app->accountManager->get($request->header->account),
|
$this->app->accountManager->get($request->header->account),
|
||||||
$this->app->dbPool,
|
$this->app->dbPool,
|
||||||
$this->app->unitId,
|
$this->app->unitId,
|
||||||
$this->app->appName
|
$this->app->appId
|
||||||
);
|
);
|
||||||
|
|
||||||
$navView = new NavigationView($this->app->l11nManager, $request, $response);
|
$navView = new NavigationView($this->app->l11nManager, $request, $response);
|
||||||
|
|
@ -84,7 +84,7 @@ final class BackendController extends Controller
|
||||||
$this->app->accountManager->get($request->header->account),
|
$this->app->accountManager->get($request->header->account),
|
||||||
$this->app->dbPool,
|
$this->app->dbPool,
|
||||||
$this->app->unitId,
|
$this->app->unitId,
|
||||||
$this->app->appName
|
$this->app->appId
|
||||||
);
|
);
|
||||||
|
|
||||||
$nav = new NavigationView($this->app->l11nManager, $request, $response);
|
$nav = new NavigationView($this->app->l11nManager, $request, $response);
|
||||||
|
|
@ -150,7 +150,7 @@ final class BackendController extends Controller
|
||||||
$this->app->accountManager->get($request->header->account),
|
$this->app->accountManager->get($request->header->account),
|
||||||
$this->app->dbPool,
|
$this->app->dbPool,
|
||||||
$this->app->unitId,
|
$this->app->unitId,
|
||||||
$this->app->appName
|
$this->app->appId
|
||||||
);
|
);
|
||||||
|
|
||||||
$navView = new NavigationView($this->app->l11nManager, $request, $response);
|
$navView = new NavigationView($this->app->l11nManager, $request, $response);
|
||||||
|
|
|
||||||
|
|
@ -62,14 +62,14 @@ class Navigation
|
||||||
* @param Account $account Account
|
* @param Account $account Account
|
||||||
* @param DatabasePool $dbPool Database pool
|
* @param DatabasePool $dbPool Database pool
|
||||||
* @param int $unit Unit
|
* @param int $unit Unit
|
||||||
* @param string $appName App name
|
* @param int $appId App id
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private function __construct(RequestAbstract $request, Account $account, DatabasePool $dbPool, int $unit, string $appName)
|
private function __construct(RequestAbstract $request, Account $account, DatabasePool $dbPool, int $unit, int $appId)
|
||||||
{
|
{
|
||||||
$this->dbPool = $dbPool;
|
$this->dbPool = $dbPool;
|
||||||
$this->load($request->getHash(), $account, $unit, $appName);
|
$this->load($request->getHash(), $account, $unit, $appId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -78,13 +78,13 @@ class Navigation
|
||||||
* @param string[] $hashes Request hashes
|
* @param string[] $hashes Request hashes
|
||||||
* @param Account $account Account
|
* @param Account $account Account
|
||||||
* @param int $unit Unit
|
* @param int $unit Unit
|
||||||
* @param string $app App name
|
* @param int $app App name
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private function load(array $hashes, Account $account, int $unit, string $app) : void
|
private function load(array $hashes, Account $account, int $unit, int $app) : void
|
||||||
{
|
{
|
||||||
if (empty($this->nav)) {
|
if (empty($this->nav)) {
|
||||||
$this->nav = [];
|
$this->nav = [];
|
||||||
|
|
@ -161,7 +161,7 @@ class Navigation
|
||||||
* @param Account $account Account
|
* @param Account $account Account
|
||||||
* @param DatabasePool $dbPool Database pool
|
* @param DatabasePool $dbPool Database pool
|
||||||
* @param int $unit Unit
|
* @param int $unit Unit
|
||||||
* @param string $appName App name
|
* @param int $appId App name
|
||||||
*
|
*
|
||||||
* @return \Modules\Navigation\Models\Navigation
|
* @return \Modules\Navigation\Models\Navigation
|
||||||
*
|
*
|
||||||
|
|
@ -169,14 +169,14 @@ class Navigation
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public static function getInstance(RequestAbstract $hashes = null, Account $account, DatabasePool $dbPool, int $unit, string $appName)
|
public static function getInstance(RequestAbstract $hashes = null, Account $account, DatabasePool $dbPool, int $unit, int $appId)
|
||||||
{
|
{
|
||||||
if (!isset(self::$instance)) {
|
if (!isset(self::$instance)) {
|
||||||
if (!isset($hashes)) {
|
if (!isset($hashes)) {
|
||||||
throw new \Exception('Invalid parameters');
|
throw new \Exception('Invalid parameters');
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$instance = new self($hashes, $account, $dbPool, $unit, $appName);
|
self::$instance = new self($hashes, $account, $dbPool, $unit, $appId);
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$instance;
|
return self::$instance;
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ final class SearchControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
$permission = new AccountPermission();
|
$permission = new AccountPermission();
|
||||||
$permission->setUnit(1);
|
$permission->setUnit(1);
|
||||||
$permission->setApp('backend');
|
$permission->setApp(2);
|
||||||
$permission->setPermission(
|
$permission->setPermission(
|
||||||
PermissionType::READ
|
PermissionType::READ
|
||||||
| PermissionType::CREATE
|
| PermissionType::CREATE
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user