<?php if(isset($cancelbooking_list)): ?>
    <?php $__currentLoopData = $cancelbooking_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
    <?php ($booking = $rows->booking); ?>

        <tr>
            <td><?php echo e($loop->iteration); ?></td>

            <td><?php echo e($booking->ms); ?></td>

            <td><?php echo e(ucfirst($booking->user->name)); ?></td>

            <td><?php echo e($booking->user->cnic); ?></td>

            <td><?php echo e($booking->user->contact); ?></td>
            <td><?php echo e(EF::showPlotFormat($booking->plot)); ?> </td>

            <td>
                <?php if($rows->status == "Approve"): ?> 
                <span class="badge badge-success"><?php echo e(EF::getstatus($rows->status)); ?></span>

                <?php elseif($rows->status == "Pending"): ?> 
                <span class="badge badge-primary"><?php echo e(EF::getstatus($rows->status)); ?></span>

                <?php else: ?>
                <span class="badge badge-warning"> <?php echo e($rows->status); ?></span>

                <?php endif; ?>
            </td>
            
            <td><?php echo e($booking->branch->name); ?></td>
            
            <td><?php echo e(EF::dateFormat($rows->created_at)); ?></td>

            <td class="text-center"> 
                <div class="item-action dropdown">
            <a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fa fa-list-ul"></i></a>
            <div class="dropdown-menu dropdown-menu-right">
                
                    <?php if(Auth::user()->hasAnyPermission(['All','View Cancel Form'])): ?>
                <a  href="<?php echo e(route('document.cancelbooking',['id' => Crypt::encrypt($booking->id)])); ?>"  class="dropdown-item"><i class="dropdown-icon fa fa-file "></i>Cancel Document</a>
                <?php endif; ?>

                    <?php if(Auth::user()->hasAnyPermission(['All','Cancel Booking Details'])): ?>
                <a  href="<?php echo e(route('bookingcancel.details',['id' => Crypt::encrypt($booking->id)])); ?>" content="View Details" class="dropdown-item"><i class="dropdown-icon fa fa-eye "></i> View Details</a>
                <?php endif; ?>

                <?php if(Auth::user()->hasAnyPermission(['All','Cancel Booking Ledger'])): ?>
                    <a onclick="showCancelBookingLedger(event,'<?php echo e(Crypt::encrypt($booking->id)); ?>');" href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fa fa-money"></i>Cancel Booking Ledger</a>
                    <?php endif; ?>  
                    
                    <?php if(Auth::user()->hasAnyPermission(['All'])): ?>  
                        <?php if($rows->status == 'Pending'): ?>
                        <a  href="<?php echo e(route('approvecancelbooking',['id' => Crypt::encrypt($booking->id)])); ?>"  class="dropdown-item "><i class="dropdown-icon fas fa-check "></i>Approve</a>
                        <?php endif; ?>

                    <?php endif; ?>

                    <?php if(Auth::user()->hasAnyPermission(['All','Remove Cancel Booking']) && $rows->isVerifyCancelBooking($rows->id)['status'] == true): ?>
                        <a  href="<?php echo e(route('removecancelbooking',['id' => Crypt::encrypt($rows->id)])); ?>"  class="dropdown-item  cls_delete" content="remove cancel booking"><i class="dropdown-icon fas fa-trash "></i>Remove Cancel</a>

                    <?php endif; ?>
                
            </td>
        </tr>

    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>   
    
<?php /**PATH /home/ubuntu/rebmgisplus/skylite/resources/views/components/booking/table_cancelbooking.blade.php ENDPATH**/ ?>