@extends('frontend::layouts.master') @section('content')

{{ __('frontend::frontend.account_info') }}

@php $menu = $data['member']['sidebar'] ?? []; @endphp
@if (!empty($data['profile']->company_id))

{{ $data['profile']->company->data_tmp->card_name ?? ($data['profile']->company->card_name ?? '') }}

{{ $data['profile']->company->address_s_default->branch_name ?? '' }}

{{ __('frontend::frontend.tax') }} : {{ $data['profile']->company->tax_id ?? '' }}

{{ count($data['profile']->company->member) ?? '' }} {{ __('frontend::frontend.users') }}

{{ __('frontend::frontend.tel') }} : {{ $data['profile']->company->data_tmp->phone ?? ($data['profile']->company->phone ?? '') }}

{{ __('frontend::frontend.credit_balance') }}

{{ $data['profile']->company->balance_amount ?? '0.00' }}

{{ __('frontend::frontend.credit') }} {{ $data['profile']->company->credit_terms ?? '0' }} {{ __('frontend::frontend.day') }}

@endif @php $profile = $data['profile'] ?? null; if (!empty($profile->company_id)) { $building = $profile->data_new_address_p_default_tmp->building ?? ($profile->address_p_default->building ?? ''); $street_no = $profile->data_new_address_p_default_tmp->street_no ?? ($profile->address_p_default->street_no ?? ''); $street = $profile->data_new_address_p_default_tmp->street ?? ($profile->address_p_default->street ?? ''); $block = $profile->data_new_address_p_default_tmp->block ?? ($profile->address_p_default->block ?? ''); $city = $profile->data_new_address_p_default_tmp->city ?? ($profile->address_p_default->city ?? ''); $zip_code = $profile->data_new_address_p_default_tmp->zip_code ?? ($profile->address_p_default->zip_code ?? ''); } else { $building = $profile->data_new_address_s_default_tmp->building ?? ($profile->address_s_default->building ?? ''); $street_no = $profile->data_new_address_s_default_tmp->street_no ?? ($profile->address_s_default->street_no ?? ''); $street = $profile->data_new_address_s_default_tmp->street ?? ($profile->address_s_default->street ?? ''); $block = $profile->data_new_address_s_default_tmp->block ?? ($profile->address_s_default->block ?? ''); $city = $profile->data_new_address_s_default_tmp->city ?? ($profile->address_s_default->city ?? ''); $zip_code = $profile->data_new_address_s_default_tmp->zip_code ?? ($profile->address_s_default->zip_code ?? ''); } if (!empty($profile)) { $inputs = [ ['name' => 'name', 'type' => 'text', 'title' => __('frontend::frontend.profile.company_name'), 'column' => ['card_name'], 'content' => [$profile->data_tmp->card_name ?? ($profile->card_name ?? '')]], ['name' => 'phone', 'type' => 'text', 'title' => __('frontend::frontend.profile.phone'), 'column' => ['phone'], 'content' => [$profile->data_tmp->phone ?? ($profile->phone ?? '')]], ['name' => 'contact_person', 'type' => 'text', 'title' => __('frontend::frontend.profile.contact_person'), 'column' => ['first_name', 'last_name'], 'content' => [$profile->data_tmp->first_name ?? ($profile->first_name ?? ''), $profile->data_tmp->last_name ?? ($profile->last_name ?? '')]], ['name' => 'position', 'type' => 'text', 'title' => __('frontend::frontend.profile.position'), 'column' => ['position'], 'content' => [$profile->data_tmp->position ?? ($profile->position ?? '')]], ['name' => 'name', 'type' => 'text', 'title' => __('frontend::frontend.profile.name'), 'column' => ['first_name', 'last_name'], 'content' => [$profile->data_tmp->first_name ?? ($profile->first_name ?? ''), $profile->data_tmp->last_name ?? ($profile->last_name ?? '')]], ['name' => 'telephone', 'type' => 'text', 'title' => __('frontend::frontend.profile.tel'), 'column' => ['mobile_phone'], 'content' => [$profile->data_tmp->mobile_phone ?? ($profile->mobile_phone ?? '')]], ['name' => 'fax', 'type' => 'text', 'title' => __('frontend::frontend.profile.fax'), 'column' => ['fax'], 'content' => [$profile->data_tmp->fax ?? ($profile->fax ?? '')]], ['name' => 'address', 'type' => 'text', 'title' => __('frontend::frontend.profile.address'), 'column' => ['building', 'street_no', 'street', 'block', 'city', 'zip_code'], 'content' => [$building, $street_no, $street, $block, $city, $zip_code]], ['name' => 'idcard', 'type' => 'text', 'title' => __('frontend::frontend.profile.card_id'), 'column' => ['tax_id'], 'content' => [$profile->data_tmp->tax_id ?? ($profile->tax_id ?? '')]], ['name' => 'dob', 'type' => 'date', 'title' => __('frontend::frontend.profile.birthday'), 'column' => ['birthday'], 'content' => [$profile->data_tmp->birthday ?? ($profile->birthday ?? '')]], ['name' => 'email', 'type' => 'email', 'title' => __('frontend::frontend.profile.email'), 'column' => ['email'], 'content' => [$profile->email], 'disable' => true], ]; } if (!empty($profile->company_id)) { unset($inputs[4], $inputs[8], $inputs[9]); if (empty($profile->active)) { unset($inputs[0], $inputs[1]); } } else { unset($inputs[0], $inputs[1], $inputs[2], $inputs[3], $inputs[6]); } @endphp @foreach ($inputs as $input) {{-- @if ($input['name'] == 'address')
@endif --}}
@php $column = $input['column'] ?? []; $content = $input['content'] ?? ''; $disable = $input['disable'] ?? false; @endphp
@endforeach

{{ __('frontend::frontend.profile.password') }}

************

@endsection @section('script') {{ module_vite('build-frontend', 'resources/assets/js/profile.js') }} @endsection