@extends('welcome.welcome-layout') @section('style') @endsection @section('content') @foreach($roleHierarchy as $roleH) @php $role = $data[$roleH->role_id] ?? null; $total = 0; @endphp @continue(!$role) @if($role->getActiveEmployeesCount() > 0) @php $homeId = $employee?->work_place ?? null; // $activeEmployees = $role->getActiveEmployees($roleH->employeeRole?->company_id, $role['id'], $homeId, $employeeIds); $activeEmployees = $role->getActiveEmployees($roleH->employeeRole?->company_id, $role['id'], $homeId); @endphp @if(count($activeEmployees) > 0)

{{ $roleH->employeeRole?->name }}

{{--

Responsible for the overall leadership and operation of the home, ensuring high standards of care, compliance and team support.

--}}

{{ $roleH->employeeRole->description ?? '' }}

{{-- @foreach($role->getActiveEmployees($roleH->employeeRole?->company_id, $role['id'], $homeId,$employeeIds) as $emps) --}} @foreach($role->getActiveEmployees($roleH->employeeRole?->company_id, $role['id'], $homeId) as $emps)
@if(isset($emps['employee_pic']) && ($emps['employee_pic']!=='') && (file_exists(public_path('crm/employee/'.$emps['employee_pic'])))) Team Member @else @endif
{{$emps['name']}}

{{ $roleH->employeeRole?->name }}

{{ $emps->home?->name }}

@endforeach
@endif @endif @endforeach @endsection