@extends('backoffice.layout.master') @section('setSectionTitle', __('Dashboard')) @section('setContent') @if(session('auth_session.role') === 'CANDIDATE' && isset($candidate))

{{ __('Benvenuto, :name!', ['name' => $candidate->first_name]) }}

{{ __('Ecco un riepilogo delle tue attività sulla piattaforma') }}

{{ $profileCompleteness }}%
{{ __('Profilo Completo') }}

{{ $stats['active_applications'] }}

{{ __('Candidature Attive') }}

{{ $stats['enrolled_courses'] }}

{{ __('Corsi Iscritti') }}

{{ $stats['new_jobs'] }}

{{ __('Nuove Offerte (7gg)') }}

{{ $stats['unread_messages'] }}

{{ __('Conversazioni Attive') }}

@if(!empty($alerts))
@foreach($alerts as $alert) @endforeach
@endif
@if($recentApplications->count() > 0)
{{ __('Ultime Candidature') }}
{{ __('Vedi tutte') }}
@foreach($recentApplications as $application)
{{ $application->refJob->position }}

{{ $application->refJob->refOrganization->name }} @if($application->refJob->refJobsCategory) {{ $application->refJob->refJobsCategory->name }} @endif

{{ $application->created_at->diffForHumans() }}
@endforeach
@endif @if($enrolledCourses->count() > 0)
{{ __('I Miei Corsi') }}
{{ __('Vedi tutti') }}
@foreach($enrolledCourses as $enrollment)
{{ $enrollment->refSessionCourse->refCourse->name }}
{{ $enrollment->refSessionCourse->refCourse->refOrganization->name }}
{{ $enrollment->progress }}%
{{ $enrollment->completed_modules }}/{{ $enrollment->total_modules }} {{ __('moduli completati') }}
@endforeach
@endif @if($recommendedJobs->count() > 0)
{{ __('Offerte Consigliate per Te') }}
{{ __('Vedi tutte') }}
@foreach($recommendedJobs as $job)
{{ $job->position }}
@if($job->created_at->gte(Carbon\Carbon::now()->subDays(3))) {{ __('Nuovo') }} @endif

{{ $job->refOrganization->name }} @if($job->refOrganizationsSite) {{ $job->refOrganizationsSite->refAddress->city ?? '' }} @endif

@if($job->refJobsCategory) {{ $job->refJobsCategory->name }} @endif
{{ $job->created_at->diffForHumans() }}
@endforeach
@endif
@if($latestNews->count() > 0)
{{ __('Ultime Notizie') }}
{{ __('Vedi tutte') }}
@foreach($latestNews as $news)
{{ Str::limit($news->title, 60) }}

{{ Str::limit($news->content, 100) }}

{{ $news->refExpert->first_name }} {{ $news->refExpert->last_name }} {{ $news->created_at->diffForHumans() }}
@endforeach
@endif
{{-- EXPERT DASHBOARD --}} @elseif(session('auth_session.role') === 'EXPERT' && isset($expert))

{{ __('Benvenuto, :name!', ['name' => $expert->first_name]) }}

{{ __('Panoramica della tua attività come esperto') }}

{{ $stats['total_candidates'] }}

{{ __('Candidati Seguiti') }}

{{ $stats['total_news'] }}

{{ __('News Pubblicate') }}

{{ $stats['countries_interests'] }}

{{ __('Paesi di Interesse') }}

{{ $stats['export_sectors'] }}

{{ __('Settori Export') }}

@if($recentCandidates->count() > 0)
{{ __('Ultimi Candidati') }}
{{ __('Vedi tutti') }}
@foreach($recentCandidates as $candidate)
{{ $candidate->first_name }} {{ $candidate->last_name }}
{{ $candidate->refUser->email }}
{{ $candidate->created_at->diffForHumans() }}
@endforeach
@endif
@if($recentNews->count() > 0)
{{ __('Ultime News') }}
{{ __('Vedi tutte') }}
@foreach($recentNews as $news)
{{ $news->title }}
{{ $news->created_at->format('d/m/Y H:i') }}
@endforeach
@endif
{{-- BODY DASHBOARD --}} @elseif(session('auth_session.role') === 'ORGANIZATION_USER' && isset($organization) && $organization->type === 'BODY')

{{ __('Benvenuto, :name!', ['name' => $organization->name]) }}

