@extends('layouts.TF')

@section('content')
    <div class="container">
        <div class="row">
            <div class="col-lg-12 d-flex flex-column">
                @if (Session::has('pesan'))
                    <div class="alert alert-info alert-dismissible">
                        <a href="#" class="close" data-dismiss="alert">&times;</a>
                        {{ Session::get('pesan') }}
                    </div>
                @endif
                <div class="row flex-grow">

                    <div class="col-8 grid-margin stretch-card">

                        <div class="card"
                            style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">

                            <div class="card-body">
                                <div class="d-sm-flex justify-content-between align-items-start">
                                    <div>
                                        <h4 class="card-title card-title-dash">Profil Dosen</h4>
                                    </div>
                                </div>
                                <br>
                                <div class="d-sm-flex align-items-center mt-1 justify-content-between">
                                    <table>
                                        <tbody>
                                            <tr>
                                                <td>Nama Dosen</td>
                                                <td>: {{ $objek->nama }}</td>
                                                {{-- {!! Form::hidden('nama', $objek->nama) !!} --}}
                                            </tr>
                                            <tr>
                                                <td>Email Dosen</td>
                                                <td>: {{ $objek->email }}</td>
                                                {{-- {!! Form::hidden('email', $objek->email) !!} --}}
                                            </tr>

                                        </tbody>

                                    </table>

                                </div>
                                <br>

                                {!! Form::model($objek, ['action' => $action, 'method' => $method]) !!}
                                @csrf
                                <div class="col-6">
                                    <div class="dropdown-divider"></div>
                                    <div class="form-group">
                                        <label for="jadwal_id">Jadwal yang ingin di terapkan</label>
                                        {{ Form::select('jadwal_id', \App\Jadwal::pluck('namajadwal', 'id'), null, ['class' => 'form-control']) }}
                                        <span class="text-danger">{{ $errors->first('jadwal_id') }}</span>
                                    </div>

                                </div>

                                <div>
                                    <br>
                                    <button type="submit" class="btn btn-primary">Konfirmasi</button>
                                    <a href="{{ url('admin/terapjadwal')}}" class="btn btn-warning">Kembali</a>
                                </div>

                                {!! Form::close() !!}
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
@endsection
