@extends('layouts.master')

@section('title')
    Staf Pendukung Penelitian
@endsection

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

@section('contents')
@php
 $menu = 'dashboard';
@endphp
    <div class="account-settings-container layout-top-spacing">
        {!! Form::model($stafpendukung, ['route' => ['stafpendukung.update', $stafpendukung->id], 'method'=>'patch', 'class' => 'section general-info']) !!}
        <div class="account-content">
            <div class="scrollspy-example" data-spy="scroll" data-target="#account-settings-scroll" data-offset="-100">
                <div class="row">

                    <div class="col-xl-12 col-lg-12 col-md-12 layout-spacing">
                        <div class="info">
                            <h5 class="">Data Staf Pendukung</h5>
                            <div class="row">
                                <div class="col-md-11 mx-auto">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label>NIP / NIK</label>
                                                <input type="text" class="form-control mb-4" id="nip" name="nip" value="{{$stafpendukung->nip}}">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label>Nama Lengkap dan Gelar</label>
                                                <input type="text" class="form-control mb-4" id="nama" name="nama" value="{{$stafpendukung->nama}}">
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label>Jenis Kelamin</label>
                                                <select class="form-control" id="sex" name="sex">
                                                    <option value="L" {{ ( $stafpendukung->status_aktif == 'L') ? 'selected' : '' }}>Laki-Laki</option>
                                                    <option value="P" {{ ( $stafpendukung->status_aktif == 'P') ? 'selected' : '' }}>Perempuan</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label>Jabatan</label>
                                                <select class="form-control" id="jabatan" name="jabatan">
                                                    @foreach($jabatan as $kode=>$nama)
                                                        <option value="{{$kode}}" {{ ( $stafpendukung->jabatan == $kode) ? 'selected' : '' }}>{{$nama}}</option>
                                                    @endforeach
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label>Unit Kerja</label>
                                                <select class="form-control" id="unit_kerja" name="unit_kerja">
                                                    @foreach($unitkerja as $kode=>$nama)
                                                        <option value="{{$kode}}" {{ ( $stafpendukung->unit_kerja == $kode) ? 'selected' : '' }}>{{$nama}}</option>
                                                    @endforeach
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label>Tingkat Pendidikan</label>
                                                <select class="form-control" id="tingkat_pendidikan" name="tingkat_pendidikan">
                                                    @foreach($tingkatpendidikan as $kode=>$nama)
                                                        <option value="{{$kode}}" {{ ( $stafpendukung->tingkat_pendidikan == $kode) ? 'selected' : '' }}>{{$nama}}</option>
                                                    @endforeach
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>

        <div class="account-settings-footer">
            <div class="as-footer-container">
                <button id="multiple-reset" class="btn btn-warning">Batal</button>
                <button type="submit" id="multiple-messages" class="btn btn-primary">Save Changes</button>
            </div>
        </div>
        {{ Form::close() }}
    </div>

@endsection

@section('js')
    <script src="{{ url('theme/plugins/apex/apexcharts.min.js') }} "></script>
    <script src="{{ url('theme/assets/js/dashboard/dash_2.js') }} "></script>
@endsection
