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> <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> <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) @if($register_company)
<input type="hidden" name="company_key" value="{{ $register_company->company_key }}"> <input type="hidden" name="company_key" value="{{ $register_company->company_key }}">
@endif @endif
@ -32,8 +32,8 @@
@if($field['visible']) @if($field['visible'])
<div class="col-span-12 md:col-span-6"> <div class="col-span-12 md:col-span-6">
<section class="flex items-center"> <section class="flex items-center">
<label <label
for="{{ $field['key'] }}" for="{{ $field['key'] }}"
class="input-label"> class="input-label">
@if(in_array($field['key'], ['custom_value1','custom_value2','custom_value3','custom_value4'])) @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']))}} {{ (new App\Utils\Helpers())->makeCustomField($register_company->custom_fields, str_replace("custom_value","client", $field['key']))}}
@ -41,29 +41,29 @@
{{ ctrans("texts.{$field['key']}") }} {{ ctrans("texts.{$field['key']}") }}
@endif @endif
</label> </label>
@if($field['required']) @if($field['required'])
<section class="text-red-400 ml-1 text-sm">*</section> <section class="text-red-400 ml-1 text-sm">*</section>
@endif @endif
</section> </section>
@if($field['key'] === 'email') @if($field['key'] === 'email')
<input <input
id="{{ $field['key'] }}" id="{{ $field['key'] }}"
class="input w-full" class="input w-full"
type="email" type="email"
name="{{ $field['key'] }}" name="{{ $field['key'] }}"
value="{{ old($field['key']) }}" value="{{ old($field['key']) }}"
/> />
@elseif($field['key'] === 'password') @elseif($field['key'] === 'password')
<input <input
id="{{ $field['key'] }}" id="{{ $field['key'] }}"
class="input w-full" class="input w-full"
type="password" type="password"
name="{{ $field['key'] }}" name="{{ $field['key'] }}"
/> />
@elseif($field['key'] === 'currency_id') @elseif($field['key'] === 'currency_id')
<select <select
id="currency_id" id="currency_id"
class="input w-full form-select bg-white" class="input w-full form-select bg-white"
name="currency_id"> name="currency_id">
@ -75,7 +75,7 @@
@endforeach @endforeach
</select> </select>
@elseif($field['key'] === 'country_id') @elseif($field['key'] === 'country_id')
<select <select
id="shipping_country" id="shipping_country"
class="input w-full form-select bg-white" class="input w-full form-select bg-white"
name="country_id"> name="country_id">
@ -89,9 +89,9 @@
@endforeach @endforeach
</select> </select>
@else @else
<input <input
id="{{ $field['key'] }}" id="{{ $field['key'] }}"
class="input w-full" class="input w-full"
name="{{ $field['key'] }}" name="{{ $field['key'] }}"
value="{{ old($field['key']) }}" value="{{ old($field['key']) }}"
/> />
@ -104,24 +104,24 @@
@enderror @enderror
</div> </div>
@if($field['key'] === 'password') @if($field['key'] === 'password')
<div class="col-span-12 md:col-span-6"> <div class="col-span-12 md:col-span-6">
<section class="flex items-center"> <section class="flex items-center">
<label <label
for="password_confirmation" for="password_confirmation"
class="input-label"> class="input-label">
{{ ctrans('texts.password_confirmation') }} {{ ctrans('texts.password_confirmation') }}
</label> </label>
@if($field['required']) @if($field['required'])
<section class="text-red-400 ml-1 text-sm">*</section> <section class="text-red-400 ml-1 text-sm">*</section>
@endif @endif
</section> </section>
<input <input
id="password_confirmation" id="password_confirmation"
type="password" type="password"
class="input w-full" class="input w-full"
name="password_confirmation" name="password_confirmation"
/> />
</div> </div>
@ -132,7 +132,7 @@
</div> </div>
<div class="flex justify-between items-center mt-8"> <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> <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 }"> <span class="inline-flex items-center" x-data="{ terms_of_service: false, privacy_policy: false }">
@ -151,8 +151,8 @@
@enderror @enderror
</span> </span>
</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')}} {{ ctrans('texts.register')}}
</button> </button>

View File

@ -11,7 +11,7 @@
<div class="relative inline-block text-left" x-data="{ open: false }"> <div class="relative inline-block text-left" x-data="{ open: false }">
<div> <div>
<span class="rounded shadow-sm"> <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> <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"> <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" /> <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"> <div class="py-1">
@foreach($methods as $index => $method) @foreach($methods as $index => $method)
@if($method['label'] == 'Custom') @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-company-gateway-id="{{ $method['company_gateway_id'] }}"
data-gateway-type-id="{{ $method['gateway_type_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" 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') }} {{ \App\Models\CompanyGateway::find($method['company_gateway_id'])->firstOrFail()->getConfigField('name') }}
</a> </a>
@elseif($total > 0) @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-company-gateway-id="{{ $method['company_gateway_id'] }}"
data-gateway-type-id="{{ $method['gateway_type_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" 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 --> <!-- Scripts -->
@vite('resources/js/app.js') @vite('resources/js/app.js')
{{-- <script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script> --}}
<!-- Fonts --> <!-- Fonts -->
<style> <style>

View File

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

View File

@ -11,7 +11,7 @@
})(window,document,'script','dataLayer','GTM-WMJ5W23');</script> })(window,document,'script','dataLayer','GTM-WMJ5W23');</script>
<!-- End Google Tag Manager --> <!-- End Google Tag Manager -->
@endif @endif
<!-- Error: {{ session('error') }} --> <!-- Error: {{ session('error') }} -->
@if (config('services.analytics.tracking_id')) @if (config('services.analytics.tracking_id'))
@ -58,7 +58,6 @@
<!-- Scripts --> <!-- Scripts -->
@vite('resources/js/app.js') @vite('resources/js/app.js')
<script src="{{ asset('vendor/alpinejs@2.8.2/alpine.js') }}" defer></script>
<!-- Fonts --> <!-- Fonts -->
{{-- <link rel="dns-prefetch" href="https://fonts.gstatic.com"> --}} {{-- <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; 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> </style>
<!-- Styles --> <!-- Styles -->
@vite('resources/sass/app.scss') @vite('resources/sass/app.scss')
@if(auth()->guard('contact')->user() && !auth()->guard('contact')->user()->user->account->isPaid()) @if(auth()->guard('contact')->user() && !auth()->guard('contact')->user()->user->account->isPaid())