Scobda nomination ensembles #106
|
|
@ -24,7 +24,8 @@ class AuditionSettings extends Controller
|
|||
'organizerName' => ['required'],
|
||||
'organizerEmail' => ['required', 'email'],
|
||||
'registrationCode' => ['required'],
|
||||
'fee_structure' => ['required', 'in:oneFeePerEntry,oneFeePerStudent'], // Options should align with the boot method of InvoiceDataServiceProvider
|
||||
'fee_structure' => ['required', 'in:oneFeePerEntry,oneFeePerStudent'],
|
||||
// Options should align with the boot method of InvoiceDataServiceProvider
|
||||
'late_fee' => ['nullable', 'numeric', 'min:0'],
|
||||
'school_fee' => ['nullable', 'numeric', 'min:0'],
|
||||
'payment_address' => ['required'],
|
||||
|
|
@ -32,6 +33,8 @@ class AuditionSettings extends Controller
|
|||
'payment_state' => ['required', 'max:2'],
|
||||
'payment_zip' => ['required', 'min:5'],
|
||||
'advanceTo' => ['nullable'],
|
||||
'nomination_ensemble_rules' => ['required', 'in:disabled,scobda'],
|
||||
// Options should align with the boot method of NominationEnsembleServiceProvider
|
||||
]);
|
||||
|
||||
// Olympic Scoring Switch
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
// Check if invoicing_enabled setting exists
|
||||
$exists = DB::table('site_settings')
|
||||
->where('setting_key', 'nomination_ensemble_rules')
|
||||
->exists();
|
||||
|
||||
// If it doesn't insert the new row
|
||||
if (! $exists) {
|
||||
DB::table('site_settings')->insert([
|
||||
'setting_key' => 'nomination_ensemble_rules',
|
||||
'setting_value' => 'disabled',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
|
@ -19,6 +19,16 @@
|
|||
<x-form.body-grid columns="12" class="m-3">
|
||||
<x-form.field label_text="Registration Code" name="registrationCode" colspan="3" :value="auditionSetting('registrationCode')"/>
|
||||
<x-form.field label_text="Next Event Name" name="advanceTo" colspan="4" :value="auditionSetting('advanceTo')"/>
|
||||
<x-form.select name="nomination_ensemble_rules" colspan="4">
|
||||
<x-slot:label>Nomination Ensemble Rules</x-slot:label>
|
||||
{{-- Values should be one of the options in the boot method NominationEnsembleServiceProvider --}}
|
||||
<option value="disabled" {{ auditionSetting('nomination_ensemble_rules') === 'disabled' ? 'selected':'' }}>
|
||||
No Nomination Ensembles
|
||||
</option>
|
||||
<option value="scobda" {{ auditionSetting('nomination_ensemble_rules') === 'scobda' ? 'selected':'' }}>
|
||||
SCOBDA Rules
|
||||
</option>
|
||||
</x-form.select>
|
||||
</x-form.body-grid>
|
||||
</x-layout.page-section>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue