@extends('layouts.app') @section('title', auth()->user()->isEmployee() ? 'My Performance Goals' : 'Performance Goals') @section('page-title','Performance') @section('content') @if(auth()->user()->isEmployee())
How Goals Work
Set your performance goals here at the start of each evaluation period. Draft goals are private to you. Set status to Active to share them with your manager and HR. When your evaluation is created, your active goals are automatically attached as the basis for your review. After receiving your evaluation, add a self-assessment to each goal to record your perspective.
@endif {{-- Filters --}}
@if(!auth()->user()->isEmployee())
@endif
{{-- Goal cards --}} @forelse($goals as $goal)
{{-- Header row --}}
@if(!auth()->user()->isEmployee())
{{ $goal->employee->full_name }} @if($goal->employee->department) · {{ $goal->employee->department->name }}@endif
@endif
{{ $goal->title }}
@if($goal->criterion)
Linked to: {{ $goal->criterion->name }}
@endif
{{ ucfirst($goal->priority) }} {{ $goal->status_label }} @if($goal->isOverdue()) Overdue @endif
{{-- Description --}} @if($goal->description)
{{ $goal->description }}
@endif {{-- Meta --}}
@if($goal->target_metric) Target: {{ $goal->target_metric }} @endif @if($goal->target_date) Due: {{ $goal->target_date->format('d M Y') }} @endif @if($goal->reviewed_at) Reviewed {{ $goal->reviewed_at->diffForHumans() }} @endif
{{-- Self-assessment --}} @if($goal->self_rating || $goal->self_comments)
My Self-Assessment @if($goal->self_rating) @for($s=1; $s<=5; $s++) @endfor ({{ $goal->self_rating }}/5) @endif
@if($goal->self_comments)
{{ $goal->self_comments }}
@endif
@endif {{-- Evaluator feedback --}} @if($goal->evaluator_comments)
Manager / HR Feedback
{{ $goal->evaluator_comments }}
@endif
{{-- Actions --}}
{{-- Employee: edit, self-assess, delete --}} @if(auth()->user()->isEmployee() && $goal->isEditable()) Edit @endif @if(auth()->user()->isEmployee()) @endif @if(auth()->user()->isEmployee() && $goal->isEditable() && !$goal->evaluations()->exists())
@csrf @method('DELETE')
@endif {{-- HR / Manager: review --}} @if(!auth()->user()->isEmployee()) @if($goal->employee && !auth()->user()->isEmployee()) Create Evaluation @endif @endif
{{-- Self-Assessment Modal --}} @if(auth()->user()->isEmployee()) @endif {{-- HR/Manager Review Modal --}} @if(!auth()->user()->isEmployee()) @endif @empty
{{ auth()->user()->isEmployee() ? 'You have not set any performance goals yet' : 'No goals found' }}
{{ auth()->user()->isEmployee() ? 'Click "Add My Goal" to set your first goal for this evaluation period.' : 'No goals match the current filters.' }}
@if(auth()->user()->isEmployee()) @endif
@endforelse {{ $goals->links('pagination::bootstrap-5') }} {{-- Add Goal Modal --}} @endsection @push('scripts') @endpush