mirror of
https://github.com/Karaka-Management/oms-QA.git
synced 2026-02-15 23:38:41 +00:00
fix billing process
This commit is contained in:
parent
0c0b5cb10d
commit
f73b35f372
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.
|
||||||
|
|
|
||||||
|
|
@ -153,18 +153,14 @@ final class Application
|
||||||
|
|
||||||
if (!($account instanceof NullAccount)) {
|
if (!($account instanceof NullAccount)) {
|
||||||
$response->header->l11n = $account->l11n;
|
$response->header->l11n = $account->l11n;
|
||||||
} elseif ($this->app->sessionManager->get('language') !== null) {
|
} elseif ($this->app->sessionManager->get('language') !== null
|
||||||
|
&& $response->header->l11n->getLanguage() !== $this->app->sessionManager->get('language')
|
||||||
|
) {
|
||||||
$response->header->l11n
|
$response->header->l11n
|
||||||
->loadFromLanguage(
|
->loadFromLanguage(
|
||||||
$this->app->sessionManager->get('language'),
|
$this->app->sessionManager->get('language'),
|
||||||
$this->app->sessionManager->get('country') ?? '*'
|
$this->app->sessionManager->get('country') ?? '*'
|
||||||
);
|
);
|
||||||
} elseif ($this->app->cookieJar->get('language') !== null) {
|
|
||||||
$response->header->l11n
|
|
||||||
->loadFromLanguage(
|
|
||||||
$this->app->cookieJar->get('language'),
|
|
||||||
$this->app->cookieJar->get('country') ?? '*'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!\in_array($response->getLanguage(), $this->config['language'])) {
|
if (!\in_array($response->getLanguage(), $this->config['language'])) {
|
||||||
|
|
@ -212,7 +208,7 @@ final class Application
|
||||||
$request->uri->getRoute(),
|
$request->uri->getRoute(),
|
||||||
$request->getDataString('CSRF'),
|
$request->getDataString('CSRF'),
|
||||||
$request->getRouteVerb(),
|
$request->getRouteVerb(),
|
||||||
$this->app->appName,
|
$this->app->appId,
|
||||||
$this->app->unitId,
|
$this->app->unitId,
|
||||||
$account,
|
$account,
|
||||||
$request->getData()
|
$request->getData()
|
||||||
|
|
|
||||||
|
|
@ -210,9 +210,9 @@ final class ApiController extends Controller
|
||||||
private function validateQAQuestionCreate(RequestAbstract $request) : array
|
private function validateQAQuestionCreate(RequestAbstract $request) : array
|
||||||
{
|
{
|
||||||
$val = [];
|
$val = [];
|
||||||
if (($val['title'] = empty($request->getData('title')))
|
if (($val['title'] = !$request->hasData('title'))
|
||||||
|| ($val['plain'] = empty($request->getData('plain')))
|
|| ($val['plain'] = !$request->hasData('plain'))
|
||||||
|| ($val['language'] = empty($request->getData('language')))
|
|| ($val['language'] = !$request->hasData('language'))
|
||||||
|| ($val['status'] = (
|
|| ($val['status'] = (
|
||||||
$request->hasData('status')
|
$request->hasData('status')
|
||||||
&& !QAQuestionStatus::isValidValue((int) $request->getData('status'))
|
&& !QAQuestionStatus::isValidValue((int) $request->getData('status'))
|
||||||
|
|
@ -308,8 +308,8 @@ final class ApiController extends Controller
|
||||||
private function validateQAAnswerCreate(RequestAbstract $request) : array
|
private function validateQAAnswerCreate(RequestAbstract $request) : array
|
||||||
{
|
{
|
||||||
$val = [];
|
$val = [];
|
||||||
if (($val['plain'] = empty($request->getData('plain')))
|
if (($val['plain'] = !$request->hasData('plain'))
|
||||||
|| ($val['question'] = empty($request->getData('question')))
|
|| ($val['question'] = !$request->hasData('question'))
|
||||||
|| ($val['status'] = (
|
|| ($val['status'] = (
|
||||||
$request->hasData('status')
|
$request->hasData('status')
|
||||||
&& !QAAnswerStatus::isValidValue((int) $request->getData('status'))
|
&& !QAAnswerStatus::isValidValue((int) $request->getData('status'))
|
||||||
|
|
@ -437,7 +437,7 @@ final class ApiController extends Controller
|
||||||
private function validateQAAppCreate(RequestAbstract $request) : array
|
private function validateQAAppCreate(RequestAbstract $request) : array
|
||||||
{
|
{
|
||||||
$val = [];
|
$val = [];
|
||||||
if (($val['name'] = empty($request->getData('name')))) {
|
if (($val['name'] = !$request->hasData('name'))) {
|
||||||
return $val;
|
return $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ final class ApiControllerTest 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