@extends('website.layouts.app')

@section('title')
    List Data User
@endsection

@section('content')
    <!-- start page title -->
    <div class="row">
        <div class="col-12">
            <div class="page-title-box d-sm-flex align-items-center justify-content-between">
                <h4 class="mb-sm-0">List Data User</h4>

                <div class="page-title-right">
                    <ol class="breadcrumb m-0">
                        <li class="breadcrumb-item"><a href="javascript: void(0);">List Data</a></li>
                        <li class="breadcrumb-item active">User</li>
                    </ol>
                </div>

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

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header d-flex align-items-center justify-content-between">
                    <h4 class="card-title mb-0 flex-grow-1">List Data User
                    </h4>
                </div><!-- end card header -->

                <div class="card-body">
                    <div id="table-list-user" class="table-responsive">
                    </div>
                </div><!-- end card-body -->
            </div><!-- end card -->
        </div>
        <!-- end col -->
    </div>

    <!-- update criteria modals -->
    <div class="modal fade" id="btn-edit" tabindex="-1" aria-labelledby="btn-editLabel" aria-modal="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="btn-editLabel">Ubah Data User</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <form action="{{ route('list-user.updateListUser') }}" method="POST">
                        @csrf
                        <div class="row g-3">
                            <input type="hidden" name="user_id" id="user_id">
                            <div class="col-lg-12">
                                <div>
                                    <label for="name" class="form-label">Masukkan nama<span
                                            class="text-danger">*</span></label>
                                    <input type="text" class="form-control" id="name" name="name"
                                        placeholder="inputkan nama anda ...." required>
                                </div>
                            </div><!--end col-->
                            <div class="col-lg-12">
                                <div>
                                    <label for="username" class="form-label">Masukkan username<span
                                            class="text-danger">*</span></label>
                                    <input type="text" class="form-control" id="username" name="username"
                                        placeholder="inputkan username anda ...." required>
                                </div>
                            </div><!--end col-->

                            <div class="col-lg-12">
                                <div>
                                    <label for="jenis_kelamin" class="form-label">Pilih jenis
                                        kelamin<span class="text-danger">*</span></label>
                                    <select class="form-select" id="jenis_kelamin" name="jenis_kelamin"
                                        aria-label="jenis-kelamin">
                                        <option selected value="Laki-laki">Laki-laki</option>
                                        <option value="Perempuan">Perempuan</option>
                                    </select>
                                </div>
                            </div>

                            <div class="col-lg-12">
                                <div>
                                    <label for="status_user" class="form-label">Pilih status<span
                                            class="text-danger">*</span></label>
                                    <select class="form-select" id="status_user" name="status_user"
                                        aria-label="status-user">
                                        <option selected value="tidak aktif">tidak aktif</option>
                                        <option value="aktif">aktif</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-lg-12">
                                <div class="hstack gap-2 justify-content-end">
                                    <button type="button" class="btn btn-light" data-bs-dismiss="modal">Close</button>
                                    <button type="submit" class="btn btn-primary">Submit</button>
                                </div>
                            </div><!--end col-->
                        </div><!--end row-->
                    </form>
                </div>
            </div>
        </div>
    </div>

    <script src="{{ asset('assets/libs/prismjs/prism.js') }}"></script>
    <script src="{{ asset('assets/libs/gridjs/gridjs.umd.js') }}"></script>
    <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>

    {{-- <script src="{{ asset('assets/js/pages/gridjs.init.js') }}"></script> --}}

    {{-- custom js --}}
    <script src="{{ asset('assets/js/custom/list-data-user.js') }}"></script>
@endsection
