@extends('back-end.master.app')
@section('title', 'customer')
@section('body')
    <main class="app-content">
        <section class=" gradient-custom-2">
            <div class="">
                <div class="row d-flex justify-content-center align-items-center h-100">
                    <div class="col-md-12 col-xl-12">
                        <div class="card mask-custom">
                            <div class="card-header">
                                <div class="row">
                                    <div class="col-md-8">
                                        <h4>Profile</h4>
                                    </div>
                                    <div class="col-md-4">
                                        <div class="" style="float: right">
                                            <a href="{{ route('dp.index') }}"
                                                class="btn btn-primary btn-sm btn-rounded mt-5" style="float: right">back
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="card-body p-4 ">
                                <div class="col-md-12">
                                    <div class="card">
                                        <div class="card-body">
                                            <div class="row">
                                                <div class="col-md-2">
                                                    <img src="{{ asset('storage/' . $data->image) }}"
                                                        style="width: 100px; height:100px;" alt="">
                                                </div>
                                                <div class="col-md-10" dir="rtl">
                                                    <p dir="rtl">
                                                        {{ $data->bio }}
                                                    </p>
                                                </div>
                                            </div>
                                            
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-12 mt-3">
                                    <div class="card">
                                        <div class="card-body">
                                          
                                        </div>
                                    </div>
                                </div>


                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </section>
    </main>
@endsection


@section('pageJs')
    <script type="text/javascript">
        $(".app-menu").removeClass("active");
        $("#nav_stocki").addClass("active");
        $("#stocki").addClass("is-expanded");
        $("#posts").addClass("active");
        $(document).on("click", ".btn-delete", function() {
            var id = $(this).attr("data-id");
            swal({
                title: "Are you sure want to delete?",
                text: "...",
                type: "warning",
                showCancelButton: true,
                confirmButtonText: "Yes!",
                cancelButtonText: "No!",
                closeOnConfirm: false,
                closeOnCancel: false
            }, function(isConfirm) {
                if (isConfirm) {
                    var url = "{{ route('posts.delete', '') }}" + "/" + id;
                    $('#delete-form').attr('action', url);
                    $("#delete-form").submit();
                } else {
                    swal("Cancelled", "Record not deleted", "error");
                    return false;
                }
            });
        });
    </script>
@endsection
