%PDF- %PDF-
Direktori : /home/ugotscom/public_html/dg/application/modules/agent/views/ |
Current File : /home/ugotscom/public_html/dg/application/modules/agent/views/agentview - Copy.php |
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.min.js"></script> <div class="content-wrapper"> <section class="content-header"> <h1>Today Sales Report <?php echo date("d.m.Y");?> </h1> </section> <section class="content"> <div class="row"> <div class="col-lg-3 col-xs-6"> <div class="small-box bg-yellow"> <div class="inner"> <h3><?=$totalcount;?></h3> <p>Orders</p> </div> <div class="icon"> <i class="ion ion-person-add"></i> </div> <a href="<?=base_url();?>emp/" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a> </div> </div> <div class="col-lg-3 col-xs-6"> <div class="small-box bg-yellow"> <div class="inner"> <h3><?=$hot_leads;?></h3> <p>Hot Leads</p> </div> <div class="icon"> <i class="ion ion-person-add"></i> </div> <a href="<?=base_url();?>emp/" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a> </div> </div> <div class="col-lg-3 col-xs-6"> <div class="small-box bg-green"> <div class="inner"> <h3><?=$warm_leads;?></h3> <p>Warm Leads</p> </div> <div class="icon"> <i class="fa fa-tag"></i> </div> <a href="<?=base_url();?>user" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a> </div> </div> <div class="col-lg-3 col-xs-6"> <div class="small-box bg-blue"> <div class="inner"> <h3><?=$closed_leads;?></h3> <p>Closed Leads</p> </div> <div class="icon"> <i class="fa fa-shopping-cart"></i> </div> <a href="<?=base_url();?>user" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a> </div> </div> </div> <div class="row"> <div class="col-md-12"> <form method="post" action="<?=base_url()?>agent/agentsearch"> <select name="user_id" class="form-control" placeholder="enquiry_source" required> <?php foreach ($category->result() as $row) :?> <option value="<?php echo $row->user_id;?>"><?php echo $row->name;?></option> <?php endforeach;?> </select> <input name="searchdate" type="date" placeholder="date2"> <button class="" type="submit" value="submit">SEARCH</button> </form> <p>Total Leads Generated by Each Staff</p> <table id="example1" class="table table-bordered table-striped"> <thead> <tr> <th class="text-center">lead Id</th> <th class="text-center">Leads </th> <th class="text-center">Lead Type</th> </tr> </thead> <tbody> <?php foreach ($details as $list) { ?> <tr> <td class="text-center"><?=$list['lead_id'];?></td> <td class="text-center"><?=$list['customer_name'];?></td> <td class="text-center"><?=$list['Lead_type'];?></td> </tr> <?php } ?> </tbody> </table> <br> </div> </div> </section> </div> <script> $(document).ready(function(){ // Setup datatables $.fn.dataTableExt.oApi.fnPagingInfo = function(oSettings) { return { "iStart": oSettings._iDisplayStart, "iEnd": oSettings.fnDisplayEnd(), "iLength": oSettings._iDisplayLength, "iTotal": oSettings.fnRecordsTotal(), "iFilteredTotal": oSettings.fnRecordsDisplay(), "iPage": Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength), "iTotalPages": Math.ceil(oSettings.fnRecordsDisplay() / oSettings._iDisplayLength) }; }; var table = $("#mytable").dataTable({ initComplete: function() { var api = this.api(); $('#mytable_filter input') .off('.DT') .on('input.DT', function() { api.search(this.value).draw(); }); }, oLanguage: { sProcessing: "loading..." }, processing: true, serverSide: true, ajax: {"url": "<?php echo base_url().'index.php/emp/get_product_json'?>", "type": "POST"}, columns: [ {"data": "lead_id"}, {"data": "customer_name"}, //render number format for price {"data": "enquiry_source"}, {"data": "lead_type_id"}, {"data": "added_by"}, {"render": function ( type, full, meta) { return '<a class="btn btn-info" href="http://localhost/BOS/emp/edit/' + full.lead_id + '">Edit</a>'; } }, {"render": function (data, type, full, meta) { return '<a class="btn btn-info" href="<?php echo base_url(); ?>emp/view/' + full.lead_id + '">View</a>'; } } ], order: [[0, 'desc']], rowCallback: function(row, data, iDisplayIndex) { var info = this.fnPagingInfo(); var page = info.iPage; var length = info.iLength; $('td:eq(0)', row).html(); } }); // end setup datatables // get Edit Records $('#mytable').on('click','.edit_record',function(){ var code=$(this).data('code'); var name=$(this).data('name'); var price=$(this).data('price'); var category=$(this).data('category'); $('#ModalUpdate').modal('show'); $('[name="user_id"]').val(code); $('[name="product_name"]').val(name); $('[name="price"]').val(price); $('[name="category"]').val(category); }); // End Edit Records // get delete Records $('#mytable').on('click','.delete_record',function(){ var code=$(this).data('code'); $('#ModalDelete').modal('show'); $('[name="user_id"]').val(code); }); // End delete Records }); </script>