Compare commits

..

No commits in common. "9d7602c61d3851a41460cb93ecd690e41a6c12c5" and "115868bd8aaddcdc2a4e5fc5d83599dd49ced858" have entirely different histories.

23 changed files with 89 additions and 493 deletions

View File

@ -1,40 +0,0 @@
<?php
namespace App\Actions;
use App\Models\AuditionEtude;
use App\Models\Ensemble;
use App\Models\Instrument;
use Illuminate\Http\UploadedFile;
class UpdateEtude
{
public function __invoke(
Ensemble $ensemble,
Instrument $instrument,
int $set,
UploadedFile $file
): void {
$filename = $ensemble->name.' '.$instrument->instrument.' Set '.$set.'.pdf';
$filename = str_replace(' ', '_', $filename);
$path = $file->storeAs('/etudes', $filename, 'public');
$originalFilename = $file->getClientOriginalName();
$fileSize = $file->getSize();
AuditionEtude::updateOrCreate(
[
'ensemble_id' => $ensemble->id,
'instrument_id' => $instrument->id,
'set' => $set,
],
[
'ensemble_id' => $ensemble->id,
'instrument_id' => $instrument->id,
'set' => $set,
'file_path' => $path,
'original_filename' => $originalFilename,
'file_size' => $fileSize,
]
);
}
}

View File

@ -1,92 +0,0 @@
<?php
namespace App\Console\Commands;
use App\Models\AuditionEtude;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
class EtudesCleanup extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'etudes:cleanup {--dry-run : Show what would be deleted without actually deleting}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Clean up orphaned etude records and PDF files';
/**
* Execute the console command.
*/
public function handle(): int
{
$dryRun = $this->option('dry-run');
if ($dryRun) {
$this->info('Running in dry-run mode - no changes will be made');
}
$this->info('Starting etudes cleanup...');
$this->newLine();
// Part 1: Remove database records with missing PDF files
$this->info('Checking for database records with missing PDF files...');
$orphanedRecords = 0;
AuditionEtude::chunk(100, function ($etudes) use (&$orphanedRecords, $dryRun) {
foreach ($etudes as $etude) {
if (! Storage::disk('public')->exists($etude->file_path)) {
$this->warn("Missing file: {$etude->file_path} (Record ID: {$etude->id})");
$orphanedRecords++;
if (! $dryRun) {
$etude->delete();
}
}
}
});
if ($orphanedRecords > 0) {
$action = $dryRun ? 'would be' : 'were';
$this->info("{$orphanedRecords} orphaned database record(s) {$action} removed");
} else {
$this->info('✓ No orphaned database records found');
}
$this->newLine();
// Part 2: Remove PDF files not referenced in the database
$this->info('Checking for PDF files not referenced in the database...');
$referencedPaths = AuditionEtude::pluck('file_path')->toArray();
$allFiles = Storage::disk('public')->files('etudes');
$orphanedFiles = array_diff($allFiles, $referencedPaths);
if (count($orphanedFiles) > 0) {
foreach ($orphanedFiles as $file) {
$this->warn("Orphaned file: {$file}");
if (! $dryRun) {
Storage::disk('public')->delete($file);
}
}
$action = $dryRun ? 'would be' : 'were';
$this->info('✓ '.count($orphanedFiles)." orphaned file(s) {$action} removed");
} else {
$this->info('✓ No orphaned files found');
}
$this->newLine();
$this->info('Cleanup completed!');
return Command::SUCCESS;
}
}

View File

