mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
More Livewire v3 tweaks
This commit is contained in:
parent
3ad837a517
commit
032648f18b
@ -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'];
|
||||
|
@ -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']])
|
||||
@ -48,16 +48,16 @@
|
||||
@if($show_terms)
|
||||
|
||||
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.terms_of_service') ])
|
||||
<div x-data="{ open: false }">
|
||||
<div x-data="{ open: false }">
|
||||
<input
|
||||
wire:click="toggleTermsAccepted()"
|
||||
id="terms"
|
||||
name="terms_accepted"
|
||||
type="checkbox"
|
||||
class="h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"
|
||||
/>
|
||||
/>
|
||||
<a href="#" class="group relative inline-block ml-4 text-blue-500 hover:text-red-500 duration-300 no-underline" @click="open = true">{{ ctrans('texts.agree_to_terms', ['terms' => ctrans('texts.terms')]) }}</a>
|
||||
|
||||
|
||||
|
||||
|
||||
<div x-show="open" class="fixed bottom-0 inset-x-0 px-4 pb-4 sm:inset-0 sm:flex sm:items-center sm:justify-center z-50"
|
||||
@ -102,7 +102,7 @@
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endcomponent
|
||||
|
||||
|
@ -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"> --}}
|
||||
@ -89,7 +88,7 @@
|
||||
@else
|
||||
<link href="{{ str_replace("setup", "", Request::url())}}css/app.css" rel="stylesheet">
|
||||
@endif
|
||||
|
||||
|
||||
@if(auth()->guard('contact')->user() && !auth()->guard('contact')->user()->user->account->isPaid())
|
||||
{{-- <link href="{{ mix('favicon.png') }}" rel="shortcut icon" type="image/png"> --}}
|
||||
@endif
|
||||
|
@ -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">
|
||||
@ -11,18 +11,17 @@
|
||||
<div class="px-4 py-5 sm:p-6">
|
||||
<div class="sm:flex sm:items-start sm:justify-between">
|
||||
<div>
|
||||
|
||||
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
||||
{{ ctrans('texts.approve') }}
|
||||
</h3>
|
||||
|
||||
|
||||
<div class="btn hidden md:block" data-clipboard-text="{{url("client/quote/{$key}")}}" aria-label="Copied!">
|
||||
<div class="flex text-sm leading-6 font-medium text-gray-500">
|
||||
<p class="mr-2">{{url("client/quote/{$key}")}}</p>
|
||||
<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…
Reference in New Issue
Block a user