<?php $__env->startSection("content"); ?>
<!--<div><h3><?php echo e(trans("home.welcome")); ?></h3></div>-->



	<div style="clear:both;height:100px;"></div>
	<div style="width:24%;float:left;">
		<div data-type="false" data-theme="blue" class="departs-under border-blue departs">
          <h4>Open Expense</h4>
          <h2 style="display:block;"><?php echo $Pending; ?></h2>
          <p style="display:block;">Request</p>
        </div>
    </div> 
    
    <div style="width:24%;float:left;margin-left:1%;">
		<div data-type="false" data-theme="green" class="departs-under border-green departs">
          <h4>Approved Expense</h4>
          <h2 style="display:block;"><?php echo $Approved; ?></h2>
          <p style="display:block;">Request</p>
        </div>
    </div> 
    
    <div style="width:24%;float:left;margin-left:1%;">
		<div data-type="false" data-theme="red" class="departs-under border-red departs">
          <h4>Overdue Expense</h4>
          <h2 style="display:block;"><?php echo $Overdue; ?></h2>
          <p style="display:block;">Request</p>
        </div>
    </div>
    
    <div style="width:24%;float:right;">
		<div data-type="false" data-theme="black" class="departs-under border-black departs">
          <h4>Closed Expense</h4>
          <h2 style="display:block;"><?php echo $Closed; ?></h2>
          <p style="display:block;">Request</p>
        </div>
    </div>
    
    <div style="clear:both;height:20px;"></div>
    <!-- #########################################################################################-->
    <div class="expense-table expense-table-home">
    <table class="table table-bordered">
              <thead>
                <tr> 
                  <th>Requests</th>
                  <th>$</th>
                  <th>Approvers</th>
                  <th>Details</th>
                </tr>
              </thead>
              <tbody>
              <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
              <?php if(count($expenses)>0): ?>
              <?php $i=0; ?>
              <?php foreach($expenses as $row): ?>
              <?php
                  $color = "purple";
                  if($row->status=="Pending"){ $color = "yellow"; }
                  if($row->status=="Approved"){ $color = "green"; }
                  if($row->status=="Denied"){ $color = "red"; }
				  if($row->status=="Closed"){ $color = "black"; }
                ?>
              <tr class="border-<?php echo e($color); ?>"> 
                <td class="requests"><h5><a href="/expenses/show/<?php echo e($row->id); ?>" style="text-decoration:none; color:inherit !important;"><?php echo e($row->item); ?></a></h5><!--<h5><a class="fancybox fancybox.ajax" href="/expenses/show/<?php echo e($row->id); ?>" style="text-decoration:none; color:inherit !important;"><?php echo e($row->item); ?></a></h5>-->
                  <p>From: <span><?php echo e($row->user); ?></span>, Created: <span><?php echo e(\App\Providers\Common::format_date($row->created_at)); ?></span> </p>
                  <?php if($row->comments != ''): ?>
                  	<p><strong>Comments: </strong><?php echo e($row->comments); ?></p>
                  <?php endif; ?>
                  <div style="clear:both;height:5px;"></div>
                  <div class="" id="comments_box_<?php echo e($row->id); ?>" style="display:none;">
                  	<div style="float:left;margin-top:8px;"><strong>Comments: </strong></div> <textarea name="comments[<?php echo e($row->id); ?>]" id="comments_<?php echo e($row->id); ?>" style="width:320px;height:42px;margin-left:10px;"></textarea>
                  </div>
                  
                  <!--<p><span class="red">Late</span> by <span>Nosa Obaseki</span></p>--></td>
                <td class="amount"><p><?php echo e(\App\Providers\Common::format_currency($row->budget)); ?></p>
                  <a href="/expenses/show/<?php echo e($row->id); ?>" style="text-decoration:none; color:inherit !important;"><span class="overdue bg-<?php echo e($color); ?>"><?php echo e($row->status); ?></span></a></td>
                <td class="approvers">
                <?php if($row->approver!=""): ?>
                <div class="group"> <p align="center"><img src="/uploads/<?php echo e($row->approver_logo); ?>" width="20px" /></p>
                    <p><?php echo e($row->approver); ?></p>
                </div>
                <?php endif; ?>
                </td>
                <td class="details"><h5><?php echo e($row->category); ?></h5>
                  <p><span><?php echo e(\App\Providers\Common::format_currency($row->price)); ?></span> requested</p>
                  <p class="green"><span><?php echo e(\App\Providers\Common::format_currency($row->budget-$row->price)); ?></span> Left</p>
                  <p class="priority"><strong>Priority: </strong><?php echo e($row->priority); ?></p>	  
                </td>
              </tr>
              <?php if($i==count($colors)-1){$i=-1;} $i++; ?>
              <?php endforeach; ?>
              <?php endif; ?>
                </tbody>
              
            </table>
            </div>
    <!-- #########################################################################################-->
        <div style="clear:both;height:20px;"></div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make("app", array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>