Auditionadmin 64 #71

Merged
okorpheus merged 9 commits from auditionadmin-64 into master 2024-08-11 04:16:54 +00:00
2 changed files with 10 additions and 1 deletions
Showing only changes of commit 5862d05f35 - Show all commits

View File

@ -70,6 +70,15 @@ class SchoolController extends Controller
'schools' => [$school->id],
],
]);
auth()->user()->addFlag('head_director'); // If user is creating a school, they are initially the head
AuditLogEntry::create([
'user' => auth()->user()->email,
'ip_address' => request()->ip(),
'message' => 'Marked '.auth()->user()->full_name().' as head director for '.$school->name,
'affected' => ['schools' => [$school->id], 'users' => [auth()->user()->id]],
]);
}
return redirect('/schools/'.$school->id);

View File

@ -5,7 +5,7 @@
</x-card.heading>
<x-form.form method="POST" action="/schools" class="!mt-4">
<x-form.form method="POST" action="{{route('schools.store')}}" class="!mt-4">
<x-form.body-grid columns="6" class="max-w-full">
<x-form.field name="name" label_text="School Name" colspan="6"/>
<x-form.field name="address" label_text="School Address" colspan="6"/>