@extends('layouts.app') @section('title', __('Review')) @section('content') @php $employee = $review->employee; $backUrl = $role === null ? route('admin.reviews.index') : route('reviews.index'); $done = collect($sections)->firstWhere('mode', 'edit'); $answered = $done['answered'] ?? 0; $questionCount = $done['total'] ?? 0; $complete = $questionCount > 0 && $answered === $questionCount; $nextLabel = match ($role?->value) { 'team_lead' => __('Submit to department head'), 'department_head' => __('Submit to HR'), default => __('Complete review'), }; @endphp