<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('service_complaint_create')): ?>
    <div style="margin-bottom: 10px;" class="row">
        <div class="col-lg-12">
            <a class="btn btn-success" href="<?php echo e(route('admin.service-complaints.create')); ?>">
                <?php echo e(trans('global.add')); ?> <?php echo e(trans('cruds.serviceComplaint.title_singular')); ?>

            </a>
        </div>
    </div>
<?php endif; ?>

<div class="card">
    <div class="card-header">
        <?php echo e(trans('cruds.serviceComplaint.title_singular')); ?> <?php echo e(trans('global.list')); ?>

    </div>

    <div class="card-body">
        <div class="table-responsive">
            <table class=" table table-bordered table-striped table-hover datatable datatable-assetServiceComplaints">
                <thead>
                    <tr>
                        <th width="10">

                        </th>
                        <th>
                            <?php echo e(trans('cruds.serviceComplaint.fields.id')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.serviceComplaint.fields.client')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.serviceComplaint.fields.location')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.contactContact.fields.location')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.serviceComplaint.fields.asset')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.asset.fields.airdryer_serial_no')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.asset.fields.filter_serial_no')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.asset.fields.eco_drain_serial_no')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.asset.fields.air_receiver_serial_no')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.asset.fields.air_compressor_part_no')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.asset.fields.air_dryer_part_no')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.asset.fields.filter_part_no')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.asset.fields.eco_drain_part_no')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.asset.fields.air_reciever_part_no')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.serviceComplaint.fields.service_type')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.serviceComplaint.fields.visit_type')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.serviceComplaint.fields.status')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.serviceComplaint.fields.enginner_assigned')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.serviceComplaint.fields.supervisor_assigned')); ?>

                        </th>
                        <th>
                            <?php echo e(trans('cruds.serviceComplaint.fields.service_date')); ?>

                        </th>
                        <th>
                            &nbsp;
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__currentLoopData = $serviceComplaints; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $serviceComplaint): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr data-entry-id="<?php echo e($serviceComplaint->id); ?>">
                            <td>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->id ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->client->company_name ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->location->location ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->location->location ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->asset->air_compressor_serial_no ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->asset->airdryer_serial_no ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->asset->filter_serial_no ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->asset->eco_drain_serial_no ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->asset->air_receiver_serial_no ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->asset->air_compressor_part_no ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->asset->air_dryer_part_no ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->asset->filter_part_no ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->asset->eco_drain_part_no ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->asset->air_reciever_part_no ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->service_type->name ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->visit_type->name ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->status->name ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->enginner_assigned->name ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->supervisor_assigned->name ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($serviceComplaint->service_date ?? ''); ?>

                            </td>
                            <td>
                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('service_complaint_show')): ?>
                                    <a class="btn btn-xs btn-primary" href="<?php echo e(route('admin.service-complaints.show', $serviceComplaint->id)); ?>">
                                        <?php echo e(trans('global.view')); ?>

                                    </a>
                                <?php endif; ?>

                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('service_complaint_edit')): ?>
                                    <a class="btn btn-xs btn-info" href="<?php echo e(route('admin.service-complaints.edit', $serviceComplaint->id)); ?>">
                                        <?php echo e(trans('global.edit')); ?>

                                    </a>
                                <?php endif; ?>

                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('service_complaint_delete')): ?>
                                    <form action="<?php echo e(route('admin.service-complaints.destroy', $serviceComplaint->id)); ?>" method="POST" onsubmit="return confirm('<?php echo e(trans('global.areYouSure')); ?>');" style="display: inline-block;">
                                        <input type="hidden" name="_method" value="DELETE">
                                        <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                                        <input type="submit" class="btn btn-xs btn-danger" value="<?php echo e(trans('global.delete')); ?>">
                                    </form>
                                <?php endif; ?>

                            </td>

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

<?php $__env->startSection('scripts'); ?>
<?php echo \Illuminate\View\Factory::parentPlaceholder('scripts'); ?>
<script>
    $(function () {
  let dtButtons = $.extend(true, [], $.fn.dataTable.defaults.buttons)
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('service_complaint_delete')): ?>
  let deleteButtonTrans = '<?php echo e(trans('global.datatables.delete')); ?>'
  let deleteButton = {
    text: deleteButtonTrans,
    url: "<?php echo e(route('admin.service-complaints.massDestroy')); ?>",
    className: 'btn-danger',
    action: function (e, dt, node, config) {
      var ids = $.map(dt.rows({ selected: true }).nodes(), function (entry) {
          return $(entry).data('entry-id')
      });

      if (ids.length === 0) {
        alert('<?php echo e(trans('global.datatables.zero_selected')); ?>')

        return
      }

      if (confirm('<?php echo e(trans('global.areYouSure')); ?>')) {
        $.ajax({
          headers: {'x-csrf-token': _token},
          method: 'POST',
          url: config.url,
          data: { ids: ids, _method: 'DELETE' }})
          .done(function () { location.reload() })
      }
    }
  }
  dtButtons.push(deleteButton)
<?php endif; ?>

  $.extend(true, $.fn.dataTable.defaults, {
    orderCellsTop: true,
    order: [[ 1, 'desc' ]],
    pageLength: 100,
  });
  let table = $('.datatable-assetServiceComplaints:not(.ajaxTable)').DataTable({ buttons: dtButtons })
  $('a[data-toggle="tab"]').on('shown.bs.tab click', function(e){
      $($.fn.dataTable.tables(true)).DataTable()
          .columns.adjust();
  });
  
})

</script>
<?php $__env->stopSection(); ?><?php /**PATH /home/newrhytha2/public_html/devsfm.fusionengg.in/resources/views/admin/assets/relationships/assetServiceComplaints.blade.php ENDPATH**/ ?>