<?php if (isset($component)) { $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\AdminPanelLayout::class, []); ?>
<?php $component->withName('admin-panel-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('title'); ?>
        لیست خدمات
     <?php $__env->endSlot(); ?>
     <?php $__env->slot('main'); ?>
        <!-- Checked checkbox -->
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0 text-dark">لیست خدمات</h1>
                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-left">

                            <li class="breadcrumb-item">مدیریت خدمات</li>
                            <li class="breadcrumb-item active">لیست خدمات</li>
                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <section class="content mt-sm-3">
            <div class="card">
                <div class="card-header">
                    <h3 class="card-title">خدمت ها</h3>
                </div>
                <!-- /.card-header -->
                <div class="card-body p-0">
                    <div class="alert alert-success col-md-11 mx-auto mt-2 d-none" role="alert" id="alertDelUser">
                        نقش با موفقیت حذف گردید
                    </div>
                    <form class="d-flex justify-content-around mt-3 mb-1" action="<?php echo e(route('role_permission.index')); ?>">
                        <div class="form-row align-items-center">
                            <div class="col-4 my-1">
                                <select name="filter" class="custom-select mr-sm-2" id="inlineFormCustomSelect">
                                    <option selected hidden>بر اساس</option>
                                    <option value="id">آیدی</option>
                                </select>
                            </div>
                            <div class="col-4 my-1">
                                <input name="value" type="text" class="form-control" id="inlineFormInputName"
                                       placeholder="مقدار" value="<?php echo e(old('value',request()->value)); ?>">
                            </div>
                            <div class="col-auto my-1 col-4">
                                <button type="submit" class=" btn btn-outline-info">جستجو</button>
                            </div>
                        </div>
                    </form>

                    <div class="tableSection bg-light smSmall p-0 pr-sm-4 pl-sm-4 pt-sm-4 pb-0 table-responsive">
                        <table class="table table-striped text-center ">
                            <thead>
                            <tr>
                                <th scope="col">ID</th>
                                <th scope="col">تصویر</th>
                                <th scope="col">نام خدمت</th>
                                <th scope="col">دسته پدر</th>
                                <th scope="col">الویت نمایش</th>
                                <th scope="col">عملیات</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php $__currentLoopData = $services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr id="tr<?php echo e($service->id); ?>">
                                    <th scope="row"><?php echo e($service->id); ?></th>
                                    <td scope="row">
                                        <?php if($service->banner): ?>
                                            <img src="<?php echo e($service->banner->mid()); ?>" style="width: 3rem;height: 2.5rem">
                                        <?php else: ?>
                                        ندارد
                                        <?php endif; ?>
                                    </td>
                                    <td><?php echo e($service->name); ?></td>
                                    <td><?php echo e($service->parent ? $service->parent->name : '-'); ?></td>
                                    <td><?php echo e($service->priority ?? "وارد نشده"); ?></td>
                                    <td class="d-flex justify-content-center">

                                        <a class="btn btn-sm btn-primary ml-3" href="<?php echo e(route('service.edit',$service->id)); ?>" title="ویرایش">
                                            <i class="fa fa-pencil-square-o text-light"></i>
                                        </a>
                                        <?php if($service->parent()->exists()): ?>
                                        <a class="btn btn-sm btn-danger ml-3" href="<?php echo e(route('service.regions',$service->id)); ?>" title="مناطق ارائه">
                                            <i class="fa fa-map-marker text-light" aria-hidden="true"></i>
                                        </a>
                                        <?php endif; ?>
                                        <?php if($service->parent()->exists()): ?>
                                        <a class="btn btn-sm btn-success ml-3" href="<?php echo e(route('service.show',$service->id)); ?>" title="مشاهده">
                                            <i class="fa fa-eye text-light" aria-hidden="true"></i>
                                        </a>
                                        <?php endif; ?>
                                        <?php if($service->parent()->exists()): ?>
                                        <a class="btn btn-sm btn-info ml-3" href="<?php echo e(route('service.description',$service->id)); ?>" title="توضیحات">
                                            <i class="fa fa-newspaper-o text-light" aria-hidden="true"></i>
                                        </a>
                                        <?php endif; ?>
                                        <?php if($service->parent()->exists()): ?>
                                            <a class="btn btn-sm btn-warning ml-3" href="<?php echo e(route('service.question',$service->id)); ?>" title="سوالات">
                                                <div class="text-dark" style="font-weight: bold">&quest;</div>
                                            </a>
                                        <?php endif; ?>
                                        <?php if($service->parent()->exists()): ?>
                                            <a class="btn btn-sm btn-outline-secondary ml-3" href="<?php echo e(route('service.price',$service->id)); ?>" title="قیمت ها">
                                                <i class="fa fa-usd " aria-hidden="true"></i>
                                            </a>
                                        <?php endif; ?>
                                        <a class="btn btn-sm ml-3" onclick="statusItem(event,'<?php echo e(route('service.status',$service->id)); ?>',<?php echo e($service->id); ?>)" title="تغیر وضعیت">
                                            <i class="fa fa-toggle-on <?php echo e($service->status == \Mehrab\Service\Models\Service::ACTIVE ? 'text-info' : 'text-danger'); ?>"
                                               id="status<?php echo e($service->id); ?>"
                                               style="font-size: 1rem" aria-hidden="true">
                                            </i>
                                        </a>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>

                </div>
                <!-- /.card-body -->
            </div>
        </section>
     <?php $__env->endSlot(); ?>
    <?php if(session()->get('status') == 'created'): ?>
         <?php $__env->slot('linkScript'); ?>
            <script>
                Swal.fire({
                    icon: 'success',
                    text: 'ایجاد خدمت با موفقیت انجام شد',
                })
            </script>
         <?php $__env->endSlot(); ?>
    <?php endif; ?>
    <?php if(session()->get('status') == 'updated'): ?>
         <?php $__env->slot('linkScript'); ?>
            <script>
                Swal.fire({
                    icon: 'success',
                    text: 'ویرایش خدمت با موفقیت انجام شد',
                })
            </script>
         <?php $__env->endSlot(); ?>
    <?php endif; ?>
 <?php if (isset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5)): ?>
<?php $component = $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5; ?>
<?php unset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5); ?>
<?php endif; ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php /**PATH C:\wamp64\www\newer\Modules\Mehrab\Service\Providers/../Resources/Views//Admin/list_service.blade.php ENDPATH**/ ?>
