@extends('layouts.app') @section('title', __('Cycles and emails')) @section('content')

{{ __('Cycles and emails') }}

{{ __('Open a cycle, create its reviews, and see the notification emails the portal sent.') }}

@if (session('problems')) @endif

{{ __('New cycle') }}

@csrf
{{ __('Section weights') }}
{{ __('Fixed for every employee') }}
40 + 50 + 10 = 100

{{ trans('Employees ready to be appraised (full reporting line):') }} {{ $ready }}

{{ __('Appraisal cycles') }}

@if ($cycles->isEmpty()) @else
@foreach ($cycles as $c) @endforeach
{{ __('Year') }}{{ __('Status') }}{{ __('Reviews') }}{{ __('Completed') }}{{ __('Actions') }}
{{ $c->year }} {{ ['draft' => __('Draft'), 'open' => __('Open'), 'closed' => __('Closed')][$c->status->value] }} {{ $c->reviews_count }} {{ $c->completed_count }}
@if ($c->status->value !== 'closed')
@csrf
@endif @if ($c->status->value === 'draft')
@csrf
@elseif ($c->status->value === 'open')
@csrf
@endif
@endif

{{ __('Notification log') }}

{{ __('Copies of the emails sent') }}
@forelse ($emails as $n) @php($subject = $people[$n->data['employee_id'] ?? 0] ?? null)
{{ ($n->data['type'] ?? '') === 'ready' ? __('Appraisal ready for your review:') : __('Appraisal completed:') }} {{ $subject?->name }}
{{ __('To') }} {{ $n->notifiable?->name }} · {{ $n->created_at->translatedFormat('j M Y, H:i') }}
@empty @endforelse {{ $emails->links() }}
@endsection