<style>

    span.badge {
        font-size: 13px !important;
        padding: 10px !important;
    }

</style>
<?php $__env->startSection('content'); ?>
    <?php if(session('success')): ?>
        <div class="alert alert-success alert-dismissable fade show">
            <button class="close" data-dismiss="alert" aria-label="Close">×</button>
            <?php echo e(session('success')); ?>

        </div>
    <?php endif; ?>
    <!-- row -->
    <div class="row row-sm">
        <div class="col-xl-12">
            <div class="card">
                <div class="card-header pb-0">
                    <div class="d-flex justify-content-between">
                        <div class="col-lg-12 margin-tb">
                            <h5 class="pull-right alert alert-sm alert-danger">عرض كل الاشتراكات </h5>
                        </div>
                        <br>
                    </div>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table table-condensed table-striped table-bordered text-center table-hover"
                               id="example-table">
                            <thead>
                            <tr>
                                <th class="text-center">#</th>
                                <th class="text-center">اسم الشركة</th>
                                <th class="text-center">نوع الاشتراك</th>
                                <th class="text-center">فترة الاشتراك بالايام</th>
                                <th style="width: 15% !important;" class="text-center">البداية</th>
                                <th style="width: 15% !important;" class="text-center">النهاية</th>
                                <th class="text-center">حالة</th>
                                <th class="text-center">تعديل</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php
                                $i=0;
                            ?>
                            <?php $__currentLoopData = $subscriptions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $subscription): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php if(!$subscription->company->clients->isEmpty()): ?>
                                    <tr>
                                        <td><?php echo e(++$i); ?></td>
                                        <td><?php echo e($subscription->company->company_name); ?></td>
                                        <td><?php echo e($subscription->type->type_name); ?></td>
                                        <td><?php echo e($subscription->type->period); ?></td>
                                        <td><?php echo e($subscription->start_date); ?></td>
                                        <td><?php echo e($subscription->end_date); ?></td>
                                        <td>
                                            <?php if($subscription->status == 'active'): ?>
                                                <span class="badge badge-success">
                                                    مفعل
                                                </span>
                                            <?php elseif($subscription->status == 'blocked'): ?>
                                                <span class="badge badge-danger">
                                                    معطل
                                                </span>
                                            <?php endif; ?>
                                        </td>
                                        <td>
                                            <a href="<?php echo e(route('admin.subscriptions.edit', $subscription->id)); ?>"
                                               class="btn btn-sm btn-info" data-toggle="tooltip"
                                               title="تعديل" data-placement="top"><i class="fa fa-edit"></i></a>
                                        </td>
                                    </tr>
                                <?php endif; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<script src="<?php echo e(asset('app-assets/js/jquery.min.js')); ?>"></script>
<script>
    $(document).ready(function () {

    });
</script>

<?php echo $__env->make('admin.layouts.app-main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/barasys/public_html/resources/views/admin/subscriptions/index.blade.php ENDPATH**/ ?>