@extends('layouts.admin') @section('page-title') Liste du personnel ménage @endsection @section('page-subtitle') Gestion et suivi du personnel de ménage @endsection @section('styles') @endsection @section('content')
@php $isAdmin = false; if (Auth::user()->role === 'admin') { $adminRole = DB::table('admins') ->where('user_id', Auth::user()->id) ->value('admin_role'); $isAdmin = ($adminRole === 'admin'); } @endphp @if($isAdmin)
@endif
@if($isAdmin) @endif
@if(isset($workers) && count($workers) > 0) @foreach($workers as $worker)
@if($worker->is_manager)
@endif
{{ strtoupper(substr($worker->name ?? '', 0, 2)) }}

{{ $worker->name ?? 'N/A' }}

{{ $worker->is_active ? 'Actif' : 'Inactif' }}
Type Personnel ménage
@if($worker->phone)
Téléphone {{ $worker->phone }}
@endif @if($worker->email)
Email {{ $worker->email }}
@endif
@if($isAdmin) @endif
@endforeach @else

Aucun personnel de ménage ne correspond à vos critères de recherche.

@endif
@if($isAdmin) @endif @endsection @section('scripts') @endsection