diff --git a/app/Jobs/Common/CreateContact.php b/app/Jobs/Common/CreateContact.php index bad83ef9a..452756c5e 100644 --- a/app/Jobs/Common/CreateContact.php +++ b/app/Jobs/Common/CreateContact.php @@ -43,13 +43,13 @@ class CreateContact extends Job implements HasOwner, HasSource, ShouldCreate throw new \Exception($message); } - $customer_role = Role::all()->filter(function ($role) { + $customer_role_id = Role::all()->filter(function ($role) { return $role->hasPermission('read-client-portal'); - })->pluck('id')->toArray(); + })->pluck('id')->first(); $this->request->merge([ 'locale' => setting('default.locale', 'en-GB'), - 'roles' => $customer_role, + 'roles' => $customer_role_id, 'companies' => [$this->request->get('company_id')], ]); diff --git a/app/Jobs/Common/UpdateContact.php b/app/Jobs/Common/UpdateContact.php index cad42419c..9c23466fa 100644 --- a/app/Jobs/Common/UpdateContact.php +++ b/app/Jobs/Common/UpdateContact.php @@ -57,13 +57,13 @@ class UpdateContact extends Job implements ShouldUpdate throw new \Exception($message); } - $customer_role = Role::all()->filter(function ($role) { + $customer_role_id = Role::all()->filter(function ($role) { return $role->hasPermission('read-client-portal'); - })->pluck('id')->toArray(); + })->pluck('id')->first(); $this->request->merge([ 'locale' => setting('default.locale', 'en-GB'), - 'roles' => $customer_role, + 'roles' => $customer_role_id, 'companies' => [$this->request->get('company_id')], ]); diff --git a/app/View/Components/Index/Country.php b/app/View/Components/Index/Country.php index dcbf5c390..373f559a6 100644 --- a/app/View/Components/Index/Country.php +++ b/app/View/Components/Index/Country.php @@ -27,6 +27,7 @@ class Country extends Component */ public function __construct($code) { $this->code = $code; + $this->country = trans('general.na'); } /** @@ -36,7 +37,9 @@ class Country extends Component */ public function render() { - $this->country = trans('countries.' . $this->code); + if (! empty($this->code)) { + $this->country = trans('countries.' . $this->code); + } return view('components.index.country'); } diff --git a/public/img/errors/500.png b/public/img/errors/500.png index 9de37ea84..8e0ebd7b5 100644 Binary files a/public/img/errors/500.png and b/public/img/errors/500.png differ diff --git a/resources/assets/js/views/wizard/Company.vue b/resources/assets/js/views/wizard/Company.vue index 3deb3e984..fa5b6397c 100644 --- a/resources/assets/js/views/wizard/Company.vue +++ b/resources/assets/js/views/wizard/Company.vue @@ -72,17 +72,18 @@
{{ translations.company.skip }} - {{ translations.company.save }} - +
@@ -254,7 +255,9 @@ export default { } }, - onEditSave() { + onEditSave(event) { + event.preventDefault(); + FormData.prototype.appendRecursive = function (data, wrapper = null) { for (var name in data) { if (name == "previewElement" || name == "previewTemplate") { diff --git a/resources/assets/js/views/wizard/Currencies.vue b/resources/assets/js/views/wizard/Currencies.vue index 6c909b892..5d740af12 100644 --- a/resources/assets/js/views/wizard/Currencies.vue +++ b/resources/assets/js/views/wizard/Currencies.vue @@ -91,16 +91,17 @@ {{ translations.currencies.cancel }} - {{ translations.currencies.save }} - + @@ -159,12 +160,12 @@ {{ translations.currencies.cancel }} - + @@ -293,7 +294,9 @@ export default { }, this); }, - onEditForm(item) { + onEditForm(item, event) { + event.preventDefault(); + this.onSubmitEvent( "PATCH", url + "/wizard/currencies/" + item.id, @@ -303,7 +306,9 @@ export default { ); }, - onSubmitForm() { + onSubmitForm(event) { + event.preventDefault(); + this.onSubmitEvent( "POST", url + "/wizard/currencies", diff --git a/resources/assets/js/views/wizard/Taxes.vue b/resources/assets/js/views/wizard/Taxes.vue index b7eee2dce..a29183453 100644 --- a/resources/assets/js/views/wizard/Taxes.vue +++ b/resources/assets/js/views/wizard/Taxes.vue @@ -73,16 +73,17 @@ {{ translations.taxes.cancel }} - {{ translations.taxes.save }} - + @@ -131,12 +132,12 @@ {{ translations.taxes.cancel }} - + @@ -227,7 +228,9 @@ export default { this.onEjetItem(event, this.taxes, event.tax_id); }, - onEditForm(item) { + onEditForm(item, event) { + event.preventDefault(); + this.onSubmitEvent( "PATCH", url + "/wizard/taxes/" + item.id, @@ -247,7 +250,9 @@ export default { this.add_taxes = true; }, - onSubmitForm() { + onSubmitForm(event) { + event.preventDefault(); + this.onSubmitEvent("POST", url + "/wizard/taxes", "type", this.taxes); }, diff --git a/resources/views/banking/reconciliations/create.blade.php b/resources/views/banking/reconciliations/create.blade.php index 2438d2659..6cfcb8a90 100644 --- a/resources/views/banking/reconciliations/create.blade.php +++ b/resources/views/banking/reconciliations/create.blade.php @@ -247,7 +247,7 @@ -