@extends('admin.layouts.app') @section('title','Edit Paper Authors') @section('page-title','Edit Paper Authors') @section('page-subtitle',$paper->paper_code) @section('content') @if($errors->any())
@endif @php $principal = $paper->authors->firstWhere('author_order', 1) ?? $paper->authors->first(); $coAuthors = $paper->authors->where('author_order', '>', 1)->sortBy('author_order')->values()->map(fn ($a) => [ 'first_name' => $a->first_name, 'other_name' => $a->other_name, 'last_name' => $a->last_name, 'email' => $a->email, 'phone' => $a->phone, 'affiliation' => $a->affiliation, ])->all(); @endphp
@csrf @method('PUT')
Principal author: {{ $paper->user?->name }} ({{ $paper->user?->email }}) — formatted as {{ $paper->authorsDisplayLine() }}
@include('user.partials.paper-author-fields', [ 'coAuthors' => old('authors', $coAuthors), 'principalPhone' => old('principal_phone', $principal?->phone ?? $paper->user?->phone_number), 'principalAffiliation' => old('principal_affiliation', $principal?->affiliation ?? $paper->user?->affiliation), ])
Cancel
@endsection