<?php $__env->startSection('page-title', __('Merit Increase Matrix')); ?>

<?php $__env->startSection('action-button'); ?>
    <a href="#" data-url="<?php echo e(route('merit-increase-matrices.create')); ?>" data-size="lg" data-ajax-popup="true"
        data-title="<?php echo e(__('Create Merit Increase Matrix')); ?>" class="btn btn-sm btn-primary">
        <i class="ti ti-plus"></i> <?php echo e(__('Add Matrix')); ?>

    </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(__('Job Grade')); ?></th>
                                    <th><?php echo e(__('Performance Tercile')); ?></th>
                                    <th><?php echo e(__('Position Range')); ?></th>
                                    <th><?php echo e(__('Outstanding (Target)')); ?></th>
                                    <th><?php echo e(__('Exceeded (Target)')); ?></th>
                                    <th><?php echo e(__('Achieved (Target)')); ?></th>
                                    <th><?php echo e(__('Partially Met (Target)')); ?></th>
                                    <th><?php echo e(__('Below (Target)')); ?></th>
                                    <th class="text-end"><?php echo e(__('Actions')); ?></th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__empty_1 = true; $__currentLoopData = $matrices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $matrix): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                                            <tr>
                                                                <td><?php echo e($matrix->jobGrade?->name ?? '-'); ?></td>
                                                                <td><?php echo e($matrix->performance_tercile); ?></td>
                                                                <td><?php echo e($matrix->pos_min); ?> - <?php echo e($matrix->pos_max); ?></td>
                                                                <td><?php echo e($matrix->outstanding_target); ?>%</td>
                                                                <td><?php echo e($matrix->exceeded_target); ?>%</td>
                                                                <td><?php echo e($matrix->achieved_target); ?>%</td>
                                                                <td><?php echo e($matrix->partially_target); ?>%</td>
                                                                <td><?php echo e($matrix->below_target); ?>%</td>
                                                                <td class="text-end">
                                                                    <div class="action-btn bg-warning ms-2">
                                                                        <a href="#" data-url="<?php echo e(route('merit-increase-matrices.edit', $matrix->id)); ?>"
                                                                            data-size="lg" data-ajax-popup="true"
                                                                            data-title="<?php echo e(__('Edit Merit Increase Matrix')); ?>"
                                                                            class="mx-3 btn btn-sm align-items-center">
                                                                            <i class="ti ti-pencil text-white"></i>
                                                                        </a>
                                                                    </div>
                                                                    <div class="action-btn bg-danger ms-2">
                                                                        <?php echo Form::open([
                                        'method' => 'DELETE',
                                        'route' => ['merit-increase-matrices.destroy', $matrix->id],
                                        'id' => 'delete-form-' . $matrix->id,
                                    ]); ?>

                                                                        <a href="#" class="mx-3 btn btn-sm align-items-center bs-pass-para"
                                                                            data-confirm="<?php echo e(__('Are You Sure?')); ?>"
                                                                            data-confirm-yes="document.getElementById('delete-form-<?php echo e($matrix->id); ?>').submit();">
                                                                            <i class="ti ti-trash text-white"></i>
                                                                        </a>
                                                                        <?php echo Form::close(); ?>

                                                                    </div>
                                                                </td>
                                                            </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr>
                                        <td colspan="9" class="text-center"><?php echo e(__('No merit matrices found')); ?></td>
                                    </tr>
                                <?php endif; ?>
                            </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/merit_increase_matrices/index.blade.php ENDPATH**/ ?>