update audition info page with to use database data

This commit is contained in:
Matt Young 2025-12-13 16:26:59 -06:00
parent 17454a7793
commit 36a74ed20e
5 changed files with 44 additions and 18 deletions

View File

@ -2,12 +2,15 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request; use function compact;
class AuditionInformationPage extends Controller class AuditionInformationPage extends Controller
{ {
public function __invoke() public function __invoke()
{ {
return view('audition-information'); $concertAuditionTextLines = preg_split('/\R/', siteData('concertAuditionAdditionalInformation'));
$beginnerAuditionTextLines = preg_split('/\R/', siteData('beginnerAuditionAdditionalInformation'));
return view('audition-information', compact('concertAuditionTextLines', 'beginnerAuditionTextLines'));
} }
} }

View File

@ -11,9 +11,9 @@ use InvalidArgumentException;
class SiteDataService class SiteDataService
{ {
public function __construct( public function __construct(
protected array $defaults, protected array $defaults = [],
protected string $cacheKeyPrefix, protected string $cacheKeyPrefix = '',
protected int $cacheExpiration protected int $cacheExpiration = 0
) { ) {
$this->defaults = config('siteData.defaults', []); $this->defaults = config('siteData.defaults', []);
$this->cacheKeyPrefix = config('siteData.cache_key_prefix', 'site_data_'); $this->cacheKeyPrefix = config('siteData.cache_key_prefix', 'site_data_');

View File

@ -84,5 +84,20 @@ return [
'value' => '[{"name":"No Ensembles Defined","chair":" ","clinician":" "}]', 'value' => '[{"name":"No Ensembles Defined","chair":" ","clinician":" "}]',
'type' => 'json', 'type' => 'json',
], ],
'concertAuditionFee' => [
'key' => 'concertAuditionFee',
'value' => 'NO FEE SET',
'type' => 'string',
],
'concertAuditionAdditionalInformation' => [
'key' => 'concertAuditionAdditionalInformation',
'value' => 'NO ADDITIONAL INFORMATION SET',
'type' => 'string',
],
'beginnerAuditionAdditionalInformation' => [
'key' => 'beginnerAuditionAdditionalInformation',
'value' => 'NO ADDITIONAL INFORMATION SET',
'type' => 'string',
]
], ],
]; ];

View File

@ -10,6 +10,7 @@ class MeobdaData2526 extends Seeder
public function run(): void public function run(): void
{ {
$defaults = [ $defaults = [
['key' => 'concertAuditionFee', 'value' => '$10.00', 'type' => 'string'],
['key' => 'concertClinicDates', 'value' => 'February 2-3, 2026', 'type' => 'string'], ['key' => 'concertClinicDates', 'value' => 'February 2-3, 2026', 'type' => 'string'],
['key' => 'concertClinicLocation', 'value' => 'Oologah High School', 'type' => 'string'], ['key' => 'concertClinicLocation', 'value' => 'Oologah High School', 'type' => 'string'],
['key' => 'beginnerClinicDates', 'value' => 'April 7, 2026', 'type' => 'string'], ['key' => 'beginnerClinicDates', 'value' => 'April 7, 2026', 'type' => 'string'],
@ -53,6 +54,17 @@ class MeobdaData2526 extends Seeder
]), ]),
'type' => 'json', 'type' => 'json',
], ],
[
'key' => 'concertAuditionAdditionalInformation',
'value' => '9th Graders may audition for the Jr. High and/or HS Band. Those auditioning for both bands must pay a $10.00 audition fee for each instrument they audition on for each band. (A 9th grade trumpet player auditioning for the Jr. High and HS band would pay $20.00; a 9th grade sax player auditioning on alto and tenor for the Jr. High and HS band would pay $40.00).
9th Graders, auditioning for both Jr. High and HS, who score well enough to be in the HS band will be placed in the HS band.',
'type' => 'string',
],
[
'key' => 'beginnerAuditionAdditionalInformation',
'value' => 'Students are selected by director recommendation. Directors may being up to 9 students for each band, but no more than one drummer or two alto saxes for either. Entry fee is $10.00 and includes lunch.',
'type' => 'string',
]
]; ];
foreach ($defaults as $item) { foreach ($defaults as $item) {

View File

@ -2,22 +2,18 @@
<x-card class="w-full max-w-4xl mx-auto"> <x-card class="w-full max-w-4xl mx-auto">
<x-slot:header>HS / JH / 7th / Jazz Auditions</x-slot:header> <x-slot:header>HS / JH / 7th / Jazz Auditions</x-slot:header>
<div class="space-y-3"> <div class="space-y-3">
<p>January 12, 2026</p> <p>{{ siteData('concertAuditionDate') }}</p>
<p>Wagoner High School</p> <p>{{ siteData('concertAuditionLocation') }}</p>
<p>Entry fee is $10.00 per entry</p> <p>Entry fee is {{ siteData('concertAuditionFee') }} per entry</p>
<p>9th Graders may audition for the Jr. High and/or HS Band. Those auditioning for both bands must pay a @foreach($concertAuditionTextLines as $line)
$10.00 audition fee for each instrument they audition on for each band. (A 9th grade trumpet player <p>{{ $line }}</p>
auditioning for the Jr. High and HS band would pay $20.00; a 9th grade sax player auditioning on @endforeach
alto
and tenor for the Jr. High and HS band would pay $40.00).</p>
<p>9th Graders, auditioning for both Jr. High and HS, who score well enough to be in the HS band will be
placed
in the HS band.</p>
</div> </div>
</x-card> </x-card>
<x-card class="w-full max-w-4xl mx-auto mt-6"> <x-card class="w-full max-w-4xl mx-auto mt-6">
<x-slot:header>First / Second Year Nominations</x-slot:header> <x-slot:header>First / Second Year Nominations</x-slot:header>
<p>Students are selected by director recommendation. Directors may being up to 9 students for each band, but @foreach($beginnerAuditionTextLines as $line)
no more than one drummer or two alto saxes for either. Entry fee is $10.00 and includes lunch.</p> <p>{{ $line }}</p>
@endforeach
</x-card> </x-card>
</x-layout.app> </x-layout.app>