mirror of
https://github.com/Karaka-Management/oms-Profile.git
synced 2026-01-25 13:48:39 +00:00
fix billing process
This commit is contained in:
parent
2a7395010f
commit
ed9792da40
14
.github/user_bug_report.md
vendored
14
.github/user_bug_report.md
vendored
|
|
@ -8,9 +8,11 @@ assignees: ''
|
|||
---
|
||||
|
||||
# Bug Description
|
||||
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
# How to Reproduce
|
||||
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Go to '...'
|
||||
|
|
@ -19,16 +21,20 @@ Steps to reproduce the behavior:
|
|||
4. See error
|
||||
|
||||
# Expected Behavior
|
||||
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
# Screenshots
|
||||
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
# System Information
|
||||
- System: [e.g. PC or iPhone11, ...]
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- KarakaVersion [e.g. 22]
|
||||
|
||||
- System: [e.g. PC or iPhone11, ...]
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- KarakaVersion [e.g. 22]
|
||||
|
||||
# Additional Information
|
||||
|
||||
Add any other context about the problem here.
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ namespace Modules\Profile\Controller;
|
|||
use Modules\Admin\Models\AccountMapper;
|
||||
use Modules\Admin\Models\Address;
|
||||
use Modules\Admin\Models\AddressMapper;
|
||||
use Modules\Media\Models\NullMedia;
|
||||
use Modules\Media\Models\MediaMapper;
|
||||
use Modules\Media\Models\NullMedia;
|
||||
use Modules\Media\Models\PathSettings;
|
||||
use Modules\Profile\Models\ContactElement;
|
||||
use Modules\Profile\Models\ContactElementMapper;
|
||||
|
|
@ -271,10 +271,10 @@ final class ApiController extends Controller
|
|||
public function validateContactElementCreate(RequestAbstract $request) : array
|
||||
{
|
||||
$val = [];
|
||||
if (($val['account'] = (empty($request->getData('account')) && empty($request->getData('profile'))))
|
||||
if (($val['account'] = (!$request->hasData('account') && !$request->hasData('profile')))
|
||||
|| ($val['type'] = !\is_numeric($request->getData('type')))
|
||||
|| ($val['content'] = empty($request->getData('content')))
|
||||
|| ($val['contact'] = empty($request->getData('contact')))
|
||||
|| ($val['content'] = !$request->hasData('content'))
|
||||
|| ($val['contact'] = !$request->hasData('contact'))
|
||||
) {
|
||||
return $val;
|
||||
}
|
||||
|
|
@ -356,11 +356,11 @@ final class ApiController extends Controller
|
|||
private function validateAddressCreate(RequestAbstract $request) : array
|
||||
{
|
||||
$val = [];
|
||||
if (($val['account'] = (empty($request->getData('account')) && empty($request->getData('profile'))))
|
||||
if (($val['account'] = (!$request->hasData('account') && !$request->hasData('profile')))
|
||||
|| ($val['type'] = !\is_numeric($request->getData('type')))
|
||||
|| ($val['country'] = empty($request->getData('country')))
|
||||
|| ($val['city'] = empty($request->getData('city')))
|
||||
|| ($val['address'] = empty($request->getData('address')))
|
||||
|| ($val['country'] = !$request->hasData('country'))
|
||||
|| ($val['city'] = !$request->hasData('city'))
|
||||
|| ($val['address'] = !$request->hasData('address'))
|
||||
) {
|
||||
return $val;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
$permission = new AccountPermission();
|
||||
$permission->setUnit(1);
|
||||
$permission->setApp('backend');
|
||||
$permission->setApp(2);
|
||||
$permission->setPermission(
|
||||
PermissionType::READ
|
||||
| PermissionType::CREATE
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user