@extends($templatePathAdmin.'layout') @section('main')

{{ $title_description??'' }}

@if (sc_config_admin('customer_lastname'))
@if($errors->has('first_name')) {{ $errors->first('first_name') }} @endif
@if($errors->has('last_name')) {{ $errors->first('last_name') }} @endif
@else
@if($errors->has('first_name')) {{ $errors->first('first_name') }} @endif
@endif @if (sc_config_admin('customer_name_kana'))
@if($errors->has('first_name_kana')) {{ $errors->first('first_name_kana') }} @endif
@if($errors->has('last_name_kana')) {{ $errors->first('last_name_kana') }} @endif
@endif @if (sc_config_admin('customer_phone'))
@if($errors->has('phone')) {{ $errors->first('phone') }} @endif
@endif @if (sc_config_admin('customer_postcode'))
@if($errors->has('postcode')) {{ $errors->first('postcode') }} @endif
@endif
@if($errors->has('email')) {{ $errors->first('email') }} @endif
@if($errors->has('address1')) {{ $errors->first('address1') }} @endif
@if (sc_config_admin('customer_address2'))
@if($errors->has('address2')) {{ $errors->first('address2') }} @endif
@endif @if (sc_config_admin('customer_address3'))
@if($errors->has('address3')) {{ $errors->first('address3') }} @endif
@endif @if (sc_config_admin('customer_country')) @php $country = old('country', $customer['country'] ?? ''); @endphp
@if ($errors->has('country')) {{ $errors->first('country') }} @endif
@endif @if (sc_config_admin('customer_sex')) @php $sex = old('sex', $customer['sex'] ?? 0); @endphp
@if ($errors->has('sex')) {{ $errors->first('sex') }} @endif
@endif @if (sc_config_admin('customer_birthday'))
@if($errors->has('birthday')) {{ $errors->first('birthday') }} @endif
@endif @if (sc_config_admin('customer_group'))
@if($errors->has('group')) {{ $errors->first('group') }} @endif
@endif
@if ($errors->has('password')) {{ $errors->first('password') }} @else @if ($customer) {{ sc_language_render('customer.admin.keep_password') }} @endif @endif
@if ($errors->has('password_confirmation')) {{ $errors->first('password_confirmation') }} @endif
{{-- Custom fields --}} @php $customFields = isset($customFields) ? $customFields : []; $fields = !empty($customer) ? $customer->getCustomFields() : []; @endphp @includeIf($templatePathAdmin.'component.render_form_custom_field', ['customFields' => $customFields, 'fields' => $fields]) {{-- //Custom fields --}}
@if (!empty($addresses))

{{ sc_language_render('customer.address_list') }}

@foreach($addresses as $address)
@if (sc_config_admin('customer_lastname')) {{ sc_language_render('customer.first_name') }}: {{ $address['first_name'] }}
{{ sc_language_render('customer.last_name') }}: {{ $address['last_name'] }}
@else {{ sc_language_render('customer.name') }}: {{ $address['first_name'] }}
@endif @if (sc_config_admin('customer_phone')) {{ sc_language_render('customer.phone') }}: {{ $address['phone'] }}
@endif @if (sc_config_admin('customer_postcode')) {{ sc_language_render('customer.postcode') }}: {{ $address['postcode'] }}
@endif {{ sc_language_render('customer.address1') }}: {{ $address['address1'] }}
@if (sc_config_admin('customer_address2')) {{ sc_language_render('customer.address2') }}: {{ $address['address2'] }}
@endif @if (sc_config_admin('customer_address3')) {{ sc_language_render('customer.address3') }}: {{ $address['address3'] }}
@endif @if (sc_config_admin('customer_country')) {{ sc_language_render('customer.country') }}: {{ $countries[$address['country']] ?? $address['country'] }}
@endif @if ($address->id == $customer['address_id']) @endif
@endforeach @endif
@endsection @push('styles') @endpush @push('scripts') @endpush