@extends('layouts.app',['path'=>'employee']) @section('title', $employee['name'] . ' - Employee Details - HRMS') @section('content') @php $isExited = $employee['is_exit'] == 1; @endphp @can('employee.view_detail')
@include('partials.new_alerts')
@can('info.read|info.update')
@if($employee['profile_image']) Img @else @endif
{{ $employee['name'] }}
{{ $employee['designation']['name']??'' }} {{ $employee['experience_message'] }}
Father's Name

{{ $employee['father_name'] }}

@if($employee['employee_no'])
Employee No

{{ $employee['employee_no'] }}

@endif
Department

{{ $employee['department']['name']??'' }}

Designation

{{ $employee['designation']['name']??'' }}

Employee Type

{{ $employee['employee_type']['name']??'' }}

Joining Date

{{ formatDisplayDate($employee['date_of_joining']) }}

Office

{{ $employee['office_location']['name']??'' }}

Role

{{ $employee['user']['roles'][0]['display_name']??'' }}

Status @if($employee['status']) Active @else Inactive @endif
@if(!$employee['user']['is_root'])
Department Head

{{ (!empty($employee['is_department_head']) && $employee['is_department_head']) ? 'Yes' : 'No' }}

Reports To

{{ $employee['report_to']['name'] ?? '' }}

@endif @can('info.update') @if(!$isExited) @endif @endcan
{{--
Basic information
Phone

{{ $employee['phone'] }}

Personal Email

{{ $employee['personal_email'] }}

Official Email

{{ $employee['official_email'] }}

Gender

{{ ucfirst($employee['gender']) }}

Date of Birth

{{ formatDisplayDate($employee['date_of_birth']) }}

Language

{{ $employee['language'] }}

Permanent Address

{{ $employee['permanent_address'] }}

Present Address

{{ $employee['present_address'] }}

--}} {{--
Personal Information
Identity Number

{{ $employee['cnic_number'] }}

Marital status

{{ ucfirst($employee['marital_status']) }}

Blood Group

{{ $employee['blood_group'] }}

Existing Medical Issues

{{ $employee['any_illness'] }}

--}}
@endcan @can('emergency_contact.read|emergency_contact.update|emergency_contact.delete')
@can('emergency_contact.update') @if(!$isExited) @endif @endcan
@foreach ($employee['emergency_contacts'] as $index => $emergencyContect) @if($emergencyContect['name'] || $emergencyContect['relationship'] || $emergencyContect['phone'])
{{ $index == 0? 'Primary' : 'Secondary'}}
{{ $emergencyContect['name'] }} {{ $emergencyContect['relationship'] }}

{{ $emergencyContect['phone'] }}

@can('emergency_contact.delete') @if(!$isExited)
@endif @endcan
@endif @endforeach @if(count($employee['emergency_contacts']) == 0) No information available. @endif
{{--
Emergency Contact Number
@can('emergency_contact.update') @endcan
@foreach ($employee['emergency_contacts'] as $index => $emergencyContect) @if($emergencyContect['name'] || $emergencyContect['relationship'] || $emergencyContect['phone'])
{{ $index == 0? 'Primary' : 'Secondary'}}
{{ $emergencyContect['name'] }} {{ $emergencyContect['relationship'] }}

{{ $emergencyContect['phone'] }}

@can('emergency_contact.delete')
@endcan
@endif @endforeach @if(count($employee['emergency_contacts']) == 0)
No information available.
@endif
--}} @endcan
@can('basic_information.read|basic_information.update')
@can('basic_information.update') @if(!$isExited) @endif @endcan
Phone
{{ $employee['phone'] }}
Personal Email
{{ $employee['personal_email'] }}
Official Email
{{ $employee['official_email'] }}
Gender
{{ ucfirst($employee['gender']) }}
Date of Birth
{{ formatDisplayDate($employee['date_of_birth']) }}
Language
{{ $employee['language'] }}
Permanent Address
{{ $employee['permanent_address'] }}
Present Address
{{ $employee['present_address'] }}
@if( !$employee['phone'] && !$employee['personal_email'] && !$employee['official_email'] && !$employee['gender'] && !$employee['date_of_birth'] && !$employee['language'] && !$employee['permanent_address'] && !$employee['present_address'] ) No information available. @endif
@endcan @can('personal_information.read|personal_information.update')
@can('personal_information.update') @if(!$isExited) @endif @endcan
Identity Number
{{ $employee['cnic_number'] }}
Marital status
{{ ucfirst($employee['marital_status']) }}
Blood Group
{{ $employee['blood_group'] }}
Existing Medical Issues
{{ $employee['any_illness'] }}
@if ( !$employee['cnic_number'] && !$employee['marital_status'] && !$employee['blood_group'] && !$employee['any_illness'] ) No information available. @endif
@endcan
@can('about_employee.read|about_employee.update')
@can('about_employee.update') @if(!$isExited) @endif @endcan
{{ $employee['about'] ?? 'No information available.' }}
@endcan @can('bank_information.read|bank_information.update|bank_information.delete')
@can('bank_information.update') @if(!$isExited) @endif @endcan
@foreach ($employee['bank_details'] as $index => $bankDetail)
Account Title
{{ $bankDetail['account_title'] }}
Bank Name
{{ $bankDetail['bank_name'] }}
Bank account no
{{ $bankDetail['account_number'] }}
Branch
{{ $bankDetail['bank_address'] }}
@can('bank_information.delete') @if(!$isExited) @endif @endcan
@endforeach @if(count($employee['bank_details']) == 0) No information available. @endif
@endcan
@can('family_information.create|family_information.read|family_information.update|family_information.delete')
@can('family_information.create') @if(!$isExited) @endif @endcan
@if(count($employee['family_details']) > 0)
Name
Relationship
Date of Birth
@endif @foreach ($employee['family_details'] as $family)
{{ $family['name'] }}
{{ $family['relationship'] }}
{{ formatDisplayDate($family['date_of_birth']) }}
@can('family_information.update') @if(!$isExited) @endif @endcan @can('family_information.delete') @if(!$isExited) @endif @endcan
@endforeach @if(count($employee['family_details']) == 0) No information available. @endif
@endcan
@can('education_detail.create|education_detail.read|education_detail.update|education_detail.delete')
@can('education_detail.create') @if(!$isExited) @endif @endcan
@foreach ($employee['qualifications'] as $education)
{{ $education['institute_name'] }}
{{ $education['qualification_level']['name'] }} - {{ $education['degree_name'] }}

