Merge pull request #7837 from turbo124/v5-develop

Livewire improvements
This commit is contained in:
David Bomba 2022-10-01 09:50:43 +10:00 committed by GitHub
commit d75bd765aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 10 deletions

View File

@ -86,7 +86,7 @@ class CreateAccount
$sp794f3f->hosted_company_count = config('ninja.quotas.free.max_companies'); $sp794f3f->hosted_company_count = config('ninja.quotas.free.max_companies');
$sp794f3f->account_sms_verified = true; $sp794f3f->account_sms_verified = true;
if(in_array($this->getDomain($this->request['email']), ['gmail.com', 'hotmail.com', 'outlook.com', 'yahoo.com'])){ if(in_array($this->getDomain($this->request['email']), ['gmail.com', 'hotmail.com', 'outlook.com', 'yahoo.com', 'aol.com', 'mail.ru'])){
$sp794f3f->account_sms_verified = false; $sp794f3f->account_sms_verified = false;
} }

View File

@ -306,13 +306,10 @@ class CheckoutComPaymentDriver extends BaseDriver
try { try {
$response = $this->gateway->getCustomersClient()->create($request); $response = $this->gateway->getCustomersClient()->create($request);
} catch (CheckoutApiException $e) { } catch (\Exception $e) {
// API error // API error
$error_details = $e->error_details; throw new PaymentFailed($e->getMessage(), $e->getCode());
$http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; }
} catch (CheckoutAuthorizationException $e) {
// Bad Invalid authorization
}
return $response; return $response;
} }

View File

@ -233,7 +233,7 @@
@csrf @csrf
<label class="w-full mr-2"> <label class="w-full mr-2">
<input type="text" wire:model.lazy="coupon" class="input w-full m-0"/> <input type="text" wire:model.defer="coupon" class="input w-full m-0"/>
</label> </label>
<button class="button button-primary bg-primary">{{ ctrans('texts.apply') }}</button> <button class="button button-primary bg-primary">{{ ctrans('texts.apply') }}</button>

View File

@ -15,7 +15,7 @@
@if(!array_key_exists('filled', $field)) @if(!array_key_exists('filled', $field))
@component('portal.ninja2020.components.general.card-element', ['title' => $field['label']]) @component('portal.ninja2020.components.general.card-element', ['title' => $field['label']])
@if($field['name'] == 'client_country_id' || $field['name'] == 'client_shipping_country_id') @if($field['name'] == 'client_country_id' || $field['name'] == 'client_shipping_country_id')
<select id="client_country" class="input w-full form-select bg-white" name="{{ $field['name'] }}" wire:model.lazy="{{ str_replace(["client_","_line_","contact_"], ["client.","","contact."], $field['name']) }}"> <select id="client_country" class="input w-full form-select bg-white" name="{{ $field['name'] }}" wire:model.defer="{{ str_replace(["client_","_line_","contact_"], ["client.","","contact."], $field['name']) }}">
<option value="none"></option> <option value="none"></option>
@foreach($countries as $country) @foreach($countries as $country)
@ -25,7 +25,7 @@
@endforeach @endforeach
</select> </select>
@else @else
<input class="input w-full" type="{{ $field['type'] ?? 'text' }}" name="{{ $field['name'] }}" wire:model.lazy="{{ str_replace(["client_","_line_","contact_"], ["client.","","contact."], $field['name']) }}"> <input class="input w-full" type="{{ $field['type'] ?? 'text' }}" name="{{ $field['name'] }}" wire:model.defer="{{ str_replace(["client_","_line_","contact_"], ["client.","","contact."], $field['name']) }}">
@endif @endif
@if(session()->has('validation_errors') && array_key_exists($field['name'], session('validation_errors'))) @if(session()->has('validation_errors') && array_key_exists($field['name'], session('validation_errors')))