<?php $__env->startSection('title', 'Akun Admin'); ?>

<?php $__env->startSection('component-css'); ?>
    <link href="<?php echo e(URL::asset('template')); ?>/vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo e(URL::asset('template')); ?>/vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min.css"
        rel="stylesheet">
    <link href="<?php echo e(URL::asset('template')); ?>/vendors/datatables.net-fixedheader-bs/css/fixedHeader.bootstrap.min.css"
        rel="stylesheet">
    <link href="<?php echo e(URL::asset('template')); ?>/vendors/datatables.net-responsive-bs/css/responsive.bootstrap.min.css"
        rel="stylesheet">
    <link href="<?php echo e(URL::asset('template')); ?>/vendors/datatables.net-scroller-bs/css/scroller.bootstrap.min.css"
        rel="stylesheet">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content-page'); ?>

    <div class="">
        <div class="page-title">
            <div class="title_left">
                <h3>
                    <?php echo $__env->yieldContent('title'); ?>
                </h3>
            </div>
        </div>

        <div class="clearfix"></div>

        <?php if(session('success')): ?>
            <div class="alert alert-success text-uppercase">
                <strong>Berhasil</strong>, <?php echo session('success'); ?>

            </div>
        <?php elseif(session('error')): ?>
            <div class="alert alert-danger text-uppercase">
                <strong>Gagal</strong>, <?php echo session('error'); ?>

            </div>
        <?php endif; ?>

        <a href="<?php echo e(route('pages.accounts.admin.index')); ?>" class="btn btn-danger" style="margin-top: 5px;">
            <i class="fa fa-sign-out"></i> Kembali
        </a>
        <button onclick="upgrade(<?php echo e($detail['id_master_organization']); ?>)" type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg" style="margin-top: 5px">
            <i class="fa fa-edit"></i> Upgrade
        </button>

        <div class="row" style="margin-top: 10px">
            <div class="col-md-6 col-sm-12 col-xs-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>
                            Detail <?php echo $__env->yieldContent('title'); ?>
                        </h2>
                        <div class="clearfix"></div>
                    </div>
                    <div class="x_content">
                        <div class="form-group row">
                            <label class="control-label col-md-4 col-sm-3 col-xs-12">
                                Nama
                            </label>
                            <div class="col-md-5 col-sm-9 col-xs-12">
                                <?php echo e($detail['nama']); ?>

                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="control-label col-md-4 col-sm-3 col-xs-12">
                                Kode Akun Member
                            </label>
                            <div class="col-md-5 col-sm-9 col-xs-12">
                                <?php echo e($detail['member_account_code']); ?>

                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="control-label col-md-4 col-sm-3 col-xs-12">
                                Username
                            </label>
                            <div class="col-md-5 col-sm-9 col-xs-12">
                                <?php echo e($detail['username']); ?>

                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="control-label col-md-4 col-sm-3 col-xs-12">
                                Kode Negara
                            </label>
                            <div class="col-md-5 col-sm-9 col-xs-12">
                                <?php echo e($detail['country_code']); ?>

                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="control-label col-md-4 col-sm-3 col-xs-12">
                                Nomor HP
                            </label>
                            <div class="col-md-5 col-sm-9 col-xs-12">
                                <?php echo e($detail['phone_number']); ?>

                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="control-label col-md-4 col-sm-3 col-xs-12">
                                Dibuat Tanggal
                            </label>
                            <div class="col-md-5 col-sm-9 col-xs-12">
                                <?php
                                    $timestamps = $detail['created_at'];

                                    $carbonDate = \Carbon\Carbon::createFromTimestamp($timestamps);
                                    $formattedDateTime = $carbonDate->format('d-m-Y, H:i:s');
                                ?>
                                <?php echo e($formattedDateTime); ?>

                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="control-label col-md-4 col-sm-3 col-xs-12">
                                Waktu Tersisa
                            </label>
                            <div class="col-md-5 col-sm-9 col-xs-12">
                                <?php echo e($remaining['returnDate']); ?>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-6 col-sm-12 col-xs-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>
                            Detail Paket Organisasi
                        </h2>
                        
                        <div class="clearfix"></div>
                    </div>
                    <div class="x_content">
                        <div class="form-group row">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">
                                Nama Paket
                            </label>
                            <div class="col-md-9 col-sm-9 col-xs-12">
                                <?php echo e($detail['paketOrganization']['nama_paket']); ?>

                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">
                                Limit Kontak
                            </label>
                            <div class="col-md-9 col-sm-9 col-xs-12">
                                <?php echo e($detail['paketOrganization']['limit_contact']); ?>

                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">
                                Limit User
                            </label>
                            <div class="col-md-9 col-sm-9 col-xs-12">
                                <?php echo e($detail['paketOrganization']['limit_user']); ?>

                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">
                                Deskripsi
                            </label>
                            <div class="col-md-9 col-sm-9 col-xs-12">
                                <?php echo e(empty($detail['paketOrganization']['description']) ? '-' : $detail['paketOrganization']['description']); ?>

                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">
                                Durasi Waktu
                            </label>
                            <div class="col-md-9 col-sm-9 col-xs-12">
                                <?php echo e($detail['paketOrganization']['durationDate']); ?> Hari
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12">
                                Harga
                            </label>
                            <div class="col-md-9 col-sm-9 col-xs-12">
                                Rp. <?php echo e(number_format($detail['paketOrganization']['amount'])); ?>

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

    <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">

                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">
                        <span aria-hidden="true">×</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel">
                        <i class="fa fa-edit"></i> Upgrade
                    </h4>
                </div>
                <div id="modal-content-upgrade">

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

<?php $__env->stopSection(); ?>

<?php $__env->startSection("component-js"); ?>

    <script type="text/javascript">
        function upgrade(id_master_organization)
        {
            $.ajax({
                url: "<?php echo e(url('/pages/account/admin')); ?>" + "/" + id_master_organization + "/upgrade",
                method: "GET",
                success: function(response) {
                    $("#modal-content-upgrade").html(response)
                },
                error: function(error) {
                    console.log(error);
                }
            })
        }
    </script>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('pages.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\XNS\Deployment\Dashboard-New-Ecommerce\resources\views\pages\account\admin\detail.blade.php ENDPATH**/ ?>