

<?php $__env->startSection('title'); ?>
    Agent Sales
<?php $__env->stopSection(); ?>

<?php $__env->startSection('style'); ?>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" />
    <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
    <link href="https://cdn.jsdelivr.net/npm/select2@4.0.12/dist/css/select2.min.css" rel="stylesheet" />
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                <span class="fa fa-book"></span> Agent Sales
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-book"></i> Admin Panel</a></li>
                <li class="active">Agent Sales</li>
            </ol>
        </section>
        <div style="margin: 20px;"></div>

        <!-- Main content -->
        <section class="content">
            
            <div style="margin: 1px;"></div>

            <div>

            <form action="<?php echo e(route('reports.sales.agent')); ?>" method="post" class="form-inline form-template">
              <?php echo e(csrf_field()); ?>

              <div class="clearfix"></div>
              <div class="col-lg-6">
                 <div class="form-group width-100-percent" style="padding:20px;">
                      <div class="col-md-6 no-padding">
                        <label for="" class="not-required">From Date:</label>
                      </div>
                      <div class="col-md-6 no-padding">
                       <div class='input-group date year-datetimepicker'>
                          <input type='text' name="dtFrom" id="dtFrom" class="form-control" required="required" />
                          <span class="input-group-addon">
                              <i class="fa fa-calendar" aria-hidden="true"></i>
                          </span>
                       </div>
                      </div>

                      <div class="col-md-6 no-padding">
                          <label for="" class="not-required">To Date:</label>
                        </div>
                        <div class="col-md-6 no-padding">
                         <div class='input-group date year-datetimepicker'>
                            <input type='text' name="dtTo" id="dtTo" class="form-control" required="required" />
                            <span class="input-group-addon">
                                <i class="fa fa-calendar" aria-hidden="true"></i>
                            </span>
                         </div>
                        </div>
                     <div class="col-md-6 no-padding">
                           <label for="developer" class="not-required">Agent:</label>
                      </div>
                     <div class="col-md-6 no-padding">
                     <select class="form-control" id="agent" name="agent" style="width: 120%;">
                        <option></option>
                        <?php $__currentLoopData = $agents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$agent): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($agent->id); ?>"><?php echo e($agent->fullname); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                     </select>
                    </div>

                    <div class="col-md-6 no-padding">
                          <label for="month" class="not-required"></label>
                     </div>

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

                <div class="form-group " style="padding-top:30px;">
                    <button id="btnOK" name="btnOK" type="submit" class="btn btn-success"><i class="fa fa-filter" aria-hidden="true"></i> Generate</button>
                </div>

              </div>

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

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

            <?php if(Session('info')): ?>
                <div class="row">
                    <div class="col-md-6 col-md-offset-3 text-center">
                        <div class="tem alert alert-success navbar-fixed-bottom"><span class="glyphicon glyphicon-ok-circle"></span> <?php echo e(Session('info')); ?></div>
                    </div>
                </div>
            <?php endif; ?>

        </section>

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

<?php $__env->startSection('script'); ?>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/select2@4.0.12/dist/js/select2.min.js"></script>

    <script>
        $(document).ready(function() {
            $('.year-datetimepicker').datetimepicker({
               format: 'YYYY-MM-DD'
            });
            $('#agent').select2();
        });
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>