@extends('layouts.dashboard') @section('nav-top-left') @foreach (Auth::user()->getActiveRolesForCall($call) as $role)
{{ $role->view_name }}
@endforeach
Advisory Board
Advisory Board Evaluation
@endsection @section('nav-bottom-left') @endsection @section('content') @php $isFinalized = $call->advisory_board_is_finalized ?? false; $canMakeSelection = ($canMakeSelection ?? true) && !$isFinalized; $columns = []; if ($canMakeSelection) { $columns[] = ['label' => '', 'class' => 'list-box--inner---list----checkbox', 'style' => 'text-align:center', 'cell' => fn ($p) => '
' . 'selectedByAdvisory !== null ? ' checked' : '') . '>' . '
']; } $rowClass = function ($p) { return $p->selectedByAdvisory !== null ? 'selectedByAdvisory advisory-area' : 'advisory-area'; }; $headerClasses = 'advisory-area'; $rowTitle = function ($p) { return match (rescue(fn () => $p->panelResult(), null)) { 'not_rejected' => 'The Proposal is Passed', 'rejected' => 'The Proposal is Rejected', default => '', }; }; $columns = array_merge($columns, [ ['label' => 'Proposal title', 'class' => 'list-box--inner---list----project', 'value' => fn ($p) => $p->title ?? ''], ['label' => 'Applicant', 'class' => 'list-box--inner---list----person', 'value' => fn ($p) => trim(($p->applicant?->lastname ?? '') . ' ' . ($p->applicant?->firstname ?? ''))], ['label' => 'Scientific Area', 'class' => 'list-box--inner---list----scientific_area', 'value' => fn ($p) => $p->primary_domain_name_en ?? ''], ['label' => 'Organisation Info', 'class' => 'list-box--inner---list----percentage', 'value' => fn ($p) => $p->applicant?->organization_info ?? ''], ['label' => 'Total Score', 'title' => fn ($p) => collect($p->panelEvaluation?->scores_json ?? []) ->map(fn ($v, $k) => ucwords(str_replace('_', ' ', $k)) . ': ' . ($v ?? '')) ->implode("\n"), 'class' => 'list-box--inner---list----total', 'style' => 'text-align:center', 'value' => fn ($p) => $p->panelEvaluation ? (int) round($p->panelEvaluation->total_score) : null], ['label' => 'Actions', 'class' => 'list-box--inner---list----actions', 'cell' => fn ($p) => '
' . ($p->panelEvaluation?->submission_files?->hash_id ? '' : ''). '
', ], ]); @endphp @if ($isFinalized)
The selection for this call have been finalized. You can notify all applicants. @if ($lastNotified) Applicants last informed on {{ $lastNotified->format('d/m/Y') }} at {{ $lastNotified->format('H:i') }} @endif
@endif @if ($proposals && $proposals->count() > 0) @if ($canMakeSelection)
{{-- Confirmation modal --}} @endif @else
There are no proposals. Please check back later.
@endif @endsection @section('javascripts') @if ($isFinalized) @endif @if ($canMakeSelection) @endif @endsection