@if ($totals) @else @endif @foreach($data as $period => $item) @php $each = $item->getResultArray() @endphp @php $joined = $each["joined"]; $resigned = $each["resigned"]; $balance = $each["balance"]; $balanceStr = $each["balanceStr"]; @endphp @if ($totals) @else @endif @if ($totals) @continue @endif @foreach($each["joinedList"] as $j => $staff) {{-- @if ($j == $joined - 1 && $joined == $balance)--}} {{-- --}} {{-- @else--}} {{-- --}} {{-- @endif--}} @endforeach @foreach($each["resignedList"] as $j => $staff) {{-- @if ($j == $resigned - 1)--}} {{-- --}} {{-- @else--}} {{-- --}} {{-- @endif--}} @endforeach @endforeach
Period Joined LeftNo First name Last name Station Position DOJ DOT Reason for TerminationTotal
{{ $each["period"] }}+ {{ $joined }} -{{ $resigned }} {{ $balanceStr }} + {{ $joined }} -{{ $resigned }} {{ $balanceStr }}
{{ $j + 1 }} {{ $staff->first_name }} {{ $staff->last_name }} {{ getUserLocationAirport($staff) }} {{ getUserPositionName($staff) }} {{ $staff->doj }} +{{ $balance }}
{{ $j + 1 }} {{ $staff->first_name }} {{ $staff->last_name }} {{ getUserLocationAirport($staff) }} {{ getUserPositionName($staff) }} {{ $staff->resigned_date }} {{ $staff->termination_reason ? str_limit($staff->termination_reason, 60) : "" }} {{ $balanceStr }}