@include('admin.errors.error')
{!! Form::open([
'route' => ['admin.profile.update', $user],
'id' => 'profile_update_form',
'name' => 'profile_update_form',
'enctype' => 'multipart/form-data',
]) !!}
@csrf
@if (auth()->user()->getRawOriginal('profile_pic'))
@endif
@if (auth()->user()->roles[0]->id !== config('const.roleSuperAdmin'))
@if (auth()->user()->roles[0]->id === config('const.roleAgency'))
{!! Form::label('name', 'Agency Name', ['class' => 'form-label']) !!}
*
{!! Form::text('name', old('name', $user->name), [
'id' => 'name',
'placeholder' => 'Enter Agency Name',
'class' => 'form-control',
]) !!}
@else
{!! Form::label('name', 'Agency Name', ['class' => 'form-label']) !!}
*
{!! Form::text('name', $user->agencyUser()->first()->name, [
'id' => 'name',
'placeholder' => 'Enter Agency Name',
'class' => 'form-control',
'readonly',
'disabled',
]) !!}
@endif
@endif
@if (auth()->user()->roles[0]->id == config('const.roleAgency'))
{!! Form::label('first_name', 'Owner First Name', ['class' => 'form-label']) !!}
*
{!! Form::text('first_name', old('first_name', $user->first_name), [
'id' => 'first_name',
'placeholder' => 'Enter Owner First Name',
'class' => 'form-control',
]) !!}
@else
{!! Form::label('first_name', 'First Name', ['class' => 'form-label']) !!}
*
{!! Form::text('first_name', old('first_name', $user->first_name), [
'id' => 'first_name',
'placeholder' => 'Enter First Name',
'class' => 'form-control',
]) !!}
@endif
@if (auth()->user()->roles[0]->id == config('const.roleAgency'))
{!! Form::label('last_name', 'Owner Last Name', ['class' => 'form-label']) !!}
*
{!! Form::text('last_name', old('last_name', $user->last_name), [
'id' => 'last_name',
'placeholder' => 'Enter Owner Last Name',
'class' => 'form-control',
]) !!}
@else
{!! Form::label('last_name', 'Last Name', ['class' => 'form-label']) !!}
*
{!! Form::text('last_name', old('last_name', $user->last_name), [
'id' => 'last_name',
'placeholder' => 'Enter Last Name',
'class' => 'form-control',
]) !!}
@endif
{!! Form::label('email', 'Email', ['class' => 'form-label']) !!}
*
{!! Form::text('email', old('email', $user->email), [
'id' => 'email',
'placeholder' => 'Enter Email',
'class' => 'form-control',
]) !!}
{!! Form::label('mobile_number', 'Contact Number', ['class' => 'form-label']) !!}
{!! Form::number('mobile_number', old('mobile_number', $user->getRawOriginal('mobile_number')), [
'id' => 'mobile_number',
'placeholder' => 'Enter Contact Number',
'class' => 'form-control',
]) !!}
@if (auth()->user()->roles[0]->id == config('const.roleAgency'))
{!! Form::label('timezone', 'Timezone', ['class' => 'form-label']) !!}
@endif
Cancel