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

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

<div class="card">
    <div class="card-header">
        <?php echo e(trans('cruds.commissionData.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">

                <tbody>
                    <?php $__currentLoopData = $commissionDatas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $commissionData): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                        <?php if($commissionData->commission_type->id != 608): ?>
                        <tr data-entry-id="<?php echo e($commissionData->id); ?>">
                            <!--
                            <td>

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

                            </td>
                            <td>
                                <?php echo e($commissionData->commission->commissioning ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($commissionData->commission->commissioning ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($commissionData->commission_category_name->fusion_categories ?? ''); ?>

                            </td>
                        -->
                            <td>
                                <?php echo e($commissionData->commission_type->name ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($commissionData->commission_value ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($commissionData->commission_value_text_1 ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($commissionData->commission_value_text_2 ?? ''); ?>

                            </td>
                            <td>
                                <?php echo e($commissionData->commission_value_text_3 ?? ''); ?>

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

                                    </a>
                                <?php endif; ?>

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

                                    </a>
                                <?php endif; ?>

                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('commission_data_delete')): ?>
                                    <form action="<?php echo e(route('admin.commission-datas.destroy', $commissionData->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 endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
        </div>

        <!-- Edit Option button only for Engineer Roles and not for other roles -->
    <?php $__currentLoopData = Auth::user()->roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $roles): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
    <?php if($roles->title == "Engineer"): ?>
    <div class="card-header">
        <?php if(!empty($asset->commissionCommissionDatas[0]['id'])): ?>
        <a href="/admin/commission-datas/<?php echo e($asset->commissionCommissionDatas[0]['id']); ?>/edit?comp_id=<?php echo e($asset->id); ?>">
            <button type="button" class="btn btn-primary btn-lg btn-block">Commission Service Report</button>
        </a>
        <?php echo e($asset->commissionCommissionDatas[0]['id']); ?>

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

    </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('commission_data_delete')): ?>
  let deleteButtonTrans = '<?php echo e(trans('global.datatables.delete')); ?>'
  let deleteButton = {
    text: deleteButtonTrans,
    url: "<?php echo e(route('admin.commission-datas.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-commissionCommissionDatas: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/sfm.fusionengg.in/resources/views/admin/assets/relationships/commissionCommissionDatas.blade.php ENDPATH**/ ?>