{{ __('Gestione ente formativo') }}

{{ $stats['total_courses'] }}

{{ __('Corsi Totali') }}

{{ $stats['active_sessions'] }}

{{ __('Sessioni Attive') }}

{{ $stats['total_students'] }}

{{ __('Corsisti') }}

{{ $stats['total_enrollments'] }}

{{ __('Iscrizioni Totali') }}

@if($recentCourses->count() > 0)
{{ __('Corsi Recenti') }}
{{ __('Vedi tutti') }}
@foreach($recentCourses as $course)
{{ $course->name }}
{{ $course->ref_courses_session_subscriptions_count }} {{ __('iscritti') }}
{{ $course->status }}
@endforeach
@endif
@if($recentEnrollments->count() > 0)
{{ __('Ultime Iscrizioni') }}
@foreach($recentEnrollments as $enrollment)
{{ $enrollment->refCandidate->first_name }} {{ $enrollment->refCandidate->last_name }}
{{ $enrollment->refSessionCourse->refCourse->name }}
{{ $enrollment->created_at->diffForHumans() }}
@endforeach
@endif
{{-- COMPANY DASHBOARD --}} @elseif(session('auth_session.role') === 'ORGANIZATION_USER' && isset($organization) && $organization->type === 'COMPANY')

{{ __('Benvenuto, :name!', ['name' => $organization->name]) }}

{{ __('Gestione offerte di lavoro') }}

{{ $stats['total_jobs'] }}

{{ __('Offerte Totali') }}

{{ $stats['active_jobs'] }}

{{ __('Offerte Attive') }}

{{ $stats['pending_jobs'] }}

{{ __('In Approvazione') }}

{{ $stats['total_applications'] }}

{{ __('Candidature Ricevute') }}

@if($recentJobs->count() > 0)
{{ __('Offerte Recenti') }}
{{ __('Vedi tutte') }}
@foreach($recentJobs as $job)
{{ $job->position }}
{{ $job->ref_candidates_jobs_subscriptions_count }} {{ __('candidature') }}
{{ $job->status }}
@endforeach
@endif
@if($recentApplications->count() > 0)
{{ __('Ultime Candidature') }}
@foreach($recentApplications as $application)
{{ $application->refCandidate->first_name }} {{ $application->refCandidate->last_name }}
{{ $application->refJob->position }}
{{ $application->created_at->diffForHumans() }}
@endforeach
@endif
{{-- ADMINISTRATOR DASHBOARD --}} @elseif(session('auth_session.role') === 'ADMINISTRATOR' && isset($stats))

{{ __('Dashboard Amministratore') }}

{{ __('Panoramica generale della piattaforma') }}

{{ $stats['total_candidates'] }}

{{ __('Candidati') }}

{{ $stats['total_companies'] }}

{{ __('Aziende') }}

{{ $stats['total_bodies'] }}

{{ __('Enti Formativi') }}

{{ $stats['total_experts'] }}

{{ __('Esperti') }}

{{ $stats['total_jobs'] }}

{{ __('Offerte di Lavoro') }}

{{ $stats['total_courses'] }}

{{ __('Corsi Formativi') }}

{{ $stats['pending_jobs'] }}

{{ __('Job Pending') }}

{{ $stats['pending_courses'] }}

{{ __('Corsi Pending') }}
@if($recentCandidates->count() > 0)
{{ __('Ultimi Candidati') }}
{{ __('Tutti') }}
@foreach($recentCandidates->take(5) as $candidate)
{{ $candidate->first_name }} {{ $candidate->last_name }}
{{ $candidate->refUser->email }}
{{ $candidate->created_at->diffForHumans() }}
@endforeach
@endif
@if($pendingJobs->count() > 0)
{{ __('Job da Approvare') }}
@foreach($pendingJobs as $job)
{{ $job->position }}
{{ $job->refOrganization->name }}
@endforeach
@endif
@if($pendingCourses->count() > 0)
{{ __('Corsi da Approvare') }}
@foreach($pendingCourses as $course)
{{ $course->name }}
{{ $course->refOrganization->name }}
@endforeach
@endif
{{-- DEFAULT DASHBOARD --}} @else

{{ __('Dashboard') }}

{{ __('Benvenuto nella tua area riservata') }}

@endif @endsection