<?php echo $__env->make('admin.layouts.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->make('admin.layouts.sidebar', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<style>
    .hidden{
        display: none;
    }
    .font-weight{
        font-weight: 600;
    }
    table{
        width: 100%;
        font-family: Arial;
    }
    .emi-form > thead > tr > th{
        font-weight: 600 !important;
    }
    .payable-amt{
        border-top-style: solid;
        border-bottom-style: solid;
    }
    .interest_rate{
        text-transform: capitalize;
    }
    .datepicker tbody tr > td[class='day']{
        color: black;
        border: 1px dashed #34b9c3;
    }
    .panel-group{
        padding-top: 8px;
    }
    .panel-default{
        padding-bottom: 4px;
    }
    .panel-collapse{
        background-color: #ffffff;
        padding: 10px;
        border: 1px solid #dedada;
    }
    h4.panel-title > a{
        font-size: 14px;
        color: #5f5a5a !important;
    }
    .panel-heading {
        background-color: #f1f1f1;
        border: 1px solid #e0dfe0;
        padding-left: 10px;
        padding-top: 6px;
        cursor: pointer;
    }
    .panel-heading {
        background-color: #f1f1f1;
        border: 1px solid #e0dfe0;
        padding-left: 10px;
        padding-top: 6px;
        cursor: pointer;
    }
    .panel-default{
        padding-bottom: 4px;
    }
    .panel-collapse{
        background-color: #ffffff;
        padding: 10px;
        border: 1px solid #dedada;
    }
    .error-view{
        position: absolute;
        top: 37px;
        background-color: red;
        padding-left: 10px;
        padding-right: 10px;
        color: white;
        font-size: 11px;
    }
</style>
<div class="m-grid__item m-grid__item--fluid m-wrapper">
    <!-- BEGIN: Subheader -->
    <div class="m-subheader ">
        <div class="d-flex align-items-center">
            <div class="mr-auto">
                <h3 class="m-subheader__title m-subheader__title--separator">
                    TAT Performance
                </h3>
            </div>

        </div>
    </div>
<?php setlocale(LC_MONETARY, 'en_IN.UTF-8'); ?>
<!-- END: Subheader -->
    <div class="m-content">
        <?php if(Session::has('success')): ?>
            <div class="alert alert-success alert-dismissible fade show" role="alert">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"></button>
                <?php echo e(Session::get('success')); ?>

            </div>
        <?php endif; ?>
        <?php if(Session::has('error')): ?>
            <div class="alert alert-danger alert-dismissible fade show" role="alert">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"></button>
                <?php echo e(Session::get('error')); ?>

            </div>
        <?php endif; ?>
        <div class="m-portlet m-portlet--mobile">
            <div class="m-portlet__head">
                <div class="m-portlet__head-caption">
                    <div class="m-portlet__head-title">
                        <span class="m-portlet__head-icon">
                            <i class="fa fa-file-text-o"></i>
                        </span>
                        <h3 class="m-portlet__head-text">
                            TAT Performance
                        </h3>
                    </div>
                </div>
            </div>
            <div class="m-portlet__body">
                <div class="m-section">
                    <div class="m-section__content">
                        <div class="row col-md-12">
                            <div class="col-md-6">
                                <form id="search_credit_performance" class="form-horizontal" action="/admin/dashboard/credit_performance" method="POST" enctype="multipart/form-data">
                                    <input name="_token" value="<?php echo e(csrf_token()); ?>" type="hidden"/>
                                    <div class="row">
                                        
                                        <div class="col-md-6">
                                            <label>From Date</label>
                                            <input type="text" name="from_date" id="fl_from_date" class="form-control" placeholder="From Date" value="<?php echo e(Request::old('from_date', date('Y-m-d',strtotime($from_date)))); ?>" autocomplete="off"/>
                                        </div>
                                        <div class="col-md-6">
                                            <label>To Date</label>
                                            <input type="text" name="to_date" id="fl_to_date" class="form-control" placeholder="To Date" value="<?php echo e(Request::old('to_date', date('Y-m-d',strtotime($to_date)))); ?>" autocomplete="off"/>
                                        </div>
                                        <div class="col-md-6">
                                            <select class="form-control" name="merchant_id" id="merchant_id">
                                                <option value="">Select Merchant</option>
                                                <?php $__currentLoopData = $merchants; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $merchant): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo $merchant->id; ?>" <?php if(isset($merchant_id) && $merchant_id == $merchant->id): ?> selected="selected" <?php endif; ?>><?php echo $merchant->merchant_name; ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </div>
                                        <div class="col-md-12" style="padding-top: 28px">
                                            <input type="submit" class="btn btn-accent" value="Submit"/>
                                            <div class="btn btn-primary" onclick="return window.location = '/admin/dashboard/credit_performance';">Clear Filter</div>
                                        </div>
                                    </div>
                                </form>
                            </div>

                            <div class="col-md-6">
                                <code>TAT Rules</code>
                                <table class="table table-striped" style="display: inline-table;">
                                    <thead>
                                    <tr>
                                        <th>Loan Value</th>
                                        <th>Credit TAT</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td>Upto 75,000</td>
                                        <td>10 minutes in waiting for decision bucket</td>
                                    </tr>
                                    <tr>
                                        <td>75,001 - 2,00,000</td>
                                        <td>20 minutes in waiting for decision bucket</td>
                                    </tr>
                                    <tr>
                                        <td>2,00,001 - 5,00,000</td>
                                        <td>60 minutes in waiting for decision bucket</td>
                                    </tr>
                                    <tr>
                                        <td>Above 50,00,000</td>
                                        <td>180 minutes in waiting for decision bucket</td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>

                        <div>
                            <?php if(isset($reports) && count($reports) > 0): ?>
                            <table class="table table-striped" style="display: inline-table;">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>Advisor Name</th>
                                    <th>Merchant Name</th>
                                    <th>Name</th>
                                    <th>Loan Amount</th>
                                    <th>Decision To Document</th>
                                    <th>Decision To Pre-Approved</th>
                                    <th>Decision To Approved</th>
                                    <th>Decision To Reject</th>
                                    <th>Decision To In-Process</th>
                                    <th>Decision To Aborted</th>
                                    <th>Total Time</th>
                                    <th>Created At</th>
                                    <th>Status</th>
                                </tr>
                                </thead>
                                <tbody>
                                    <?php $__currentLoopData = $reports; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $report): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr>
                                            <td><?php echo $report['id']; ?></td>
                                            <td><?php echo $report['advisor_name']; ?></td>
                                            <td><?php echo $report['merchant_name']; ?></td>
                                            <td><?php echo $report['name']; ?></td>
                                            <td><?php echo $report['loan_amount']; ?></td>
                                            <td><?php echo $report['waiting_documents']; ?></td>
                                            <td><?php echo $report['waiting_pre_approved']; ?></td>
                                            <td><?php echo $report['waiting_approved']; ?></td>
                                            <td><?php echo $report['waiting_rejected']; ?></td>
                                            <td><?php echo $report['waiting_in_process']; ?></td>
                                            <td><?php echo $report['waiting_aborted']; ?></td>
                                            <td><?php echo $report['total_time']; ?></td>
                                            <td><?php echo $report['created_at']; ?></td>
                                            <td><?php echo $report['status']; ?></td>
                                        </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                            <?php else: ?>
                                <div style="text-align:center;padding-top: 35px;">No Data</div>
                            <?php endif; ?>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php echo $__env->make('admin.modal.email_reminders', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->make("admin.layouts.footer", array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
