

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

    <br/>
    <?php if( auth()->user()->create_ ): ?>
    <a href="<?php echo e(url('/trust/create')); ?>"  class="btn" style="background-color:#2C4E71;color:#FFF;margin-left:10px">Create New trust </a><br/><br/>
    <?php else: ?>
	    <span>&nbsp;&nbsp;</span>
    <?php endif; ?>

 
    
    <div class="card">
               
              <!-- /.card-header -->
              <div class="card-body">
                <table id="example1" class="table table-bordered table-striped">
                  <thead>
                  
                 <tr >
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> أسم العهدة    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> نوع العهدة    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> الحالة  </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> الحالة  </th>

                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> المبلغ الابتدائي  </th>

                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> المبلغ المراد بالزيادة  </th>

                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> Actions  </th>

                 </tr>
                 </thead>
              <tbody>
                           
                <?php foreach( $trusts as $trust ): ?>   
                 
                 

                 
                <tr >
                 
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($trust->name); ?> </td>
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($trust->type); ?> </td>

                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($trust->status); ?> </td>
                  <?php if( $trust->approve == "Waiting" ): ?>
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px; background-color:orange" > Waiting...</td>
                  <?php elseif( $trust->approve == "Approved" ): ?>
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px;background-color:green;color:#FFF" >  Approved </td>
                  <?php else: ?>
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px;background-color:red" >  Rejected </td>
                  <?php endif; ?> 

                  
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" >
                  <?php echo e($trust->amount); ?>  

                </td>
                  
                <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" >
                  <?php echo e($trust->increment_amount); ?>  &nbsp;&nbsp;
                  
                  <?php if($trust->increment_amount > 0 && $trust->increment_approve == "Waiting" ): ?>
                   <img src='<?php echo e(asset("theme/dist/img/wait.png")); ?>' alt="Egwaste"  style="height:30px"   />
                  <?php endif; ?>
                  <?php if($trust->increment_approve == "Rejected"  ): ?>
                   <img src='<?php echo e(asset("theme/dist/img/rejected.png")); ?>' alt="Egwaste"  style="height:30px"   />
                  <?php endif; ?>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  
                  <?php if($trust->approve == "Approved" && $trust->status == "Active" ): ?>
                  <a   href='<?php echo e(url("/trust/increment_amount/$trust->id")); ?>'  style="color:blue" >   <i class="fa fa-plus" style="font-size:18px"></i> </a>
                  <?php endif; ?>
                </td>
                  
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" > 
                  
                  <a   href='<?php echo e(url("/trust/edit/$trust->id")); ?>'  > <i class="fa fa-edit" style="font-size:18px"></i>  </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  
                  
                  <a   href='<?php echo e(url("/trust/tie_details/$trust->id")); ?>'  style="color:green" > تفاصيل  </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 
                </td>

                </tr>
               <?php endforeach; ?>
                </tbody>
                </table>
              </div>
              <!-- /.card-body -->
            </div>  

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

<?php echo $__env->make('layouts.masterHome2', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>