@extends('dashboard.layouts.app') @section('title', 'Activités PTA - UAC eservices') @section('page-title', 'Plan de Travail Annuel') @section('breadcrumb') @endsection @section('content')

Activités du Plan de Travail Annuel

Gestion et suivi des activités PTA

@can('create', \App\Models\ActivitePta::class) Créer une activité @endcan
@if($activites->count() > 0)
@foreach($activites as $activite)
{{ $activite->titre }}

{{ Str::limit($activite->description, 100) }}

{{ $activite->statut }}
Début prévu
{{ $activite->date_debut_prevue->format('d/m/Y') }}
Fin prévue
{{ $activite->date_fin_prevue->format('d/m/Y') }}
Créé par
{{ $activite->createur->name }}
Tâches ({{ $activite->taches->count() }})
@if(in_array(auth()->user()->role->nom, ['Administrateur', 'Chef de Service']) || $activite->taches()->where('responsable_id', auth()->id())->exists()) Voir détails @endif
@endforeach
{{-- Pagination --}} @else
Aucune activité PTA

Il n'y a encore aucune activité dans le plan de travail annuel.

@can('create', \App\Models\ActivitePta::class) Créer la première activité @endcan
@endif
@if(auth()->user()->role->nom === 'Agent') @php $mesTaches = \App\Models\Tache::where('responsable_id', auth()->id()) ->with('activitePta') ->latest() ->get(); @endphp @if($mesTaches->count() > 0)

Mes Tâches Assignées

@foreach($mesTaches as $tache)

{{ $tache->description }}

{{ $tache->activitePta->titre }}
Échéance: {{ $tache->date_limite->format('d/m/Y') }}
{{ $tache->statut }}
@csrf @method('PATCH')
@endforeach
@endif @endif @endsection