<?php $__env->startSection('page-title', __('Merit and Compensation Table')); ?>

<?php $__env->startSection('action-button'); ?>
    <a href="#" data-url="<?php echo e(route('final-rating-actions.create')); ?>" data-ajax-popup="true"
        data-title="<?php echo e(__('Create New Action')); ?>" class="btn btn-sm btn-primary">
        <i class="ti ti-plus"></i>
        Add New Merit
    </a>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-12">
            <?php echo $__env->make('layouts.hrm_setup', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
        </div>

        <div class="col-md-12">
            <div class="card">
                <div class="card-body table-border-style">
                    <div class="table-responsive">
                        <table class="table datatable">
                            <thead>
                                <tr>
                                    <th><?php echo e(__('Score Range')); ?></th>
                                    <th><?php echo e(__('Action Type')); ?></th>
                                    <th><?php echo e(__('Merit %')); ?></th>
                                    <th><?php echo e(__('Bonus Multiplier')); ?></th>
                                    <th><?php echo e(__('Notes')); ?></th>
                                    <th width="200px"><?php echo e(__('Action')); ?></th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $actions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $action): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                            <tr>
                                                                <td><?php echo e($action->min_score); ?>% - <?php echo e($action->max_score); ?>%</td>
                                                                <td><?php echo e(ucfirst(str_replace('_', ' ', $action->action_type))); ?></td>
                                                                <td>
                                                                    <?php if(!is_null($action->merit_percent)): ?>
                                                                        <?php echo e($action->merit_percent); ?>%
                                                                    <?php else: ?>
                                                                        <span class="text-muted">-</span>
                                                                    <?php endif; ?>
                                                                </td>
                                                                <td>
                                                                    <?php if(!is_null($action->bonus_multiplier)): ?>
                                                                        ×<?php echo e($action->bonus_multiplier); ?>

                                                                    <?php else: ?>
                                                                        <span class="text-muted">-</span>
                                                                    <?php endif; ?>
                                                                </td>
                                                                <td>
                                                                    <?php echo e($action->extra_notes ?? '—'); ?>

                                                                </td>
                                                                <td class="Action">
                                                                    <div class="dt-buttons">
                                                                        <span class="float-start">

                                                                            <div class="action-btn me-2">
                                                                                <a href="#" class="btn btn-sm bg-info"
                                                                                    data-url="<?php echo e(route('final-rating-actions.edit', $action->id)); ?>"
                                                                                    data-ajax-popup="true"
                                                                                    data-title="<?php echo e(__('Edit Final Rating Action')); ?>"
                                                                                    data-bs-toggle="tooltip" title="<?php echo e(__('Edit')); ?>">
                                                                                    <i class="ti ti-pencil text-white"></i>
                                                                                </a>
                                                                            </div>

                                                                            <div class="action-btn">
                                                                                <?php echo Form::open([
                                        'method' => 'DELETE',
                                        'route' => ['final-rating-actions.destroy', $action->id],
                                        'id' => 'delete-form-' . $action->id,
                                    ]); ?>

                                                                                <a href="#" class="btn btn-sm bg-danger align-items-center bs-pass-para"
                                                                                    data-bs-toggle="tooltip" title="<?php echo e(__('Delete')); ?>">
                                                                                                                    <i class="ti ti-trash text-white"></i>
                                                                                                                </a>
                                                                                                                <?php echo Form::close(); ?>

                                                                                                            </div>

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

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/payraty/hris/resources/views/final_rating_actions/index.blade.php ENDPATH**/ ?>