Merge branch 'master' into discount-per-item
This commit is contained in:
commit
aa4532e9d5
@ -27,12 +27,16 @@ class Module extends FormRequest
|
||||
|
||||
$module = module($this->request->get('module_alias'));
|
||||
|
||||
if ($module->get('settings')) {
|
||||
foreach ($module->get('settings') as $field) {
|
||||
if (isset($field['attributes']['required'])) {
|
||||
$rules[$field['name']] = $field['attributes']['required'];
|
||||
}
|
||||
if (!$fields = $module->get('settings')) {
|
||||
return $rules;
|
||||
}
|
||||
|
||||
foreach ($fields as $field) {
|
||||
if (empty($field['rules'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$rules[$field['name']] = $field['rules'];
|
||||
}
|
||||
|
||||
return $rules;
|
||||
|
@ -32,7 +32,7 @@ class Transfer extends Model
|
||||
|
||||
public function expense_account()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Banking\Account', 'expense_transaction.account_id', 'id');
|
||||
return $this->belongsTo('App\Models\Banking\Account', 'expense_transaction.account_id', 'id')->withDefault(['name' => trans('general.na')]);
|
||||
}
|
||||
|
||||
public function income_transaction()
|
||||
@ -42,6 +42,6 @@ class Transfer extends Model
|
||||
|
||||
public function income_account()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Banking\Account', 'income_transaction.account_id', 'id');
|
||||
return $this->belongsTo('App\Models\Banking\Account', 'income_transaction.account_id', 'id')->withDefault(['name' => trans('general.na')]);
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
"bkwld/cloner": "3.6.*",
|
||||
"consoletvs/charts": "6.5.*",
|
||||
"doctrine/dbal": "2.9.*",
|
||||
"dingo/api": "3.0.0-rc3",
|
||||
"dingo/api": "3.0.*",
|
||||
"fideloper/proxy": "^4.2",
|
||||
"fruitcake/laravel-cors": "^1.0",
|
||||
"genealabs/laravel-model-caching": "0.8.*",
|
||||
|
@ -30,4 +30,8 @@ return [
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
'sendgrid' => [
|
||||
'api_key' => env('SENDGRID_API_KEY'),
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -20,7 +20,8 @@
|
||||
"icon": "fa fa-font",
|
||||
"attributes": {
|
||||
"required": "required"
|
||||
}
|
||||
},
|
||||
"rules": "required|string"
|
||||
},
|
||||
{
|
||||
"type": "textGroup",
|
||||
@ -29,7 +30,8 @@
|
||||
"icon": "envelope",
|
||||
"attributes": {
|
||||
"required": "required"
|
||||
}
|
||||
},
|
||||
"rules": "required|email"
|
||||
},
|
||||
{
|
||||
"type": "selectGroup",
|
||||
@ -40,8 +42,11 @@
|
||||
"live": "Live",
|
||||
"sandbox": "Sandbox"
|
||||
},
|
||||
"selected": null,
|
||||
"attributes": {}
|
||||
"selected": "live",
|
||||
"attributes": {
|
||||
"required": "required"
|
||||
},
|
||||
"rules": "required|string"
|
||||
},
|
||||
{
|
||||
"type": "selectGroup",
|
||||
@ -52,8 +57,11 @@
|
||||
"authorization": "Authorization",
|
||||
"sale": "Sale"
|
||||
},
|
||||
"selected": null,
|
||||
"attributes": {}
|
||||
"selected": "sale",
|
||||
"attributes": {
|
||||
"required": "required"
|
||||
},
|
||||
"rules": "required|string"
|
||||
},
|
||||
{
|
||||
"type": "radioGroup",
|
||||
@ -61,7 +69,8 @@
|
||||
"title": "paypal-standard::general.form.customer",
|
||||
"enable": "general.yes",
|
||||
"disable": "general.no",
|
||||
"attributes": {}
|
||||
"attributes": {},
|
||||
"rules": "required|integer"
|
||||
},
|
||||
{
|
||||
"type": "radioGroup",
|
||||
@ -69,14 +78,16 @@
|
||||
"title": "paypal-standard::general.form.debug",
|
||||
"enable": "general.yes",
|
||||
"disable": "general.no",
|
||||
"attributes": {}
|
||||
"attributes": {},
|
||||
"rules": "required|integer"
|
||||
},
|
||||
{
|
||||
"type": "textGroup",
|
||||
"name": "order",
|
||||
"title": "paypal-standard::general.form.order",
|
||||
"icon": "sort",
|
||||
"attributes": {}
|
||||
"attributes": {},
|
||||
"rules": "nullable|integer"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -745,6 +745,10 @@ export default {
|
||||
},
|
||||
|
||||
real_model: function (value) {
|
||||
if (this.multiple) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.change();
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user