Scobda nomination ensembles #106
|
|
@ -43,6 +43,9 @@ class AuditionSettings extends Controller
|
|||
// Enable Invoicing Switch
|
||||
$validData['invoicing_enabled'] = $request->get('invoicing_enabled') == '1';
|
||||
|
||||
// Enable collect shirt size switch
|
||||
$validData['student_data_collect_shirt_size'] = $request->get('student_data_collect_shirt_size') == '1';
|
||||
|
||||
// Store currency values as cents
|
||||
$validData['late_fee'] = $validData['late_fee'] * 100;
|
||||
$validData['school_fee'] = $validData['school_fee'] * 100;
|
||||
|
|
|
|||
|
|
@ -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', 'student_data_collect_shirt_size')
|
||||
->exists();
|
||||
|
||||
// If it doesn't insert the new row
|
||||
if (! $exists) {
|
||||
DB::table('site_settings')->insert([
|
||||
'setting_key' => 'student_data_collect_shirt_size',
|
||||
'setting_value' => '0',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
||||
|
|
@ -22,6 +22,18 @@
|
|||
</x-form.body-grid>
|
||||
</x-layout.page-section>
|
||||
|
||||
<x-layout.page-section>
|
||||
<x-slot:section_name>Optional Student Data</x-slot:section_name>
|
||||
<x-form.body-grid columns 12 class="m-3">
|
||||
<div class="col-span-6 flex space-x-3">
|
||||
<x-form.toggle-checkbox
|
||||
checked="{{ auditionSetting('student_data_collect_shirt_size') }}"
|
||||
name="student_data_collect_shirt_size"/>
|
||||
<span>Collect Student Shirt Size</span>
|
||||
</div>
|
||||
</x-form.body-grid>
|
||||
</x-layout.page-section>
|
||||
|
||||
<x-layout.page-section>
|
||||
<x-slot:section_name>Scoring Settings</x-slot:section_name>
|
||||
<x-form.body-grid columns="12" class="m-3">
|
||||
|
|
|
|||
Loading…
Reference in New Issue