 

<?php $__env->startSection('heading', 'Salary Management'); ?>
<?php $__env->startSection('subheading', 'Track pay type and record salary payments for your staff.'); ?>

<?php $__env->startSection('content'); ?>

<?php if(session('status')): ?>
  <div class="mb-4 text-sm rounded-lg px-4 py-3" style="background:#E1F5EE; color:#0F6E56;"><?php echo e(session('status')); ?></div>
<?php endif; ?>

<div class="card p-0 overflow-hidden">
  <table class="w-full text-sm">
    <thead>
      <tr class="text-left" style="background:#FFF9F0; color:#a19a8f;">
        <th class="px-5 py-3 font-medium text-xs">Staff ID</th>
        <th class="px-5 py-3 font-medium text-xs">Name</th>
        <th class="px-5 py-3 font-medium text-xs">Pay type</th>
        <th class="px-5 py-3 font-medium text-xs text-right">Rate</th>
        <th class="px-5 py-3 font-medium text-xs text-right">Total paid</th>
        <th class="px-5 py-3 font-medium text-xs text-right">Actions</th>
      </tr>
    </thead>
    <tbody>
      <?php $__empty_1 = true; $__currentLoopData = $staff; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $member): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <tr class="border-t" style="border-color:#f2ece0;">
          <td class="px-5 py-3 text-xs font-medium" style="color:#5E35B1;"><?php echo e($member->staff_code ?? '—'); ?></td>
          <td class="px-5 py-3 font-medium"><?php echo e($member->name); ?></td>
          <td class="px-5 py-3">
            <?php if($member->salarySetting?->salary_type): ?>
              <span class="text-xs px-2 py-1 rounded-full" style="background:#EEEDFE; color:#5E35B1;"><?php echo e(ucfirst($member->salarySetting->salary_type)); ?></span>
            <?php else: ?>
              <span class="text-xs" style="color:#a19a8f;">Not set</span>
            <?php endif; ?>
          </td>
          <td class="px-5 py-3 text-right">
            <?php if($member->salarySetting?->salary_type === 'fixed'): ?>
              ₹<?php echo e(number_format($member->salarySetting->base_salary ?? 0, 0)); ?>/mo
            <?php elseif($member->salarySetting?->salary_type === 'commission'): ?>
              <?php echo e($member->salarySetting->commission_rate ?? 0); ?>%
            <?php else: ?>
              —
            <?php endif; ?>
          </td>
          <td class="px-5 py-3 text-right font-medium">₹<?php echo e(number_format($member->salary_payments_sum_amount ?? 0, 0)); ?></td>
          <td class="px-5 py-3 text-right">
            <a href="<?php echo e(route('salary.show', $member)); ?>" class="text-xs font-medium" style="color:#5E35B1;">Manage →</a>
          </td>
        </tr>
      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <tr><td colspan="6" class="px-5 py-8 text-center" style="color:#a19a8f;">No staff yet.</td></tr>
      <?php endif; ?>
    </tbody>
  </table>
</div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH F:\xampp\htdocs\etailorz-v2\resources\views/admin/salary/index.blade.php ENDPATH**/ ?>