%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/ugotscom/public_html/dg/application/modules/target/views/
Upload File :
Create Path :
Current File : /home/ugotscom/public_html/dg/application/modules/target/views/target.php

<script src="https:cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"></script>
  <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

<style>
.agentwise{
  display:none;
}
</style>
<div class="content-wrapper">
     <section class="content-header">
          <h1>Target OverView</h1>
<select id='purpose'>
<option value="1" selected>Search by Dates Only</option>
<option value="2">Search by Date and sales staff</option>
</select>

          <div class="daterange">
            <p>Search by Date Range</p>
            <form method="post" class="form-inline" action="<?=base_url()?>target/targetsearch">
    
<input name="date1" type="date" placeholder="date1">
<input name="date2" type="date" placeholder="date2">

<button class="" type="submit" value="submit">SEARCH</button>

  </form>
</div>
        <div class="agentwise">
          <p>Search by Date Range & Sales Staff</p>
            <form method="post" action="<?=base_url()?>target/agentsearch">
    
<input name="date1" type="date" placeholder="date1">
<input name="date2" type="date" placeholder="date2">
<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>
<button class="" type="submit" value="submit">SEARCH</button>

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

     <section class="content">
        
               
          <div class="row">
<div class="col-md-6">
 
  <p>Target Achieved</p>
    
       <table id="example1" class="table table-bordered table-striped">
                            <thead>
                                <tr>
                                  
                            <th class="text-center">Date</th>
                                  <th class="text-center">Sales Staff</th>
                                     <th class="text-center">Target</th>
                                                              
                                </tr>
                            </thead>
                            <tbody>
                                <?php $i=1;
                                foreach ($targetcount as $value) { ?>
                                <tr>
                                  <td class="text-center"><?=$value['added_date'];?></td>
                                    <td class="text-center"><?=$value['name'];?></td>

                                    <td class="text-center"><?=$value['total'];?></td>
                             <td class="text-center"><?php if($value['total'] >=30){
                            ?>
<button type="button" class="btn btn-success">Achieved</button>
                            <?php   

                             }  else { ?> <button type="button" class="btn btn-danger">Not Achieved</button> <?php } ?>
                           </td>
                       
                            </tr>
                          <?php } ?>
                            </tbody>
                        </table>
</div>
<div class="col-md-6">

</div>

          </div>
        
       


     </section>
</div>
 

<script>
$(document).ready(function(){
  $(".daterange").hide();
    $('#purpose').on('click', function() {
      if ( this.value == '1')
      {
        $(".daterange").show();
        $(".agentwise").hide();
      }
      else 
      {
        $(".daterange").hide();
        $(".agentwise").show();
      }

    });
});
</script>

Zerion Mini Shell 1.0