<!-- Modal -->
<div class="modal fade" id="teacherModal1{{$vehicle->id}}" tabindex="-1" aria-labelledby="teacherModal1{{$vehicle->id}}Label" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="teacherModal1{{$vehicle->id}}Label">ระบุผู้สอน</h5>
            </div>
            <form action="{{ route('calendar.booking') }}"
                id="teacherBookFrm"
                novalidate class="{{ ($errors->any()) ? 'was-validated' : 'needs-validation' }}"
                method="post">
                @csrf
                <input type="hidden" name="date" id="date-booking">
                <input type="hidden" name="vehicleBookingID" id="vehicle-booking">
            <div class="modal-body">
                <div class="row">
                    <div class="col-12">
                        <label id="vehicle-name"></label>
                    </div>
                </div>
                <div class="row">
                    <div class="col-12">
                        ผู้เรียน : <label id="student-name"></label>
                    </div>
                </div>
                <div class="row">
                    <div class="col-12">
                        เวลา : <label id="drive-time"></label>
                    </div>
                </div>
                <div class="row">
                    <div class="col-12">
                        <div class="form-group">
                            <label for="teacher">ผู้สอน <span class="text-red">*</span></label>
                            <select id="teacher" name="teacher" class=" show-menu-arrow form-control"  required>
                                <option value="">--เลือก--</option>
                                @foreach ($teachers as $indexKey => $teacher)
                                <option value="{{ $teacher->id }}">{{ $teacher->title.$teacher->firstname. " " .$teacher->lastname }}</option>
                                @endforeach
                            </select>
                            @error('teacher')
                            <div class="text-danger">{{ $message }}</div>
                            @enderror
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-secondary" data-dismiss="modal">ปิด</button>
                <button type="submit" id="payBtn" class="btn btn-success">ตกลง</button>
            </div>
            </form>
        </div>
    </div>
</div>
