@extends('layouts.app') @section('title', __('Overview')) @section('content')

{{ __('Overview') }}

@if ($cycle){{ __('Appraisal cycle') }} {{ $cycle->year }} ยท {{ $cycle->isOpen() ? __('Open') : ($cycle->status->value === 'closed' ? __('Closed') : __('Draft')) }}@else{{ __('No cycle yet') }}@endif

{{ __('View reports') }}
@if (! $cycle || $total === 0)
{{ __('Go to cycles') }}
@else

{{ __('Where reviews are right now') }}

@foreach (\App\Enums\Stage::cases() as $s)
{{ $s->label() }}{{ $byStage[$s->value] }}
@endforeach

{{ __('By department') }}

@forelse ($departments as $d)
{{ $d->name }}{{ $d->reviews_done }}/{{ $d->reviews_total }}
@empty

{{ __('No data yet.') }}

@endforelse

{{ __('Completed reviews per department') }}

{{ __('Waiting on someone') }}

@if ($pending->isEmpty()) @else
@foreach ($pending as $r) @php($owner = match ($r->stage->value) { 'team_lead' => $r->teamLead, 'department_head' => $r->departmentHead, default => $r->hrReviewer }) @endforeach
{{ __('Employee') }}{{ __('Stage') }}{{ __('Waiting on') }}{{ __('Progress') }}
{{ $r->employee->name }}{{ $r->employee->job_title }}
{{ $owner->name }}
@endif
@endif @endsection