@ -2,11 +2,10 @@
namespace App\Http\Controllers\Admin;
use App\Actions\UpdateEtude;
use App\Http\Controllers\Controller;
use App\Http\Requests\EtudeUploadRequest;
use App\Models\AuditionedEnsemble;
use App\Models\AuditionEtude;
use App\Models\Ensemble;
use App\Models\Instrument;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
@ -29,7 +28,7 @@ class AuditionEtudeController extends Controller
public function create()
{
$instruments = Instrument::orderBy('score_order')->get();
$ensembles = Ensemble::all();
$ensembles = AuditionedEnsemble::all();
return view('admin.audition_etude.create', [
'instruments' => $instruments,
@ -40,18 +39,29 @@ class AuditionEtudeController extends Controller
/**
* Store a newly created resource in storage.
*/
public function store(EtudeUploadRequest $request, UpdateEtude $updater)
public function store(EtudeUploadRequest $request)
{
$updater(
Ensemble::find($request->ensemble_id),
Instrument::find($request->instrument_id),
$request->set,
$request->file('file_upload')
);
$instrument = Instrument::find($request->instrument_id);
$ensemble = AuditionedEnsemble::find($request->auditioned_ensemble_id);
$filename = $ensemble->name.' '.$instrument->instrument.' Set '.$request->set.'.pdf';
$filename = str_replace(' ', '_', $filename);
$path = $request->file('file_upload')->storeAs('etudes', $filename, 'public');
$originalFilename = $request->file('file_upload')->getClientOriginalName();
$fileSize = $request->file('file_upload')->getSize();
AuditionEtude::create([
'instrument_id' => $request->instrument_id,
'auditioned_ensemble_id' => $request->auditioned_ensemble_id,
'set' => $request->set,
'file_path' => $path,
'original_filename' => $originalFilename,
'file_size' => $fileSize,
]);
session([
'previous_instrument_id' => $request->instrument_id,
'previous_ensemble_id' => $request->ensemble_id,
'previous_auditioned_ensemble_id' => $request->auditioned_ensemble_id,
'previous_set' => $request->set,
]);

View File

@ -2,47 +2,16 @@
namespace App\Http\Controllers\Admin;
use App\Actions\UpdateEtude;
use App\Http\Controllers\Controller;
use App\Http\Requests\EtudeUploadRequest;
use App\Models\AuditionEtude;
use App\Models\Ensemble;
use App\Models\AuditionedEnsemble;
use App\Models\Instrument;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
class AuditionEtudeGridController extends Controller
{
public function index()
{
$ensembles = Ensemble::with('etudes')->get();
$ensembles = AuditionedEnsemble::all();
$instruments = Instrument::orderBy('score_order')->get();
return view('admin.audition_etude.grid', compact('ensembles', 'instruments'));
}
public function store(EtudeUploadRequest $request, UpdateEtude $updater)
{
$updater(
Ensemble::find($request->ensemble_id),
Instrument::find($request->instrument_id),
$request->set,
$request->file('file_upload')
);
return redirect()->route('admin.etude-grid')->with('success', 'Etude updated successfully.');
}
public function destroy(Request $request)
{
$validated = $request->validate([
'etude_id' => 'required|integer|exists:audition_etudes,id',
]);
$etude = AuditionEtude::findOrFail($validated['etude_id']);
$etude->delete();
return redirect()->route('admin.etude-grid')->with('success', 'Etude deleted successfully.');
}
}

View File

@ -2,7 +2,7 @@
namespace App\Http\Controllers;
use App\Models\Ensemble;
use App\Models\AuditionedEnsemble;
use App\Models\Instrument;
use App\Services\AuditionEtudeService;
@ -10,7 +10,7 @@ class EtudesController extends Controller
{
public function __invoke(AuditionEtudeService $service)
{
$ensembles = Ensemble::all();
$ensembles = AuditionedEnsemble::all();
$instruments = Instrument::has('etudes')->withCount('etudes')->get();
$schoolYear = $service->getActiveSchoolYear();
$currentSet = [];
@ -23,6 +23,6 @@ class EtudesController extends Controller
->get()->keyBy('instrument_id');
}
return view('etudes', compact('ensembles', 'schoolYear', 'currentSet', 'instruments', 'etudes'));
return view('etudes', compact('ensembles', 'schoolYear', 'currentSet', 'instruments','etudes'));
}
}

View File

@ -2,7 +2,7 @@
namespace App\Http\Requests;
use App\Models\Ensemble;
use App\Models\AuditionedEnsemble;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
@ -25,18 +25,18 @@ class EtudeUploadRequest extends FormRequest
{
return [
'ensemble_id' => ['required', 'exists:ensembles,id'],
'auditioned_ensemble_id' => ['required', 'exists:auditioned_ensembles,id'],
'instrument_id' => ['required', 'exists:instruments,id'],
'set' => [
'required',
'numeric',
'min:1',
Rule::unique('audition_etudes')
->where('ensemble_id', $this->ensemble_id)
->where('auditioned_ensemble_id', $this->auditioned_ensemble_id)
->where('instrument_id', $this->instrument_id),
function ($attribute, $value, $fail) {
/** @noinspection PhpUndefinedFieldInspection */
$ensemble = Ensemble::find($this->ensemble_id);
$ensemble = AuditionedEnsemble::find($this->auditioned_ensemble_id);
if ($ensemble && $value > $ensemble->set_count) {
$fail("The set number cannot exceed {$ensemble->set_count} for this ensemble.");
}

View File

@ -5,36 +5,21 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Support\Facades\Storage;
class AuditionEtude extends Model
{
protected $fillable = [
'instrument_id', 'ensemble_id', 'set', 'original_filename', 'file_path', 'file_size',
'instrument_id', 'auditioned_ensemble_id', 'set', 'original_filename', 'file_path', 'file_size',
];
protected static function booted(): void
{
static::deleting(function (AuditionEtude $etude) {
if ($etude->file_path) {
Storage::disk('public')->delete($etude->file_path);
}
});
}
public function instrument(): BelongsTo
{
return $this->belongsTo(Instrument::class);
}
public function ensemble(): BelongsTo
public function auditionedEnsemble(): BelongsTo
{
return $this->belongsTo(Ensemble::class);
}
public function getLinkToPDF()
{
return Storage::url($this->file_path);
return $this->belongsTo(AuditionedEnsemble::class);
}
protected function humanReadableFileSize(): Attribute

View File

@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class AuditionedEnsemble extends Model
{
protected $fillable = [
'name', 'set_count',
];
public function etudes(): HasMany
{
return $this->hasMany(AuditionEtude::class);
}
}

View File

@ -1,26 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Ensemble extends Model
{
protected $fillable = [
'name', 'set_count', 'abbreviation',
];
public function etudes(): HasMany
{
return $this->hasMany(AuditionEtude::class, 'ensemble_id');
}
public function getEtude(Instrument $instrument, int $set): ?AuditionEtude
{
return $this->etudes
->where('instrument_id', $instrument->id)
->where('set', $set)
->first();
}
}

View File

@ -2,19 +2,15 @@
namespace App\Services;
use App\Models\AuditionEtude;
use App\Models\Ensemble;
use App\Models\Instrument;
use App\Models\AuditionedEnsemble;
use Carbon\Carbon;
class AuditionEtudeService
readonly class AuditionEtudeService
{
protected int $startYear;
protected int $changeoverMonth;
protected array $etudeCache = [];
public function __construct()
{
$this->startYear = config('siteData.etude_start_year');
@ -66,14 +62,14 @@ class AuditionEtudeService
* Sets rotate annually based on the ensemble's set count.
* The rotation is calculated from the configured start year.
*
* @param Ensemble $ensemble The ensemble to get the set for
* @param AuditionedEnsemble $ensemble The ensemble to get the set for
* @param int|null $year Optional year. Defaults to current audition year.
* @return int The set number (1 to ensemble's set_count)
*
* @example
* getSetForEnsemble($ensemble, 2024) // Returns the set number for 2024
*/
public function getSetForEnsemble(Ensemble $ensemble, ?int $year = null): int
public function getSetForEnsemble(AuditionedEnsemble $ensemble, ?int $year = null): int
{
$year = $year ?? $this->getCurrentAuditionYear();
$setCount = $ensemble->set_count;
@ -81,29 +77,4 @@ class AuditionEtudeService
return ($yearDiff % $setCount) + 1;
}
/**
* Get the audition etude for a specific ensemble, instrument, and set combination.
*
* Results are cached in-memory for the duration of the request to avoid
* duplicate queries when called multiple times with the same parameters.
*
* @param Ensemble $ensemble The ensemble to get the etude for
* @param Instrument $instrument The instrument to get the etude for
* @param int $set The set number
* @return AuditionEtude|null The matching etude, or null if not found
*/
public function getEtude(Ensemble $ensemble, Instrument $instrument, int $set): ?AuditionEtude
{
$cacheKey = "{$ensemble->id}_{$instrument->id}_{$set}";
if (! isset($this->etudeCache[$cacheKey])) {
$this->etudeCache[$cacheKey] = AuditionEtude::where('instrument_id', $instrument->id)
->where('ensemble_id', $ensemble->id)
->where('set', $set)
->first();
}
return $this->etudeCache[$cacheKey];
}
}

View File

@ -36,14 +36,10 @@ class Admin extends Component
'name' => 'Audition Etudes',
'link' => route('admin.etudes.index'),
],
[
'name' => 'Audition Etude Grid',
'link' => route('admin.etude-grid'),
],
[
'name' => 'News Stories',
'link' => route('admin.news.index'),
],
]
];
}

View File

@ -1,61 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
// Rename the auditioned_ensembles table to ensembles
Schema::rename('auditioned_ensembles', 'ensembles');
// Update the foreign key on audition_etudes table
Schema::table('audition_etudes', function (Blueprint $table) {
// Drop the existing foreign key constraint
$table->dropForeign(['auditioned_ensemble_id']);
// Rename the column
$table->renameColumn('auditioned_ensemble_id', 'ensemble_id');
});
// Re-add the foreign key constraint with the new name
Schema::table('audition_etudes', function (Blueprint $table) {
$table->foreign('ensemble_id')
->references('id')
->on('ensembles')
->cascadeOnDelete();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
// Drop the foreign key before renaming
Schema::table('audition_etudes', function (Blueprint $table) {
$table->dropForeign(['ensemble_id']);
});
// Rename the column back
Schema::table('audition_etudes', function (Blueprint $table) {
$table->renameColumn('ensemble_id', 'auditioned_ensemble_id');
});
// Rename the table back to auditioned_ensembles
Schema::rename('ensembles', 'auditioned_ensembles');
// Re-add the original foreign key
Schema::table('audition_etudes', function (Blueprint $table) {
$table->foreign('auditioned_ensemble_id')
->references('id')
->on('auditioned_ensembles')
->cascadeOnDelete();
});
}
};

View File

@ -1,28 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('ensembles', function (Blueprint $table) {
$table->string('abbreviation')->nullable()->after('name');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('ensembles', function (Blueprint $table) {
$table->dropColumn('abbreviation');
});
}
};

View File

@ -0,0 +1,24 @@
<?php
namespace Database\Seeders;
use App\Models\AuditionedEnsemble;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class AuditionedEnsembleSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$defaults = [
['name' => 'High School', 'set_count' => 4],
['name' => 'Junior High', 'set_count' => 3],
['name' => 'Seventh Grade', 'set_count' => 1],
['name' => 'Jazz', 'set_count' => 3],
];
AuditionedEnsemble::insert($defaults);
}
}

View File

@ -1,23 +0,0 @@
<?php
namespace Database\Seeders;
use App\Models\Ensemble;
use Illuminate\Database\Seeder;
class EnsembleSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$defaults = [
['name' => 'High School', 'set_count' => 4, 'abbreviation' => 'HS'],
['name' => 'Junior High', 'set_count' => 3 , 'abbreviation' => 'JH'],
['name' => 'Seventh Grade', 'set_count' => 1, 'abbreviation' => '7th'],
['name' => 'Jazz', 'set_count' => 3, 'abbreviation' => 'Jazz'],
];
Ensemble::insert($defaults);
}
}

8
package-lock.json generated
View File

@ -5,7 +5,7 @@
"packages": {
"": {
"dependencies": {
"@tailwindplus/elements": "^1.0.21",
"@tailwindplus/elements": "^1.0.20",
"alpinejs": "^3.15.3"
},
"devDependencies": {
@ -1090,9 +1090,9 @@
}
},
"node_modules/@tailwindplus/elements": {
"version": "1.0.21",
"resolved": "https://registry.npmjs.org/@tailwindplus/elements/-/elements-1.0.21.tgz",
"integrity": "sha512-CShPoilDolGpzT9J4MVTCexOijwURW+MHGNMoS5ijiD2FVNk1XHFvEuy6mTeKQ5dOAYNLGwK3VjMOQ8io42H+Q==",
"version": "1.0.20",
"resolved": "https://registry.npmjs.org/@tailwindplus/elements/-/elements-1.0.20.tgz",
"integrity": "sha512-ka/4LlqzXmKjcoyRsKu8eBotl3KaDrMhdTr2+YDpjLj5Sy21FTIgg0gniDBPYTVZMFj6L82Cw4aNh2BJkjuRoQ==",
"license": "SEE LICENSE IN LICENSE.md"
},
"node_modules/@types/estree": {

View File

@ -15,7 +15,7 @@
"vite": "^7.0.7"
},
"dependencies": {
"@tailwindplus/elements": "^1.0.21",
"@tailwindplus/elements": "^1.0.20",
"alpinejs": "^3.15.3"
}
}

View File

@ -30,7 +30,7 @@
<x-form.form method="POST" action="{{ route('admin.etudes.store') }}" enctype="multipart/form-data"
x-data="{ selectedEnsemble: '', selectedInstrument: '', selectedSetNumber: '' }">
<div>
<x-form.select name="ensemble_id" x-model="selectedEnsemble">
<x-form.select name="auditioned_ensemble_id" x-model="selectedEnsemble">
<x-slot:label>Ensemble</x-slot:label>
<option value="">Select Ensemble...</option>
@foreach($ensembles as $ensemble)

View File

@ -1,12 +1,4 @@
<x-layout.admin x-data="{ ensemble: 'e', instrument: 'i', set: 's', ensemble_id: '', instrument_id: '', etude_link: '', existing_etude_id: '' }">
@include('admin.audition_etude.grid_update_form')
@if($errors->any())
@foreach($errors->all() as $error)
<x-alert>{{ $error }}</x-alert>
@endforeach
@endif
<x-layout.admin>
@foreach($ensembles as $ensemble)
<x-card class="mb-5">
<x-slot:header class="bg-brand-600!">{{ $ensemble->name }}</x-slot:header>
@ -22,47 +14,6 @@
@foreach($instruments as $instrument)
<tr class="outline-1 outline-black/5 dark:outline-white/1">
<x-table.td>{{ $instrument->instrument }}</x-table.td>
@for($n=1; $n<= $ensemble->set_count; $n++)
@if($ensemble->getEtude($instrument, $n))
<x-table.td>
<x-form.button
command="show-modal"
commandfor="etude-uploader"
@click="
ensemble = '{{ $ensemble->name }}';
ensemble_id = '{{ $ensemble->id }}';
instrument = '{{ $instrument->instrument }}';
instrument_id = '{{ $instrument->id }}';
set = {{ $n }};
etude_link = '{{ $ensemble->getEtude($instrument, $n)->getLinkToPDF() }}';
existing_etude_id = '{{ $ensemble->getEtude($instrument, $n)->id }}';"
>
{{ $ensemble->abbreviation }} - {{ $instrument->instrument }} - Set {{ $n }}
<br/>
<p class="italic text-xs font-light mt-2">Updated: {{ $ensemble->getEtude($instrument, $n)->updated_at->format('m/d/Y') }}</p>
</x-form.button>
</x-table.td>
@else
<x-table.td>
<x-form.button
command="show-modal"
commandfor="etude-uploader"
class="bg-red-600 hover:bg-red-500"
@click="
ensemble = '{{ $ensemble->name }}';
ensemble_id = '{{ $ensemble->id }}';
instrument = '{{ $instrument->instrument }}';
instrument_id = '{{ $instrument->id }}';
set = {{ $n }};
etude_link = '';
existing_etude_id = '';"
>
{{ $ensemble->abbreviation }} - {{ $instrument->instrument }} - Set {{ $n }}<br />
No Etude
</x-form.button>
</x-table.td>
@endif
@endfor
</tr>
@endforeach
</tbody>

View File

@ -1,56 +0,0 @@
<el-dialog>
<dialog id="etude-uploader" aria-labelledby="Upload Etude"
class="fixed inset-0 size-auto max-h-none max-w-none overflow-y-auto bg-transparent backdrop:bg-transparent">
<el-dialog-backdrop
class="fixed inset-0 bg-gray-500/75 transition-opacity data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in dark:bg-gray-900/50"></el-dialog-backdrop>
<div tabindex="0"
class="flex min-h-full items-end justify-center p-2 text-center focus:outline-none sm:items-center sm:p-0">
<el-dialog-panel
class="relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all data-closed:translate-y-4 data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in sm:my-8 sm:w-full sm:max-w-sm sm:p-6 data-closed:sm:translate-y-0 data-closed:sm:scale-95 dark:bg-gray-800 dark:outline dark:-outline-offset-1 dark:outline-white/10">
<x-form method="POST" action="{{ route('admin.etude-grid.store') }}" enctype="multipart/form-data">
<input type="hidden" name="ensemble_id" x-model="ensemble_id"/>
<input type="hidden" name="instrument_id" x-model="instrument_id"/>
<input type="hidden" name="set" x-model="set"/>
<div>
<div class="mt-1 text-center sm:mt-3">
<h3 id="dialog-title" class="text-base font-semibold text-gray-900 dark:text-white">
Update Etude
</h3>
<div class="mt-2 ">
<span x-text="ensemble"></span>
<span x-text="instrument"></span>
<span x-text="`Set ${set}`"></span>
<p x-show="etude_link">
<a x-bind:href="etude_link" class="underline text-blue-600">
View Existing Etude
</a>
</p>
</div>
</div>
</div>
<div class="mt-3">
<x-form.input name="file_upload" type="file" label="Etude PDF"/>
</div>
<div class="mt-5 sm:mt-6">
<button type="submit"
class="inline-flex w-full justify-center rounded-md bg-brand-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-brand-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-600 dark:bg-brand-500 dark:shadow-none dark:hover:bg-brand-400 dark:focus-visible:outline-brand-500">
Save Etude
</button>
</div>
</x-form>
<div class="mt-5 sm:mt-6" x-show="existing_etude_id">
<x-form method="DELETE" action="{{ route('admin.etude-grid.delete') }}">
<input type="hidden" name="etude_id" x-model="existing_etude_id">
<button type="submit"
class="inline-flex w-full justify-center rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-red-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-red-600 dark:bg-red-500 dark:shadow-none dark:hover:bg-red-400 dark:focus-visible:outline-red-500">
Remove Etude
</button>
</x-form>
</div>
</el-dialog-panel>
</div>
</dialog>
</el-dialog>

View File

@ -15,7 +15,7 @@
</x-slot:header>
@foreach($etudes as $etude)
<tr>
<x-table.td>{{ $etude->ensemble->name }}</x-table.td>
<x-table.td>{{ $etude->auditionedEnsemble->name }}</x-table.td>
<x-table.td>{{ $etude->set }}</x-table.td>
<x-table.td>{{ $etude->instrument->instrument }}</x-table.td>
<x-table.td>

View File

@ -8,7 +8,7 @@
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body class="h-full" {{ $attributes }}>
<body class="h-full">
<!-- Include this script tag or install `@tailwindplus/elements` via npm: -->
<!-- <script src="https://cdn.jsdelivr.net/npm/@tailwindplus/elements@1" type="module"></script> -->

View File

@ -29,6 +29,4 @@ Route::middleware(['auth'])->prefix('admin')->name('admin.')->group(function ()
Route::resource('/etudes', AuditionEtudeController::class)->names('etudes');
Route::resource('/news', NewsStoryController::class)->except(['show'])->names('news');
Route::get('/etude-grid', [AuditionEtudeGridController::class, 'index'])->name('etude-grid');
Route::post('/etude-grid', [AuditionEtudeGridController::class, 'store'])->name('etude-grid.store');
Route::delete('/etude-grid', [AuditionEtudeGridController::class, 'destroy'])->name('etude-grid.delete');
});