<?php $__env->startSection('styles'); ?>
    <style>
        td {
            text-align: center;
            vertical-align: middle !important;
        }

        th {
            text-align: center;
            vertical-align: middle !important;
        }
    </style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <?php if(session()->has('error')): ?>
        <div class="alert alert-danger"><?php echo e(session()->get('error')); ?></div>
    <?php endif; ?>
    <?php if(session()->has('success')): ?>
        <div class="alert alert-success"><?php echo e(session()->get('success')); ?></div>
    <?php endif; ?>
    <?php if(session()->has('success_coupon')): ?>
        <?php echo session()->get('success_coupon'); ?>

    <?php endif; ?>
    <?php if(count($errors) > 0): ?>
        <div class="alert alert-danger">
            <ul>
                <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <li><?php echo e($error); ?></li>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </ul>
        </div>
    <?php endif; ?>
    <div class="row">
        <div class="col-md-12">
            <div class="row">
                <div class="col-md-4">
                    <button href="#" id="btn-export" class="btn btn-sm green-meadow"><i class="fa fa-file-excel-o"></i>
                        Xuất excel
                    </button>
                </div>
            </div>
        </div>
        <div class="col-md-12" id="detail" style="margin-top: 15px">

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

<?php $__env->startPush('scripts'); ?>
    <script>

        function get_data() {
            $.ajax({
                url: '<?php echo e(url('admin2/report/debt-status-ajax')); ?>',
                type: 'get',
                beforeSend: function () {
                    $('#detail').addClass('ht-on-loading');
                },
                dataType: 'json',
                success: function (response) {
                    $('#detail').removeClass('ht-on-loading').html(response.data);
                }
            });
        }

        $(document).ready(function () {
            get_data();
        });

        $('#btn-export').click(function () {
            var url = '<?php echo e(url('admin2/report/debt-status-ajax')); ?>' + '?is_excel=1';
            window.location.href = url;
        });

    </script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('admin2', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>