From 4b2fddc813fd32fd1cd589792f733b0ec7fc3e45 Mon Sep 17 00:00:00 2001 From: Max Brokman Date: Sat, 28 Sep 2024 21:20:33 +0100 Subject: [PATCH] Fix: Waiting lists list not listing theory exame corrects (#3816) * fix: Show waiting list theory results correctly! * fix: Add some useful stuff to readme --- readme.md | 6 +++++ .../_waiting_lists_list.blade.php | 25 +++++++++++-------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/readme.md b/readme.md index 65ae40beec..68db0ddc1b 100644 --- a/readme.md +++ b/readme.md @@ -43,6 +43,12 @@ php artisan migrate php artisan cts:migrate:fresh # Optional if you require a CTS db for tests ``` +For local dev you may need to run +```shell +php artisan db:seed # sets up the roles and permissions +php artisan grant:superman # makes a test account an admin +``` + ### Compiling Frontend Assets Install all required dependencies ```shell diff --git a/resources/views/mship/waiting-lists/_waiting_lists_list.blade.php b/resources/views/mship/waiting-lists/_waiting_lists_list.blade.php index 9453f58e15..d3e83adf37 100644 --- a/resources/views/mship/waiting-lists/_waiting_lists_list.blade.php +++ b/resources/views/mship/waiting-lists/_waiting_lists_list.blade.php @@ -27,19 +27,24 @@ @endif {{$waitingList->pivot->created_at->format('d M Y')}} - - @if ($waitingList->isAtcList() && $waitingList->pivot->account->onRoster()) - {!! HTML::img("tick_mark_circle", "png", 20) !!} - @elseif($waitingList->isAtcList()) - {!! HTML::img("cross_mark_circle", "png", 20) !!} - @else + + @if($waitingList->isAtcList()) + + @if ($waitingList->pivot->account->onRoster()) + {!! HTML::img("tick_mark_circle", "png", 20) !!} + @else + {!! HTML::img("cross_mark_circle", "png", 20) !!} + @endif + + @else + N/A - @endif - + + @endif - @if (($record->waitingList->feature_toggles['check_cts_theory_exam'] ?? false) && $waitingList->pivot->theory_exam_passed) + @if (($waitingList->feature_toggles['check_cts_theory_exam'] ?? true) && $waitingList->pivot->theory_exam_passed) {!! HTML::img("tick_mark_circle", "png", 20) !!} - @elseif($record->waitingList->feature_toggles['check_cts_theory_exam'] ?? false) + @elseif($waitingList->feature_toggles['check_cts_theory_exam'] ?? true) {!! HTML::img("cross_mark_circle", "png", 20) !!} @else N/A