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 @@