diff --git a/app/Http/Controllers/Judging/PrelimJudgingController.php b/app/Http/Controllers/Judging/PrelimJudgingController.php
index a6518eb..ef6ede4 100644
--- a/app/Http/Controllers/Judging/PrelimJudgingController.php
+++ b/app/Http/Controllers/Judging/PrelimJudgingController.php
@@ -22,7 +22,9 @@ class PrelimJudgingController extends Controller
$subscores = $prelimDefinition->scoringGuide->subscores()->orderBy('display_order')->get();
$published = $prelimDefinition->audition->hasFlag('seats_published');
- return view('judging.prelim_entry_list', compact('prelimDefinition', 'entries', 'subscores', 'published'));
+ $prelimScoresheets = PrelimScoreSheet::where('user_id', Auth::id())->get()->keyBy('entry_id');
+
+ return view('judging.prelim_entry_list', compact('prelimDefinition', 'entries', 'subscores', 'published', 'prelimScoresheets'));
}
public function prelimScoreEntryForm(Entry $entry)
diff --git a/resources/views/judging/prelim_entry_list.blade.php b/resources/views/judging/prelim_entry_list.blade.php
index c1feaa8..fdb8270 100644
--- a/resources/views/judging/prelim_entry_list.blade.php
+++ b/resources/views/judging/prelim_entry_list.blade.php
@@ -34,13 +34,22 @@
@endif
-{{-- @foreach($subscores as $subscore)--}}
-{{-- --}}
+ @foreach($subscores as $subscore)
+
+ @if($prelimScoresheets->has($entry->id))
+ {{ $prelimScoresheets[$entry->id]->subscores[$subscore->id]['score'] }}
+ @endif
{{-- @php--}}
-{{-- if( $x = Auth::user()->scoresForEntry($entry->id)) echo $x[$subscore->id]['score'];--}}
+{{-- dd($prelimScoresheets[$entry->id]->subscores[$subscore->id]['score']);--}}
+{{-- if( $x = $prelimScoresheets[$entry->id]) echo $x[$subscore->id]['score'];--}}
{{-- @endphp--}}
-{{-- --}}
-{{-- @endforeach--}}
+
+ @endforeach
+
+ @if($prelimScoresheets->has($entry->id))
+ {{ $prelimScoresheets[$entry->id]->created_at->setTimezone('America/Chicago')->format('m/d/y H:i') }}
+ @endif
+
{{-- --}}