@push('title') Employee Module @endpush
Personal Information
  • Full Name: {{ $employee->full_name }}
  • Gender: {{ $employee->gender }}
  • Date of Birth: {{ \Carbon\Carbon::parse($employee->date_of_birth)->format('d M Y') }}
  • Marital Status: {{ ucfirst($employee->marital_status) }}
  • Nationality: {{ $employee->nationality }}
  • NIC: {{ $employee->nic_number }}
Contact Information
  • Mobile: {{ $employee->mobile_number ?? '-' }}
  • Landline: {{ $employee->landline_number ?? '-' }}
  • Email: {{ $employee->email ?? '-' }}
Employment Status
  • Status: @switch($employee->employee_status) @case('active') Active @break @case('inactive') Inactive @break @case('resigned') Resigned @break @case('terminated') Terminated @break @endswitch
  • Department: {{ $employee->latestEmployment?->department?->name ?? 'N/A' }}
  • Salary Type: {{ $employee->salary_type == 'per_day' ? 'Per Day' : 'Monthly' }}
  • Current Salary: LKR {{ number_format($employee->currentSalary(), 2) }}
Emergency Contact
  • Name: {{ $employee->emergency_contact_name ?? '-' }}
  • Relationship: {{ $employee->emergency_contact_relationship ?? '-' }}
  • Phone: {{ $employee->emergency_contact_phone ?? '-' }}
Bank Information
  • Bank: {{ $employee->bank_name ?? '-' }}
  • Branch: {{ $employee->bank_branch ?? '-' }}
  • Account: {{ $employee->bank_account_number ?? '-' }}
Attendance This Month
@php $currentMonth = \Carbon\Carbon::now(); $startOfMonth = $currentMonth->copy()->startOfMonth(); $endOfMonth = $currentMonth->copy()->endOfMonth(); // Get attendance data for current month $attendances = \App\Models\Attendance::where('employee_id', $employee->id) ->whereBetween('in_at', [$startOfMonth, $endOfMonth]) ->whereNotNull('out_at') ->get() ->groupBy(function ($item) { return \Carbon\Carbon::parse($item->in_at)->format('Y-m-d'); }) ->map(function ($dayAttendances) { return $dayAttendances->sum('working_hours'); }); $daysInMonth = $startOfMonth->daysInMonth; $firstDayOfWeek = $startOfMonth->dayOfWeek; @endphp
{{ $currentMonth->format('F Y') }}
{{ count($attendances) }} days worked
Sun
Mon
Tue
Wed
Thu
Fri
Sat
@for ($i = 0; $i < $firstDayOfWeek; $i++)
@endfor @for ($day = 1; $day <= $daysInMonth; $day++) @php $currentDate = $startOfMonth->copy()->day($day); $dateString = $currentDate->format('Y-m-d'); $hours = $attendances->get($dateString, 0); // Calculate intensity (0-4 scale) $intensity = 0; if ($hours > 0) { if ($hours >= 10) { $intensity = 4; } elseif ($hours >= 8) { $intensity = 3; } elseif ($hours >= 6) { $intensity = 2; } else { $intensity = 1; } } $isToday = $currentDate->isToday(); $isFuture = $currentDate->isFuture(); @endphp
{{ $day }}
@endfor
Less
More
Address Information

{{ $employee->permanent_address ?? '-' }}

{{ $employee->current_address ?? '-' }}

Documents
@if ($employee->nic_file) @else

No file uploaded

@endif
@if ($employee->profile_picture) @else

No file uploaded

@endif
@can('view_promotion_management')
Promotion History
@if ($employee->promotions->isEmpty())

No promotions found for this employee.

@else
@foreach ($employee->promotions as $index => $promo) @endforeach
# Effective Basic Effective Allowance Total Increment Increment Basic Increment Allowance New Total Employment Type Designation Department Note Created By Date
{{ $index + 1 }} {{ number_format($promo->current_basic, 2) }} {{ number_format($promo->current_allowance, 2) }} {{ number_format($promo->total_increment, 2) }} {{ number_format($promo->increment_basic, 2) }} {{ number_format($promo->increment_allowance, 2) }} {{ number_format($promo->new_total_salary, 2) }} {{ $promo->employmentType?->name ?? '-' }} {{ $promo->designation?->name ?? '-' }} {{ $promo->department?->name ?? '-' }} {{ $promo->note ?? '-' }} {{ $promo->creator?->name ?? '-' }} {{ $promo->created_at->format('Y-m-d') }}
@endif
@endcan @can('view_salary_advanced_management')
Salary Advance Requests
@if ($employee->salaryAdvances->isEmpty())

No salary advance requests found.

@else
@foreach ($employee->salaryAdvances as $index => $advance) @endforeach
# Amount (LKR) Status Request Date Requested By Approved Date Approved By Note
{{ $index + 1 }} {{ number_format($advance->amount, 2) }} @switch($advance->status) @case(0) Pending @break @case(1) Approved @break @case(2) Rejected @break @endswitch {{ $advance->request_date }} {{ $advance->requestedBy?->name ?? '-' }} {{ $advance->approved_date ?? '-' }} {{ $advance->approvedBy?->name ?? '-' }} {{ $advance->note ?? '-' }}
@endif
@endcan @can('view_leave_management')
Leave Requests
@forelse($employee->leaves as $leave) @empty @endforelse
ID Days Status Requested Date Requested By Responded Date Responded By
{{ $leave->id }} @foreach ($leave->leaveDates->sortBy('requesting_date') as $date) {{ \Carbon\Carbon::parse($date->requesting_date)->format('d M Y') }} @endforeach @switch($leave->status) @case(0) Pending @break @case(1) Approved @break @case(2) Rejected @break @endswitch {{ $leave->requested_date }} {{ $leave->requester?->name ?? 'N/A' }} {{ $leave->responded_date ?? '-' }} {{ $leave->responder?->name ?? 'N/A' }}
No leaves found.
@endcan