{{ formatDisplayDateY($education['start_date']) }} - {{ $education['end_date']? formatDisplayDateY($education['end_date']) : 'Present' }}

@can('education_detail.update') @if(!$isExited) @endif @endcan @can('education_detail.delete') @if(!$isExited) @endif @endcan
@endforeach @if(count($employee['qualifications']) == 0) No information available. @endif
@endcan @can('experience.create|experience.read|experience.update|experience.delete')
@foreach ($employee['employement_histories'] as $history)
{{ $history['company_name'] }}
{{ $history['designation'] }}

{{ formatDisplayDateMY($history['start_date']) }} - {{ $history['end_date']? formatDisplayDateMY($history['end_date']) : 'Present' }}

@can('experience.update') @if(!$isExited) @endif @endcan @can('experience.delete') @if(!$isExited) @endif @endcan
@endforeach @if(count($employee['employement_histories']) == 0) No information available. @endif
@endcan
{{-- YTD Information --}}
@can('employee.update') @if(!$isExited) @endif @endcan
@php $decrypt_token = session()->get('decrypt_token'); $ytd_taxable_income = $employee['ytd_taxable_income'] == null ? ($decrypt_token? 'N/A' : '*****') : number_format($employee['ytd_taxable_income']); $ytd_tax_paid = $employee['ytd_tax_paid'] == null ? ($decrypt_token? 'N/A' : '*****') : number_format($employee['ytd_tax_paid']); @endphp
YTD Taxable Income
{{ $ytd_taxable_income }}
YTD Tax Paid
{{ $ytd_tax_paid }}
Updated On
{{ $employee['applicable_date'] ? formatDisplayDate($employee['applicable_date']) : 'N/A' }}
@can('contract.read|contract.create|contract.update|contract.delete')
@can('contract.end_employement') @if(!$isExited) @endif @endcan @can('contract.create') @if(!$isExited) @endif @endcan
{{-- @dd($employee['employee_contracts']) --}} @foreach($employee['employee_contracts'] as $contract)
Effective Date
{{ formatDisplayDate($contract['effective_from']) }}
@if($contract['is_exit'] != 1)
Gross Salary
{{ $contract['gross_salary'] == null ? '*****' : number_format( $contract['gross_salary']) }}
@endif @if($contract['on_probation'])
Probation Start Date
{{ formatDisplayDate($contract['probation_start_date']) }}
Probation End Date
{{ formatDisplayDate($contract['probation_end_date']) }}
@endif @if($contract['department']['name'] ?? false)
Department
{{ $contract['department']['name'] }}
@endif @if($contract['designation']['name'] ?? false)
Designation
{{ $contract['designation']['name'] }}
@endif @if($contract['employee_type']['name'] ?? false)
Employee Type
{{ $contract['employee_type']['name'] }}
@endif @if($contract['job_level']['name'] ?? false)
Job Level
{{ $contract['job_level']['name'] }}
@endif
Status
@if($contract['status'] ) Active @else Inactive @endif
@can('contract.read') @endcan @if($contract['status'] || !$contract['is_approved']) @can('contract.update') @if(!$isExited) @endif @endcan @can('contract.delete') @if(!$contract['is_approved'] && !$isExited) @endif @endcan @endif
@if($contract['status'] || !$contract['is_approved']) @can('employee.approve') @if(!$contract['is_approved'] && !$isExited) Approve @endif @endcan @endif
@endforeach @if(count($employee['employee_contracts']) == 0) No information available. @endif
@endcan
@can('employee.view_payitem')
{{-- --}}
@if(!empty($employee['employee_pay_item_effectives'])) @foreach($employee['employee_pay_item_effectives'] as $index => $item)
Pay Item
{{ $item['pay_item']['name'] }}
Effective Date
{{ $item['effective_date'] ? formatDisplayDate($item['effective_date']) : '' }}
Payroll Structure
{{ $item['payroll_structure']['name'] }}
@can('employee.edit_payitem') @if(!$isExited) @endif @endcan
@endforeach @else No payroll items assigned. @endif
@endcan
@endcan @include('compaines.employee.modals') @endsection @push('css') @endpush @push('scripts') @endpush