Add link to recaps to user dashboard

This commit is contained in:
Matt Young 2024-11-05 12:19:36 -06:00
parent 8a8ae44617
commit c9fbb71eb9
2 changed files with 14 additions and 1 deletions

View File

@ -5,6 +5,7 @@ namespace App\Http\Controllers;
use App\Actions\Entries\GetEntrySeatingResult; use App\Actions\Entries\GetEntrySeatingResult;
use App\Actions\Tabulation\CalculateEntryScore; use App\Actions\Tabulation\CalculateEntryScore;
use App\Actions\Tabulation\RankAuditionEntries; use App\Actions\Tabulation\RankAuditionEntries;
use App\Models\AuditionFlag;
use App\Models\School; use App\Models\School;
use App\Services\Invoice\InvoiceDataService; use App\Services\Invoice\InvoiceDataService;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
@ -48,8 +49,9 @@ class DashboardController extends Controller
$ranks[$entry->id] = $auditionResults->firstWhere('id', $entry->id)->raw_rank; $ranks[$entry->id] = $auditionResults->firstWhere('id', $entry->id)->raw_rank;
} }
} }
$showRecapLink = AuditionFlag::where('flag_name', 'seats_published')->count() > 0;
return view('dashboard.dashboard', compact('entries', 'scores', 'results', 'ranks')); return view('dashboard.dashboard', compact('entries', 'scores', 'results', 'ranks', 'showRecapLink'));
} }
public function my_school() public function my_school()

View File

@ -27,6 +27,13 @@
</x-card.list.row> </x-card.list.row>
</a> </a>
@endif @endif
@if($showRecapLink)
<a href="{{ route('recap.selectAudition') }}">
<x-card.list.row class="hover:bg-gray-200">
Audition Score Recaps
</x-card.list.row>
</a>
@endif
</x-card.list.body> </x-card.list.body>
</x-card.card> </x-card.card>
</div> </div>
@ -39,6 +46,10 @@
</div> </div>
@endif @endif
<div>
</div>
</div> </div>
</x-layout.app> </x-layout.app>