mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 08:44:35 -04:00
More Livewire v3 tweaks
This commit is contained in:
parent
3ad837a517
commit
032648f18b
@ -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()
|
||||
|
@ -100,7 +100,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'legacy_model_binding' => false,
|
||||
'legacy_model_binding' => true,
|
||||
|
||||
/*
|
||||
|---------------------------------------------------------------------------
|
||||
|
@ -49,7 +49,6 @@
|
||||
|
||||
<!-- Scripts -->
|
||||
@vite('resources/js/app.js')
|
||||
<script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script>
|
||||
|
||||
<!-- Fonts -->
|
||||
{{-- <link rel="dns-prefetch" href="https://fonts.gstatic.com"> --}}
|
||||
|
@ -10,7 +10,7 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form id="required-client-info-form" wire:submit="handleSubmit(Object.fromEntries(new FormData(document.getElementById('required-client-info-form'))))">
|
||||
<form id="required-client-info-form" x-on:submit.prevent="$wire.handleSubmit(Object.fromEntries(new FormData(document.getElementById('required-client-info-form'))))">
|
||||
@foreach($fields as $field)
|
||||
@if(!array_key_exists('filled', $field))
|
||||
@component('portal.ninja2020.components.general.card-element', ['title' => $field['label']])
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div x-data="{ open: false }" style="display: none;" id="displaySignatureModal" class="fixed bottom-0 inset-x-0 px-4 pb-4 sm:inset-0 sm:flex sm:items-center sm:justify-center" x-data="{ open: false }">
|
||||
<div style="display: none;" id="displaySignatureModal" class="fixed bottom-0 inset-x-0 px-4 pb-4 sm:inset-0 sm:flex sm:items-center sm:justify-center" x-data="{ open: true }">
|
||||
<div x-show="open" x-transition:enter="ease-out duration-300" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" x-transition:leave="ease-in duration-200" x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0" class="fixed inset-0 transition-opacity">
|
||||
<div class="absolute inset-0 bg-gray-500 opacity-75"></div>
|
||||
</div>
|
||||
|
@ -66,7 +66,6 @@
|
||||
@else
|
||||
<script src="{{ str_replace("setup", "", Request::url())}}js/app.js" defer></script>
|
||||
@endif
|
||||
<script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script>
|
||||
|
||||
<!-- Fonts -->
|
||||
{{-- <link rel="dns-prefetch" href="https://fonts.gstatic.com"> --}}
|
||||
|
@ -65,7 +65,6 @@
|
||||
|
||||
<!-- Scripts -->
|
||||
@vite('resources/js/app.js')
|
||||
<script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script>
|
||||
|
||||
<!-- Fonts -->
|
||||
{{-- <link rel="dns-prefetch" href="https://fonts.gstatic.com"> --}}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<form action="{{ route('client.quotes.bulk') }}" method="post" id="approve-form" />
|
||||
<form action="{{ route('client.quotes.bulk') }}" method="post" id="approve-form">
|
||||
@csrf
|
||||
|
||||
<input type="hidden" name="action" value="approve">
|
||||
@ -22,7 +22,6 @@
|
||||
<p><img class="h-5 w-5" src="{{ asset('assets/clippy.svg') }}" alt="Copy to clipboard"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mt-5 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex sm:items-center">
|
||||
|
Loading…
x
Reference in New Issue
Block a user