diff --git a/app/Livewire/BillingPortalPurchase.php b/app/Livewire/BillingPortalPurchase.php index 6d6373290128..efb665d511e0 100644 --- a/app/Livewire/BillingPortalPurchase.php +++ b/app/Livewire/BillingPortalPurchase.php @@ -251,7 +251,7 @@ class BillingPortalPurchase extends Component $company = $this->subscription->company; $user = $this->subscription->user; $user->setCompany($company); - + $client_repo = new ClientRepository(new ClientContactRepository()); $data = [ @@ -432,7 +432,7 @@ class BillingPortalPurchase extends Component public function handlePaymentNotRequired() { $is_eligible = $this->subscription->service()->isEligible($this->contact); - + if ($is_eligible['status_code'] != 200) { $this->steps['not_eligible'] = true; $this->steps['not_eligible_message'] = $is_eligible['message']; diff --git a/app/Livewire/RequiredClientInfo.php b/app/Livewire/RequiredClientInfo.php index 330f5c1a303f..a4595b771ef2 100644 --- a/app/Livewire/RequiredClientInfo.php +++ b/app/Livewire/RequiredClientInfo.php @@ -190,9 +190,10 @@ class RequiredClientInfo extends Component } if ($this->updateClientDetails($data)) { - $this->emit('passed-required-fields-check', [ - 'client_postal_code' => $this->contact->client->postal_code, - ]); + $this->dispatch( + 'passed-required-fields-check', + client_postal_code: $this->contact->client->postal_code + ); //if stripe is enabled, we want to update the customer at this point. @@ -258,7 +259,6 @@ class RequiredClientInfo extends Component } if (Str::startsWith($field['name'], 'contact_')) { - if (empty($this->contact->{$_field}) || is_null($this->contact->{$_field}) || str_contains($this->contact->{$_field}, '@example.com')) { $this->show_form = true; } else { @@ -289,14 +289,15 @@ class RequiredClientInfo extends Component public function handleCopyBilling(): void { - $this->emit('update-shipping-data', [ - 'client_shipping_address_line_1' => $this->contact->client->address1, - 'client_shipping_address_line_2' => $this->contact->client->address2, - 'client_shipping_city' => $this->contact->client->city, - 'client_shipping_state' => $this->contact->client->state, - 'client_shipping_postal_code' => $this->contact->client->postal_code, - 'client_shipping_country_id' => $this->contact->client->country_id, - ]); + $this->dispatch( + 'update-shipping-data', + client_shipping_address_line_1: $this->contact->client->address1, + client_shipping_address_line_2: $this->contact->client->address2, + client_shipping_city: $this->contact->client->city, + client_shipping_state: $this->contact->client->state, + client_shipping_postal_code: $this->contact->client->postal_code, + client_shipping_country_id: $this->contact->client->country_id, + ); } public function render() diff --git a/config/livewire.php b/config/livewire.php index cdce349381eb..8a810cfdf660 100644 --- a/config/livewire.php +++ b/config/livewire.php @@ -100,7 +100,7 @@ return [ | */ - 'legacy_model_binding' => false, + 'legacy_model_binding' => true, /* |--------------------------------------------------------------------------- diff --git a/resources/views/layouts/ninja.blade.php b/resources/views/layouts/ninja.blade.php index 1f21e80d0e6b..8f68d29bd627 100644 --- a/resources/views/layouts/ninja.blade.php +++ b/resources/views/layouts/ninja.blade.php @@ -49,7 +49,6 @@ @vite('resources/js/app.js') - {{-- --}} diff --git a/resources/views/portal/ninja2020/components/livewire/required-client-info.blade.php b/resources/views/portal/ninja2020/components/livewire/required-client-info.blade.php index 8b6254e53a6c..ebe2d612059a 100644 --- a/resources/views/portal/ninja2020/components/livewire/required-client-info.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/required-client-info.blade.php @@ -10,7 +10,7 @@
-