<?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>

                    <div class="mx-auto my-3 d-flex">
                        <button type="button" class="btn btn-primary mx-auto btn-sm" data-toggle="modal"
                                data-target="#exampleModalCenter">
                            جست و جو
                        </button>
                    </div>

                    <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 small">
                            <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>
                                <th scope="col">تاریخ ثبت</th>
                                <th scope="col">عملیات</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php $__currentLoopData = $comments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $comment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr id="tr<?php echo e($comment->id); ?>">
                                    <th scope="row"><?php echo e($comment->id); ?></th>
                                    <td><?php echo e($comment->user->name); ?></td>
                                    <td><?php echo e($comment->service->name); ?></td>
                                    <td><?php echo e($comment->order->code); ?></td>
                                    <td><?php echo e($comment->expert->name); ?></td>
                                    <td><?php echo e($comment->rate); ?></td>
                                    <td><?php echo e(IR_TimestampToDate($comment->created_at)); ?></td>
                                    <td class="d-flex justify-content-around">
                                        <button
                                            onclick="showReportSettlement('<?php echo e($comment->content); ?>')"
                                            type="button" class="btn btn-sm btn-info" data-toggle="modal"
                                            data-target=".bd-example-modal-sm"><i class="fa fa-newspaper-o"></i>
                                        </button>
                                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check(\Mehrab\RolePermission\Models\Permission::PERMISSION_MANAGE_COMMENT)): ?>
                                            <a class="btn btn-sm btn-danger" onclick="deleteItem(event,'<?php echo e(route('service_comments.destroy',$comment->id)); ?>',<?php echo e($comment->id); ?>)" title="حذف"><i class="fa fa-trash text-light"></i></a>
                                            <a class="btn btn-sm"
                                           onclick="statusItem(event,'<?php echo e(route('service_comments.status',$comment->id)); ?>',<?php echo e($comment->id); ?>)"
                                           title="تغیر وضعیت">
                                            <i class="fa fa-toggle-on <?php echo e($comment->status == \Mehrab\Comment\Models\CommentService::ACTIVE? 'text-info' : 'text-danger'); ?>"
                                               id="status<?php echo e($comment->id); ?>" style="font-size: 1rem" aria-hidden="true"></i>
                                        </a>
                                        <?php endif; ?>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                    <?php echo e($comments->appends(request()->query())->links()); ?>

                </div>
                <!-- /.card-body -->
            </div>


            <div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel"
                 aria-hidden="true">
                <div class="modal-dialog modal-sm" style="margin-top: 7rem !important;">
                    <div class="modal-content p-3" id="report_body">
                        پیام
                    </div>
                </div>
            </div>


        <!-- Modal -->
            <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog"
                 aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
                <div class="modal-dialog modal-dialog-centered" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <h5 class="modal-title" id="exampleModalLongTitle"></h5>
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                <span aria-hidden="true">&times;</span>
                            </button>
                        </div>
                        <div class="modal-body">
                            <form>
                                <div class="form-group row">
                                    <label for="inputPassword3" class="col-sm-2 col-form-label">از تاریخ</label>
                                    <div class="col-sm-10">
                                        <input type="text" name="start_day" value="<?php echo e(request()->start_day); ?>" class="form-control" id="inputPassword3" placeholder="1400-06-08">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label for="inputPassword3" class="col-sm-2 col-form-label">تا تاریخ</label>
                                    <div class="col-sm-10">
                                        <input type="text" name="end_day" value="<?php echo e(request()->end_day); ?>" class="form-control" id="inputPassword3" placeholder="1400-07-09">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label for="mobile"  class="col-sm-3 col-form-label">موبایل کاربر</label>
                                    <div class="col-sm-9">
                                        <input  name="mobile" value="<?php echo e(request()->mobile); ?>" class="form-control" id="mobile">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label for="user_id"  class="col-sm-3 col-form-label">شناسه کاربر</label>
                                    <div class="col-sm-9">
                                        <input  name="user_id" value="<?php echo e(request()->user_id); ?>" class="form-control" id="user_id">
                                    </div>
                                </div>
                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->any(\Mehrab\RolePermission\Models\Permission::PERMISSION_MANAGE_COMMENT)): ?>
                                <div class="form-group row">
                                    <label for="expert_id" class="col-sm-3 col-form-label">شناسه متخصص</label>
                                    <div class="col-sm-9">
                                        <input type="text" name="expert_id" value="<?php echo e(request()->expert_id); ?>" class="form-control" id="expert_id">
                                    </div>
                                </div>
                                    <div class="form-group row">
                                        <label for="expert_name" class="col-sm-3 col-form-label">نام متخصص</label>
                                        <div class="col-sm-9">
                                            <input type="text" name="expert_name" value="<?php echo e(request()->expert_name); ?>" class="form-control" id="expert_name">
                                        </div>
                                    </div>
                                <?php endif; ?>
                                <div class="form-group row">
                                    <label for="service" class="col-sm-3 col-form-label">نام سرویس</label>
                                    <div class="col-sm-9">
                                        <input type="text" name="service" value="<?php echo e(request()->service); ?>" class="form-control" id="service">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label for="code" class="col-sm-3 col-form-label">کد سفارش</label>
                                    <div class="col-sm-9">
                                        <input type="text" name="code" value="<?php echo e(request()->code); ?>" class="form-control" id="code">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label for="rate" class="col-sm-3 col-form-label">امتیاز</label>
                                    <div class="col-sm-9">
                                        <input type="text" name="rate" value="<?php echo e(request()->rate); ?>" class="form-control" id="rate">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label for="status" class="col-sm-3 col-form-label">وضعیت</label>
                                    <div class="col-sm-9">
                                        <select class="form-control" name="status">
                                            <option selected value="">انتخاب</option>
                                            <option <?php echo e(request()->status == \Mehrab\Comment\Models\CommentService::ACTIVE ? 'selected' : ''); ?> value="<?php echo e(\Mehrab\Comment\Models\CommentService::ACTIVE); ?>">فعال</option>
                                            <option <?php echo e(request()->status == \Mehrab\Comment\Models\CommentService::INACTIVE ? 'selected' : ''); ?> value="<?php echo e(\Mehrab\Comment\Models\CommentService::INACTIVE); ?>">غیر فعال</option>
                                            </option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group row float-left">
                                    <div class="col-sm-9 ">
                                        <button type="submit" class="btn btn-primary mx-auto">جست و جو</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>



        </section>
     <?php $__env->endSlot(); ?>
    <?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 /home/foroshg1/laravel/Modules/Mehrab/Comment/Providers/../Resources/Views//Admin/ServiceComment/list_service_comment.blade.php ENDPATH**/ ?>
