{{-- Left: Photos / Attachments --}}
@php
$nidExt = $item->nid ? strtolower(pathinfo($item->nid, PATHINFO_EXTENSION)) : null;
$nidUrl = $item->nid ? getImage('employees', $item->nid) : null;
$passportExt = $item->passport
? strtolower(pathinfo($item->passport, PATHINFO_EXTENSION))
: null;
$passportUrl = $item->passport ? getImage('employees', $item->passport) : null;
@endphp
@if ($nidUrl)
{{-- Right: Profile --}}
Media
NID
@if ($nidExt === 'pdf')
@else
@endif
@endif
@if ($passportUrl)
Passport
@if ($passportExt === 'pdf')
@else
@endif
@endif
{{-- Header --}}
{{-- Core Details --}}
{{-- Personal --}}
{{ $item->name }}
@if ($item->designation?->name ?? false)
{{ $item->designation->name }}
@endif
@if ($item->department?->name ?? false)
{{ $item->department->name }}
@endif
@if (property_exists($item, 'companyBranch') && $item->companyBranch?->branch_name)
Branch: {{ $item->companyBranch->branch_name }}
@elseif(isset($item->outlet_id) && function_exists('branches'))
@php $branch = collect(branches())->firstWhere('id', $item->outlet_id); @endphp
@if ($branch)
Branch: {{ $branch->branch_name }}
@endif
@endif
{{ $item->status }}
{{-- Core Details --}}
Official Information
Employee ID
{{ $item->employee_id }}
Mobile
{{ $item->mobile }}
Email
@if ($item->email)
{{ $item->email }}
@else
-
@endif
Gross Salary
{{ number_format((float) $item->gross_salary, 2) }}
Joining Date
{{ $item->joining_date
? ($item->joining_date instanceof \Illuminate\Support\Carbon
? $item->joining_date->format('d M Y')
: \Carbon\Carbon::parse($item->joining_date)->format('d M Y'))
: '-' }}
Last Working Date
{{ $item->last_working_date
? ($item->last_working_date instanceof \Illuminate\Support\Carbon
? $item->last_working_date->format('d M Y')
: \Carbon\Carbon::parse($item->last_working_date)->format('d M Y'))
: '-' }}
Present Address
{{ $item->present_address }}
Additional Information
NID
{{ $item->nid_no }}
Passport No
{{ $item->passport_no ?: '-' }}
Date of Birth
{{ $item->dob
? ($item->dob instanceof \Illuminate\Support\Carbon
? $item->dob->format('d M Y')
: \Carbon\Carbon::parse($item->dob)->format('d M Y'))
: '-' }}
Religion
{{ $item->religion ?: '-' }}
Gender
{{ $item->gender }}
Blood Group
{{ $item->blood_group }}