diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php
index 3e04766..8ece8e6 100644
--- a/app/Http/Controllers/DashboardController.php
+++ b/app/Http/Controllers/DashboardController.php
@@ -2,10 +2,6 @@
namespace App\Http\Controllers;
-use App\Actions\Entries\GetEntrySeatingResult;
-use App\Actions\Tabulation\CalculateEntryScore;
-use App\Actions\Tabulation\RankAuditionEntries;
-use App\Models\AuditionFlag;
use App\Models\School;
use App\Services\Invoice\InvoiceDataService;
use Illuminate\Support\Facades\Auth;
@@ -28,33 +24,8 @@ class DashboardController extends Controller
}
public function dashboard(
- CalculateEntryScore $scoreCalc,
- GetEntrySeatingResult $resultGenerator,
- RankAuditionEntries $ranker
) {
-
- // Info for director results report
- $entries = Auth::user()->entries;
- $entries = $entries->filter(function ($entry) {
- return $entry->audition->hasFlag('seats_published');
- });
- $entries = $entries->sortBy(function ($entry) {
- return $entry->student->full_name(true);
- });
- $scores = [];
- $results = [];
- $ranks = [];
- foreach ($entries as $entry) {
- $results[$entry->id] = $resultGenerator->getResult($entry);
- if (! $entry->hasFlag('no_show') && ! $entry->hasFlag('failed_prelim')) {
- $scores[$entry->id] = $scoreCalc->calculate('seating', $entry);
- $auditionResults = $ranker->rank('seating', $entry->audition);
- $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', 'showRecapLink'));
+ return view('dashboard.dashboard');
// return view('dashboard.dashboard');
}
diff --git a/app/Http/Controllers/Tabulation/SeatAuditionFormController.php b/app/Http/Controllers/Tabulation/SeatAuditionFormController.php
index a01e3ed..5a0411f 100644
--- a/app/Http/Controllers/Tabulation/SeatAuditionFormController.php
+++ b/app/Http/Controllers/Tabulation/SeatAuditionFormController.php
@@ -7,6 +7,7 @@ use App\Actions\Tabulation\RankAuditionEntries;
use App\Http\Controllers\Controller;
use App\Models\Audition;
use App\Models\Doubler;
+use App\Models\Entry;
use Illuminate\Http\Request;
class SeatAuditionFormController extends Controller
@@ -66,6 +67,14 @@ class SeatAuditionFormController extends Controller
);
}
+ public function declineSeat(Audition $audition, Entry $entry)
+ {
+ $entry->addFlag('declined');
+
+ return redirect()->route('seating.audition', ['audition' => $audition->id])->with('success',
+ $entry->student->full_name().' has declined '.$audition->name);
+ }
+
protected function pickRightPanel(Audition $audition, array $seatable)
{
if ($audition->hasFlag('seats_published')) {
diff --git a/resources/views/dashboard/dashboard.blade.php b/resources/views/dashboard/dashboard.blade.php
index 7eda747..cf0a19c 100644
--- a/resources/views/dashboard/dashboard.blade.php
+++ b/resources/views/dashboard/dashboard.blade.php
@@ -27,24 +27,24 @@
@endif
- @if($showRecapLink)
-
-
{{ $request->request }}
+