
<div class="modal-header">
    <h1 class="modal-title fs-6" id="exampleModalLabel"> <i class="fal fa-user me-1"></i> {{$head ?? ''}} </h1>
    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
    <div class="modal-form">
        <div class="form-group mb-3">
            <label for="" class="d-block mb-2"> {{ __('employees.name') }} <span style="color:red">*</span></label>
            <p class="form-control" >{{$employee->name ?? ''}}</p>
        </div>
        <div class="form-group mb-3">
            <label for="" class="d-block mb-2"> {{ __('employees.email') }} <span style="color:red">*</span></label>
            <p class="form-control" >{{$employee->email ?? ''}}</p>
        </div>
        <div class="form-group mb-3">
            <label for="" class="d-block mb-2"> {{ __('employees.phone') }} </label>
            <p class="form-control" >{{$employee->phoneCountry->country_key.$employee->phone ?? ''}}</p>
        </div>
        <div class="form-group mb-3">
            <div class="form-group mb-3">
                <label for="" class="d-block mb-2"> {{ __('users.role') }} </label>
                <p class="form-control" >{{__('users.roles.'.$employee->role)}}</p>
            </div>
        </div>
        @if($manager == $employee->role)
            <div class="form-group mb-3 modules_data">
                <label for="" class="d-block mb-2"> {{ __('employees.manager_id') }} <span style="color:red">*</span></label>
                <p class="form-control" >{{ $employee->manager->name ?? ''}}</p>
            </div>
        @endif


        <div class="form-group mb-3">
            <label for="" class="d-block mb-2"> {{ __('employees.sector_id') }} </label>
        </div>
        <div class="form-group mb-3 col-12 row">
            @foreach ($sectors as $row)
                <div class="col-lg-3">
                    <div class="form-group mt-3">
                        <div class="form-check">
                            <input class="form-check-input" type="checkbox" name="sector_id[]" disabled {{ in_array($row->id,$user_sectors) ? 'checked' : '' }} value="{{ $row->id }}" id="sector{{ $row->id }}">
                            <label class="form-check-label" for="sector{{ $row->id }}"> {{ $row->title }} </label>
                        </div>
                    </div>
                </div>
            @endforeach
        </div>

        <div class="col-lg-12 ">
            <label for="" class="d-block mb-2"> {{ __('users.Modules') }} </label>
            <div class="clearfix"></div>
            <div class="row">
                @foreach($modules as $key=> $group_modules)
                    <div class="col-lg-12">
                        <hr>
                        <h5 for="" class="d-block mb-2"> {{ __($key.'.head') }} </h5>
                    </div>
                    @foreach($group_modules as $row)
                        <div class="col-lg-3">
                            <div class="form-group mt-3">
                                <div class="form-check">
                                    <input class="form-check-input" type="checkbox" name="modules[]" disabled  {{ in_array($row['id'], $user_modules) ? 'checked' : '' }} value="{{ $row->id }}" id="modules{{ $row->id }}">
                                    <label class="form-check-label" for="modules{{ $row->id }}"> {{ $row['description'] }} </label>
                                </div>
                            </div>
                        </div>
                    @endforeach
                @endforeach
            </div>
        </div>
    </div>
</div>
