diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index dc551f4..b9f93c6 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers; +use App\Models\School; use App\Services\Invoice\InvoiceDataService; use Illuminate\Support\Facades\Auth; @@ -35,8 +36,9 @@ class DashboardController extends Controller if (count($possibilities) < 1) { return view('schools.create'); } + $schools = School::orderBy('name')->get(); - return view('dashboard.select_school', ['possibilities' => $possibilities]); + return view('dashboard.select_school', ['possibilities' => $possibilities, 'schools' => $schools]); } public function my_invoice() @@ -46,6 +48,7 @@ class DashboardController extends Controller } $invoiceData = $this->invoiceService->allData(Auth::user()->school_id); $school = Auth::user()->school; + return view('dashboard.invoice', compact('school', 'invoiceData')); } } diff --git a/resources/views/dashboard/select_school.blade.php b/resources/views/dashboard/select_school.blade.php index 47a31b5..4d9820a 100644 --- a/resources/views/dashboard/select_school.blade.php +++ b/resources/views/dashboard/select_school.blade.php @@ -1,48 +1,65 @@ -@php use Illuminate\Support\Facades\Auth; @endphp + @php use Illuminate\Support\Facades\Auth; @endphp @php $school = Auth::user()->school; @endphp Choose School - -{{-- --}} -
+
- - Choose your school - - Based on your email address, one of these schools may be yours - - - - - @foreach($possibilities as $possibility) - @php $school = $possibility->school; @endphp - -
- @csrf - @method('PATCH') - - - - - {{ $school->name }} - {{ $school->city }}, {{ $school->state }} - - Choose - -
+ Existing Schools +
    + @foreach($schools as $school) +
  • {{ $school->name }}
  • @endforeach - - - Create new school - My school isn't listed - - Create new school - - +
+ +
+ + + Choose your school + + Based on your email address, one of these schools may be yours + + + + + @foreach($possibilities as $possibility) + @php $school = $possibility->school; @endphp + +
+ @csrf + @method('PATCH') + + + + + {{ $school->name }} + {{ $school->city }}, {{ $school->state }} + + Choose + +
+ @endforeach + + + Create new school + + My school isn't listed
+
+
+ Create new school +
+ + Please don't duplicate a school that exists in the system. If your school is listed to the left, but you don't have the option + to add it, please contact {{ auditionSetting('organizerName') }} and ask them to add you to that school. + +
+
+
+
+