

<?php $__env->startSection('title', 'Channels List'); ?>

<?php $__env->startSection('content'); ?>
    <div class="container-fluid">

        <!-- Page Heading -->
        <div class="d-sm-flex align-items-center justify-content-between mb-4">
            <h1 class="h3 mb-0 text-gray-800">Dealing Channels</h1>
            <div class="row">
                <div class="col-md-6">
                    <a href="<?php echo e(route('channellist.createChannels')); ?>" class="btn btn-sm btn-primary">
                        <i class="fas fa-plus"></i> Add New
                    </a>
                </div>
                <div class="col-md-6">
                    <a href="#" class="btn btn-sm btn-success">
                        <i class="fas fa-check"></i> Export To Excel
                    </a>
                </div>
                
            </div>

        </div>

        
        <?php echo $__env->make('common.alert', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        <!-- DataTales Example -->
        <div class="card shadow mb-4">
            <div class="card-header py-3">
                <h6 class="m-0 font-weight-bold text-primary">All Channels</h6>

            </div>
            <div class="card-body">
                <div class="table-responsive">
                    <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
                        <thead>
                            <tr>
                           
                            <th width="15%">Code</th>
                                <th width="25%">Name</th>
                               <th width="25%">Description</th>
                                <th width="15%">Status</th>
                                <th width="10%">Action</th>
                            </tr>
                        </thead>
                        <tbody>
                     




                      
                        <?php $__currentLoopData = $channels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                               
                        <tr>
                                    <td><?php echo e($row->code); ?></td>
                                    <td><?php echo e($row->name); ?></td>
                                   <td><?php echo e($row->description); ?></td>
                                    
                                    <td>
                                        <?php if($row->status == 0): ?>
                                            <span class="badge badge-danger">Inactive</span>
                                        <?php elseif($row->status == 1): ?>
                                            <span class="badge badge-success">Active</span>
                                        <?php endif; ?>
                                    </td>
                                    <td style="display: flex">
                                        <?php if($row->status == 0): ?>
                                            <a href="<?php echo e(route('channellist.updatechannelStatus', ['id' => $row->id, 'status' => 1])); ?>"
                                                class="btn btn-success m-2">
                                                <i class="fa fa-check"></i>
                                            </a>
                                        <?php elseif($row->status == 1): ?>
                                            <a href="<?php echo e(route('channellist.updatechannelStatus', ['id' => $row->id, 'status' => 0])); ?>"
                                                class="btn btn-danger m-2">
                                                <i class="fa fa-ban"></i>
                                            </a> 
                                        <?php endif; ?>
                                        <a href="<?php echo e(route('channellist.channeldit', ['id' => $row->id])); ?>"
                                            class="btn btn-primary m-2">
                                            <i class="fa fa-pen"></i>
                                        </a> 
                                        <a class="btn btn-danger m-2" href="#" data-toggle="modal" data-target="#deletewhModal">
                                            <i class="fas fa-trash"></i>
                                        </a>
                                        
                                    </td>
                                </tr>

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

                    <?php echo e($channels->links()); ?>

                    <!-- <?php echo $channels->render(); ?> -->
                </div>
            </div>
        </div>

    </div>
  
    <?php if($channels->count() > 0 ): ?>
<?php if(isset($channels) && !empty($channels)): ?>

    <?php echo $__env->make('Channels.delete-channelmodel', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    
<?php endif; ?>
<?php endif; ?>
<?php $__env->stopSection(); ?>

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

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\Pathman\Laravel_Samples\Production_Control\resources\views/Channels/channelslist.blade.php ENDPATH**/ ?>