 
<?php 

 
?>


<?php $__env->startSection('contentchild'); ?>
    <style>

.help-block{
  color:red;
}
.is-invalid{border:1px solid red !important;}
      </style>   

<script type="text/javascript">
  
function printData()
{
  //alert("ram");
   var divToPrint=document.getElementById("dataTable");
    divToPrint.border = 1;
        divToPrint.cellSpacing = 0;
        divToPrint.cellPadding = 2;
        divToPrint.style.borderCollapse = 'collapse';
   newWin= window.open("");

 
    newWin.document.write("<h4 align='center'>SANGYA CONSTRUCTION MANAGEMENT SYSTEM </h4>");
     newWin.document.write("<h5 align='center'>Expenses List </h5>");
      $('tr').children().eq(8).hide();
      $('table tr').find('td:eq(8)').hide();
   newWin.document.write(divToPrint.outerHTML);
   newWin.print();
    $('tr').children().eq(8).show();
    $('table tr').find('td:eq(8)').show();
   newWin.close();
}

</script>
<?php
$data=App\Project::all()->pluck('id','projectnm');

?>


<div class="col-sm-12">
   
<form action="<?php echo e(url('expenseslist')); ?>" method="post">
  <?php echo csrf_field(); ?>
  <div class="card-body"> 
<div class="row" style="border:1px solid">

  <div class="col-sm-3" >
    <label>date</label>
   <input type="text" name="date" class="datepicker-here form-control" data-language="en"/><br/>
 </div>

 <div class="col-sm-3" >
    <label>project</label>
<select name='project_id' class="form-control">
    <option value=''>-- Select--</option>
<?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
 <option value="<?php echo e($value); ?>"><?php echo e($key); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>

 
<div class="col-sm-3" >
    <label>Status</label>
<select name='is_approved' class="form-control">
    <option value=''>-- Select--</option>
    <option value="0">Pending</option>
    <option value="1">Approved</option>
    <option value="2">Disapproved</option>

</select>
</div>


<div class="col-sm-3" >
    <label>&nbsp;</label><br/> 
<input type="submit" value="Find" class="btn btn-success" />
</div>
  </div>

 </form>
</div>
<div class="row"><br/>
<div class="col-sm-6 text-left">
 <a href="<?php echo e(url('createproject')); ?>" >Add Project+ </a>
</div>
<div class="col-sm-6  text-right">
 <button onclick="printData()" class="btn btn-primary" >Print me</button>
</div>
</div><br/>

 <?php $__currentLoopData = ["success","error"]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if(Session::has($status)): ?>
<div class="alert alert-<?php echo e($status); ?> alert-dismissible">
  <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
  <strong><?php echo e($status); ?>!</strong> <?php echo e(Session::get($status)); ?> action.
</div>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  <?php 
 

  ?>                
 <div class="card mb-4">
<div class="card-header">
<i class="fas fa-table mr-1"></i>
     Project List
</div>  
 <div class="card-body">  
  <div class="table-responsive"> 
<table  class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
  
  <th>Sr No.</th> <th>Project</th> <th>location</th> <th>State</th> <th>District</th> <th>Name</th> <th>role</th> <th>Balance</th>     <th>Action</th>
</tr>
</thead>
<tbody>
<?php $i=0; ?>
<?php $__currentLoopData = $Explist; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $exp): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

<tr>
  <td><?php echo e(++$i); ?></td>

<td><?php echo e($exp->projectnm); ?></td>
  <td><?php echo e($exp->location); ?></td>

  <td><?php echo e($exp->state); ?></td>
  <td><?php echo e($exp->district); ?></td>
  <td><?php echo e($exp->name); ?></td>
  <td><?php echo e($exp->role); ?></td>
  <td><?php echo e($exp->opening_balance); ?></td>
   
  <td> 
  
    
  </td>

</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>

</table>

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


     <?php $__env->stopSection(); ?>
             
<?php echo $__env->make('layout/master2', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\sangya\resources\views/projectlist.blade.php ENDPATH**/ ?>