12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <?php $__env->startSection('panel_content'); ?>
- <div class="card">
- <div class="card-header">
- <h5 class="mb-0 h6"><?php echo e(translate('Product Reviews')); ?></h5>
- </div>
- <div class="card-body">
- <table class="table aiz-table mb-0">
- <thead>
- <tr>
- <th>#</th>
- <th><?php echo e(translate('Product')); ?></th>
- <th data-breakpoints="lg"><?php echo e(translate('Customer')); ?></th>
- <th><?php echo e(translate('Rating')); ?></th>
- <th data-breakpoints="lg"><?php echo e(translate('Comment')); ?></th>
- <th data-breakpoints="lg"><?php echo e(translate('Published')); ?></th>
- <th data-breakpoints="lg" class="text-right"><?php echo e(translate('Options')); ?></th>
- </tr>
- </thead>
- <tbody>
- <?php $__currentLoopData = $reviews; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
- <?php
- $review = \App\Models\Review::find($value->id);
- ?>
- <?php if($review != null && $review->product != null && $review->user != null): ?>
- <tr>
- <td>
- <?php echo e($key+1); ?>
- </td>
- <td>
- <a href="<?php echo e(route('product', $review->product->slug)); ?>" target="_blank"><?php echo e($review->product->getTranslation('name')); ?></a>
- </td>
- <td><?php echo e($review->user->name); ?></td>
- <td>
- <span class="rating rating-sm">
- <?php for($i=0; $i < $review->rating; $i++): ?>
- <i class="las la-star active"></i>
- <?php endfor; ?>
- <?php for($i=0; $i < 5-$review->rating; $i++): ?>
- <i class="las la-star"></i>
- <?php endfor; ?>
- </span>
- </td>
- <td><?php echo e($review->comment); ?></td>
- <!--<td>-->
- <!-- <?php if($review->status == 1): ?>-->
- <!-- <span class="badge badge-inline badge-success"><?php echo e(translate('Published')); ?></span>-->
- <!-- <?php else: ?>-->
- <!-- <span class="badge badge-inline badge-danger"><?php echo e(translate('Unpublished')); ?></span>-->
- <!-- <?php endif; ?>-->
-
- <!--</td>-->
- <td>
- <label class="aiz-switch aiz-switch-success mb-0">
- <input onchange="update_published(this)" value="<?php echo e($review->id); ?>" type="checkbox" <?php if($review->status == 1) echo "checked";?> >
- <span class="slider round"></span>
- </label>
- </td>
- <td class="text-right">
- <a class="btn btn-soft-info btn-icon btn-circle btn-sm" href="<?php echo e(route('seller.edit', ['id'=>$value->id, 'lang'=>env('DEFAULT_LANGUAGE')])); ?>" title="<?php echo e(translate('Edit')); ?>">
- <i class="las la-edit"></i>
- </a>
- <!--<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="<?php echo e(route('seller.del', $value->id)); ?>" title="<?php echo e(translate('Delete')); ?>">-->
- <!-- <i class="las la-trash"></i>-->
- <!--</a>-->
- </td>
- </tr>
- <?php endif; ?>
- <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
- </tbody>
- </table>
- <div class="aiz-pagination">
- <?php echo e($reviews->links()); ?>
- </div>
- </div>
- </div>
- <?php $__env->stopSection(); ?>
- <?php $__env->startSection('script'); ?>
- <script type="text/javascript">
- function update_published(el){
- if(el.checked){
- var status = 1;
- }
- else{
- var status = 0;
- }
- $.post('<?php echo e(route('seller.updateStatus')); ?>', {_token:'<?php echo e(csrf_token()); ?>', id:el.value, status:status}, function(data){
- if(data == 1){
- AIZ.plugins.notify('success', '<?php echo e(translate('updated successfully')); ?>');
- }
- });
- }
- </script>
- <?php $__env->stopSection(); ?>
- <?php echo $__env->make('seller.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/www.easybuyjp.shop/resources/views/seller/reviews.blade.php ENDPATH**/ ?>
|