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