@extends('layouts.master')

@section('page-css')
@endsection
@section('breadcrumbs')
<ol class="breadcrumb page-breadcrumb">
    @foreach($breadcrumbs as $dataBread)
    <li class="breadcrumb-item {{@$dataBread['active'] == true ? 'active' : ''}}">
        @if(@$dataBread['url'])
        <a href="{{@$dataBread['url']}}">{{$dataBread['name']}}</a>
        @else
        {{$dataBread['name']}}
        @endif
    </li>
    @endforeach
</ol>
@endsection
@section('content')
<div class="subheader">
    <h1 class="subheader-title">
        {{$title}}
    </h1>
</div>
<div class="row">
    <div class="col-lg-12">
        <div id="panel-4" class="panel">
            <div class="panel-container show">
                <div class="panel-content">
                    <div id="toolbar">
                        <button id="btn-add" class="btn btn-primary">
                            <i class="fal fa-plus"></i> Tambah Data
                        </button>
                    </div>

                    <table class="table w-100" 
                    data-search="true"
                    data-toggle="table"
                    data-pagination="true"
                    data-toolbar="#toolbar"
                    data-show-refresh="false"
                    data-url="{{route($route.'.grid')}}"
                    data-ajax-options='{"xhrFields": {"withCredentials": true}}'
                    data-sort-name="ids"
                    data-sort-order="desc"
                    data-page-size="10"
                    data-id-field="id"
                    id="grid-data">
                      <thead class="bg-primary-light text-primary">
                        <tr>
                          <th data-width="50" data-field="action">#</th>
                          <th data-width="50" data-field="no">No</th>
                          <th data-field="name">Name</th>
                        </tr>
                      </thead>
                      <tbody></tbody>
                  </table>
                    <!-- datatable end -->
                </div>
            </div>
        </div>
    </div>
</div>

@endsection
@section('page-js')
@endsection