@include('components.input.form-input', [
'label' => __('app.name'),
'mandatory' => true,
'name' => 'name',
'value' => isset($user) ? $user->name : '',
])
@include('components.input.form-select', [
'label' => __('app.gender'),
'mandatory' => true,
'name' => 'gender',
'arr_type' => 'linear',
'options' => ['Male', 'Female'],
'placeholder' => 'Select Gender',
'selected' => isset($user) ? $user->gender : '',
'value_type' => 'string',
])
@include('components.input.form-select', [
'label' => __('app.blood_type'),
'mandatory' => true,
'name' => 'blood_type',
'arr_type' => 'linear',
'options' => ['A', 'AB', 'B', 'O'],
'placeholder' => 'Select Blood Type',
'selected' => isset($user) ? $user->blood_type : '',
'value_type' => 'string',
])
@include('components.input.form-input', [
'label' => __('app.birth_place'),
'mandatory' => true,
'name' => 'birth_place',
'value' => isset($user) ? $user->birth_place : '',
])
@include('components.input.form-input', [
'label' => __('app.company'),
'mandatory' => true,
'name' => 'company',
'readonly' => auth()->user()->hasRole('super_admin') ? false : true,
'value' => isset($user) ? $user->company : Auth::user()->company,
])
@include('components.input.form-input', [
'label' => __('app.position'),
'mandatory' => true,
'name' => 'position',
'value' => isset($user) ? $user->position : '',
])
@include('components.input.form-select', [
'label' => __('app.contract'),
'mandatory' => true,
'name' => 'contract',
'arr_type' => 'assoc',
'options' => $contracts,
'placeholder' => 'Select Contract',
'selected' => isset($user) ? $user->contract_employee_id : '',
'disabled' => isset($disabled_edit_work_period) ? $disabled_edit_work_period : false,
'title' =>
isset($disabled_edit_work_period) && $disabled_edit_work_period
? __('app.alert_disabled_edit', ['field' => 'Contract'])
: '',
])
{{-- @php
$selected = [];
if (isset($user)) {
foreach ($user->hasCriticalActivity as $value) {
$selected[] = $value->critical_activity_id;
}
}
@endphp
@include('components.input.form-select2', [
'label' => __('app.critical_activity'),
'class' => 'select-critical-activity mt-3',
'items' => $critical_activities,
'mandatory' => true,
'name' => 'critical_activity',
'select_option' => 'No Critical Activity',
'multiple' => true,
'selected' => $selected,
]) --}}
@if (isset($user))
@include('components.form.form-upload-file', [
'id' => 'ktp',
'file' => $user->ktp,
])
@else
@include('components.form.form-upload-file', ['id' => 'ktp'])
@endif
@if (isset($user))
@include('components.form.form-upload-file', [
'id' => 'pas_photo',
'file' => $user->pas_photo,
'folder' => 'pas-photo',
])
@else
@include('components.form.form-upload-file', [
'id' => 'pas_photo',
])
@endif
@if (isset($user))
@include('components.form.form-upload-file', [
'id' => 'skck',
'file' => $user->skck,
])
@else
@include('components.form.form-upload-file', [
'id' => 'skck',
])
@endif