@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb pb-3">
                      <li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
                      <li class="breadcrumb-item"><a href="{{ route('laporan') }}">Laporan</a></li>
                      <li class="breadcrumb-item active" aria-current="page">SAG Hilang</li>
                    </ol>
                  </nav>

                    <div class="card-body text-center">
                        <div class="row form-group">
                            <div class="col-md-2">
                            </div>
                            <div class="col-md-10">
                            </div>
                        </div>
                        <form action="{{ route('saghilang.laporancetak') }}" target="_blank" method="post">
                            @csrf
                            <div class="row">

                                <div class="col-md-6">
                                    <div class="input-group mb-3">
                                        <div class="input-group-prepend ml-3">
                                            <span class="input-group-text" id="basic-addon1">Mula</span>
                                        </div>
                                        <input type="text" class="form-control col-4" placeholder="Pilih Tarikh"
                
                                            aria-label="Tarikh" id="mula_date" name="mula_date"
                                            aria-describedby="basic-addon1">

                                        <div class="input-group-prepend ml-2">
                                            <span class="input-group-text" id="basic-addon1">Hingga</span>
                                        </div>
                                        <input type="type" class="form-control col-4" placeholder="Pilih Tarikh"
                                            aria-label="Tarikh" id="hingga_date" name="hingga_date"
                                            aria-describedby="basic-addon1">
                                    </div>
                                </div>

                                <div class="col-md-4">
                                    <div class="input-group mb-3">
                                        <div class="input-group-prepend">
                                            <span class="input-group-text" id="basic-addon1">Alasan</span>
                                        </div>
                                        <select class="form-control" name="sltalasan">
                                            @foreach($loopalasan as $index=>$lp)
                                                <option value="{{ $lp['alasan'] }}">{{ $lp['alasan'] }}</option>
                                            @endforeach
                                        </select>
                                    </div>
                                </div>

                                <div class="col-md-2">
                                    <input type="submit" class="btn btn-primary" id="submit_button" name="submit_button"
                                        value="Cetak">
                                </div>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
            var api_url = "<?php echo $api_url; ?>";
            var kodcaw = "<?php echo $cawangan_info['kodcaw']; ?>";

            var tablecustomers = $('#myTable').DataTable({
                "ordering": true
            });

            $(document).ready(function() {
                $('#mula_date').datepicker({
                    format: 'dd-mm-yyyy'
                });
                $('#hingga_date').datepicker({
                    format: 'dd-mm-yyyy'
                });
            }
        );

</script>
@endsection

