More Livewire v3 tweaks

This commit is contained in:
Jason Beggs 2023-12-14 08:43:09 -05:00
parent e27ee40ff3
commit 3ad837a517
6 changed files with 31 additions and 34 deletions

View File

@ -19,7 +19,7 @@
<h1 class="text-center text-3xl mt-8">{{ ctrans('texts.register') }}</h1>
<p class="block text-center text-gray-600">{{ ctrans('texts.register_label') }}</p>
<form id="register-form" action="{{ route('client.register', request()->route('company_key')) }}" method="POST" x-data="{more: false, busy: false, isSubmitted: false}" x-on:submit="isSubmitted = true">
<form id="register-form" action="{{ route('client.register', request()->route('company_key')) }}" method="POST" x-data="{more: false, busy: false, isSubmitted: false}" x-on:submit="busy = true; isSubmitted = true">
@if($register_company)
<input type="hidden" name="company_key" value="{{ $register_company->company_key }}">
@endif
@ -32,8 +32,8 @@
@if($field['visible'])
<div class="col-span-12 md:col-span-6">
<section class="flex items-center">
<label
for="{{ $field['key'] }}"
<label
for="{{ $field['key'] }}"
class="input-label">
@if(in_array($field['key'], ['custom_value1','custom_value2','custom_value3','custom_value4']))
{{ (new App\Utils\Helpers())->makeCustomField($register_company->custom_fields, str_replace("custom_value","client", $field['key']))}}
@ -41,29 +41,29 @@
{{ ctrans("texts.{$field['key']}") }}
@endif
</label>
@if($field['required'])
<section class="text-red-400 ml-1 text-sm">*</section>
@endif
</section>
@if($field['key'] === 'email')
<input
id="{{ $field['key'] }}"
class="input w-full"
<input
id="{{ $field['key'] }}"
class="input w-full"
type="email"
name="{{ $field['key'] }}"
value="{{ old($field['key']) }}"
/>
@elseif($field['key'] === 'password')
<input
id="{{ $field['key'] }}"
class="input w-full"
<input
id="{{ $field['key'] }}"
class="input w-full"
type="password"
name="{{ $field['key'] }}"
/>
@elseif($field['key'] === 'currency_id')
<select
<select
id="currency_id"
class="input w-full form-select bg-white"
name="currency_id">
@ -75,7 +75,7 @@
@endforeach
</select>
@elseif($field['key'] === 'country_id')
<select
<select
id="shipping_country"
class="input w-full form-select bg-white"
name="country_id">
@ -89,9 +89,9 @@
@endforeach
</select>
@else
<input
id="{{ $field['key'] }}"
class="input w-full"
<input
id="{{ $field['key'] }}"
class="input w-full"
name="{{ $field['key'] }}"
value="{{ old($field['key']) }}"
/>
@ -104,24 +104,24 @@
@enderror
</div>
@if($field['key'] === 'password')
@if($field['key'] === 'password')
<div class="col-span-12 md:col-span-6">
<section class="flex items-center">
<label
for="password_confirmation"
<label
for="password_confirmation"
class="input-label">
{{ ctrans('texts.password_confirmation') }}
</label>
@if($field['required'])
<section class="text-red-400 ml-1 text-sm">*</section>
@endif
</section>
<input
id="password_confirmation"
type="password"
class="input w-full"
<input
id="password_confirmation"
type="password"
class="input w-full"
name="password_confirmation"
/>
</div>
@ -132,7 +132,7 @@
</div>
<div class="flex justify-between items-center mt-8">
<a href="{{route('client.login')}}" class="button button-info bg-green-600 text-white">{{ ctrans('texts.login_label') }}</a>
<span class="inline-flex items-center" x-data="{ terms_of_service: false, privacy_policy: false }">
@ -151,8 +151,8 @@
@enderror
</span>
</span>
<button class="button button-primary bg-blue-600" :disabled={{ $submitsForm == 'true' ? 'isSubmitted' : 'busy'}} x-on:click="busy = true">
<button class="button button-primary bg-blue-600" :disabled={{ $submitsForm == 'true' ? 'isSubmitted' : 'busy'}}>
{{ ctrans('texts.register')}}
</button>

View File

@ -11,7 +11,7 @@
<div class="relative inline-block text-left" x-data="{ open: false }">
<div>
<span class="rounded shadow-sm">
<button x-on:click="open = !open" x-on:click.away="open = false" type="button" class="inline-flex justify-center w-full rounded-md border border-gray-300 px-4 py-2 bg-white text-sm leading-5 font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:ring-blue active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150">
<button x-on:click="open = !open" x-on:click.outside="open = false" type="button" class="inline-flex justify-center w-full rounded-md border border-gray-300 px-4 py-2 bg-white text-sm leading-5 font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:ring-blue active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150">
<span class="hidden md:block mr-1">{{ auth()->guard('contact')->user()->company->present()->name }}</span>
<svg class="md:-mr-1 md:ml-2 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />

View File

@ -20,7 +20,7 @@
<div class="py-1">
@foreach($methods as $index => $method)
@if($method['label'] == 'Custom')
<a href="#" @click="{ open = false }" dusk="pay-with-custom"
<a href="#" @click="open = false" dusk="pay-with-custom"
data-company-gateway-id="{{ $method['company_gateway_id'] }}"
data-gateway-type-id="{{ $method['gateway_type_id'] }}"
class="block px-4 py-2 text-sm leading-5 text-gray-700 dropdown-gateway-button hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"
@ -28,7 +28,7 @@
{{ \App\Models\CompanyGateway::find($method['company_gateway_id'])->firstOrFail()->getConfigField('name') }}
</a>
@elseif($total > 0)
<a href="#" @click="{ open = false }" dusk="pay-with-{{ $index }}"
<a href="#" @click="open = false" dusk="pay-with-{{ $index }}"
data-company-gateway-id="{{ $method['company_gateway_id'] }}"
data-gateway-type-id="{{ $method['gateway_type_id'] }}"
class="block px-4 py-2 text-sm leading-5 text-gray-700 dropdown-gateway-button hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"

View File

@ -65,7 +65,6 @@
<!-- Scripts -->
@vite('resources/js/app.js')
{{-- <script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script> --}}
<!-- Fonts -->
<style>

View File

@ -74,7 +74,6 @@
<!-- Scripts -->
@vite('resources/js/app.js')
<script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script>
<!-- Fonts -->
<style>

View File

@ -11,7 +11,7 @@
})(window,document,'script','dataLayer','GTM-WMJ5W23');</script>
<!-- End Google Tag Manager -->
@endif
<!-- Error: {{ session('error') }} -->
@if (config('services.analytics.tracking_id'))
@ -58,7 +58,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"> --}}
@ -75,7 +74,7 @@
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<!-- Styles -->
@vite('resources/sass/app.scss')
@if(auth()->guard('contact')->user() && !auth()->guard('contact')->user()->user->account->isPaid())