@extends('layouts.app') @section('title', 'Visiting') @section('title-flex')
Member | Rating | @foreach($areas as $a){{ $a->name }} | @endforeach|
---|---|---|---|
@can('view', $visitingEndorsement->user) {{ $visitingEndorsement->user->name }} ({{ $visitingEndorsement->user->id }}) @else {{ $visitingEndorsement->user->name }} ({{ $visitingEndorsement->user->id }}) @endcan | {{ $visitingEndorsement->ratings->whereNotNull('vatsim_rating')->first()->name }} | @foreach($areas as $a) @php $count = 0; @endphp @foreach($visitingEndorsement->areas as $endorsedArea) @if($endorsedArea->id == $a->id) @php $count++; @endphpApproved {{-- Display the MASC endorsements connected to this area --}} @foreach($endorsedArea->ratings->whereNull('vatsim_rating') as $areaRating) @foreach($visitingEndorsement->user->endorsements->where('type', 'MASC')->where('revoked', false)->where('expired', false) as $mascEndorsement) @if($areaRating->id == $mascEndorsement->ratings->first()->id) {{ $areaRating->name }} @endif @endforeach @endforeach | @endif @endforeach @if(!$count)@endif @endforeach |