@extends('layouts.master')

@section('title')
    Dashboard
@endsection

@section('header')
<div class="page-title">
    <h3>Dashboard</h3>
</div>
@endsection

@section('contents')
    <!-- start page title -->
    <div class="page-title-box">
        <div class="row align-items-center">
            <div class="col-md-8">
                <h6 class="page-title">{!! $title !!}</h6>
                <ol class="breadcrumb m-0">
                    <li class="breadcrumb-item">Mahasiswa</li>
                    <li class="breadcrumb-item">{!! $title !!}</li>
                </ol>
            </div>
        </div>
    </div>
    <!-- end page title -->
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <form action="{{ route('mahasiswa.kelompok.store') }}" method="POST">
                        @csrf
                    <h4 class="card-title">Kelompok Baru</h4>
                    <p class="card-title-desc"></p>
                    <div class="row mb-3">
                        <label for="kode" class="col-sm-2 col-form-label">Kode Kelompok</label>
                        <div class="col-sm-10">
                            <input class="form-control" type="text" id="kode" name="kode" value="{{ $kode }}" disabled>
                            <input type="hidden" name="kode" value="{{ $kode }}">
                            <input type="hidden" name="periode" value="{{ $periode['periode_id'] }}" >
                        </div>
                    </div>
                    <div class=" row mb-3">
                        <label class="col-sm-2 col-form-label">Dosen Pembimbing</label>
                        <div class="col-sm-10">
                            <select class="form-select select2" name="dosen">
                                <option selected>Pilih Dosen</option>
                                @foreach($dosen as $item)
                                    <option value="{{ encrypt($item['id_sdm'].'_'.$item['nm_sdm'].'_'.$item['nidn']) }}">{{ $item['nm_sdm'].' - '.$item['prodi']}}</option>
                                @endforeach
                            </select>
                        </div>
                    </div>
                    <div class="mb-0">
                        <div>
                            <button type="submit" class="btn btn-primary waves-effect waves-light me-1">
                                Submit
                            </button>
                            <button type="reset" class="btn btn-secondary waves-effect">
                                Cancel
                            </button>
                        </div>
                    </div>
                </form>
                </div>
            </div>
        </div> <!-- end col -->
    </div> <!-- end row -->

@endsection

@section('js')
<script>

</script>
@endsection
