auditionadmin/resources/views/students/index.blade.php

52 lines
2.5 KiB
PHP

@php use Illuminate\Support\Facades\Auth; @endphp
@push('scripts')
{{-- Code from https://codepen.io/ryangjchandler/pen/WNQQKeR--}}
<script src="{{ asset('js/sort_table_by_column.js') }}"></script>
@endpush
<x-layout.app>
<x-slot:page_title>Students</x-slot:page_title>
<x-layout.page-section-container>
<x-layout.page-section>
<x-slot:section_name>Add Student</x-slot:section_name>
<x-form.form method="POST" action="/students">
<x-form.body-grid columns="8" class="max-w-full">
<x-form.field name="first_name" label_text="First Name" colspan="3" />
<x-form.field name="last_name" label_text="Last Name" colspan="3" />
<x-form.field name="grade" label_text="Grade" colspan="1" />
{{-- TODO make grade a dropdown--}}
<x-form.button class="mt-8">Save</x-form.button>
</x-form.body-grid>
</x-form.form>
</x-layout.page-section>
<x-layout.page-section>
<x-slot:section_name>Student Listing</x-slot:section_name>
<x-table.table class="!mt-0">
<x-table.table_header_row>
<x-table.th first @click="sortByColumn" class="cursor-pointer select-none">Name</x-table.th>
<x-table.th @click="sortByColumn" class="cursor-pointer select-none">Grade</x-table.th>
<x-table.th :placeholder="true">
<span class="sr-only">Edit</span>
</x-table.th>
</x-table.table_header_row>
</x-table.table>
</x-layout.page-section>
</x-layout.page-section-container>
</x-layout.app>
{{--<x-layout.app>--}}
{{-- <x-slot:page_title>Students</x-slot:page_title>--}}
{{-- <x-layout.page-section>--}}
{{-- <x-slot:section_name>Create Student</x-slot:section_name>--}}
{{-- <x-slot:section_description>Student full names must be unique. Add a middle initial to the first name if necessary.</x-slot:section_description>--}}
{{-- <x-form.card method="POST" action="/students/create" submit-button-text="Create Student" >--}}
{{-- <x-form.field name="first_name" label="First Name" div_classes="sm:col-span-3" required />--}}
{{-- <x-form.field name="last_name" label="Last Name" div_classes="sm:col-span-3" required />--}}
{{-- </x-form.card>--}}
{{-- </x-layout.page-section>--}}
{{--</x-layout.app>--}}