vernova/storage/framework/views/8978f0f93ca9bd010ca93ff26a7c11ff.php
2026-07-26 19:58:27 +03:30

118 lines
7.9 KiB
PHP

<?php $__env->startSection('content'); ?>
<div class="space-y-6">
<!-- Page Header -->
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
<div class="flex items-center gap-4">
<a href="<?php echo e(route('employees.show', $employee)); ?>" class="p-2 text-gray-500 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"/></svg>
</a>
<div>
<h1 class="text-2xl font-bold text-gray-900"><?php echo e(__('employee.financials')); ?></h1>
<p class="text-sm text-gray-500"><?php echo e($employee->first_name); ?> <?php echo e($employee->last_name); ?></p>
</div>
</div>
</div>
<!-- Summary Cards -->
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div class="bg-white rounded-xl border border-gray-200 p-4">
<p class="text-xs font-medium text-gray-500"><?php echo e(__('employee.totalPaid')); ?></p>
<p class="text-2xl font-bold text-emerald-600 mt-1"><?php echo e(format_currency((float)$totalPaid, $employee->currency?->code)); ?></p>
</div>
<div class="bg-white rounded-xl border border-gray-200 p-4">
<p class="text-xs font-medium text-gray-500"><?php echo e(__('employee.totalUnpaid')); ?></p>
<p class="text-2xl font-bold text-red-600 mt-1"><?php echo e(format_currency((float)$totalUnpaid, $employee->currency?->code)); ?></p>
</div>
</div>
<!-- Filters -->
<div class="bg-white rounded-xl border border-gray-200 p-4">
<form method="GET" action="<?php echo e(route('employees.financials', $employee)); ?>" class="flex flex-wrap gap-3 items-end">
<div class="w-40">
<label class="block text-xs font-medium text-gray-500 mb-1"><?php echo e(__('employee.type')); ?></label>
<select name="type" class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-teal-500">
<option value=""><?php echo e(__('common.all')); ?></option>
<?php $__currentLoopData = $financialTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ft): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($ft); ?>" <?php echo e(request('type') === $ft ? 'selected' : ''); ?>><?php echo e(__('employee.' . $ft)); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>
<div class="w-36">
<label class="block text-xs font-medium text-gray-500 mb-1"><?php echo e(__('common.status')); ?></label>
<select name="is_paid" class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-teal-500">
<option value=""><?php echo e(__('common.all')); ?></option>
<option value="1" <?php echo e(request('is_paid') === '1' ? 'selected' : ''); ?>><?php echo e(__('employee.isPaid')); ?></option>
<option value="0" <?php echo e(request('is_paid') === '0' ? 'selected' : ''); ?>><?php echo e(__('employee.isUnpaid')); ?></option>
</select>
</div>
<button type="submit" class="px-4 py-2 bg-gray-100 text-gray-700 text-sm font-medium rounded-lg hover:bg-gray-200 transition-colors">
<?php echo e(__('common.filter')); ?>
</button>
</form>
</div>
<!-- Financials List -->
<div class="bg-white rounded-xl border border-gray-200 overflow-hidden">
<div class="overflow-x-auto">
<table class="w-full">
<thead class="bg-gray-50 border-b border-gray-200">
<tr>
<th class="px-5 py-3 text-start text-xs font-medium text-gray-500"><?php echo e(__('employee.effectiveDate')); ?></th>
<th class="px-5 py-3 text-start text-xs font-medium text-gray-500"><?php echo e(__('employee.type')); ?></th>
<th class="px-5 py-3 text-start text-xs font-medium text-gray-500"><?php echo e(__('employee.amount')); ?></th>
<th class="px-5 py-3 text-start text-xs font-medium text-gray-500"><?php echo e(__('common.status')); ?></th>
<th class="px-5 py-3 text-start text-xs font-medium text-gray-500"><?php echo e(__('employee.description')); ?></th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100">
<?php $__empty_1 = true; $__currentLoopData = $financials; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $fin): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr class="hover:bg-gray-50 transition-colors">
<td class="px-5 py-3 text-sm text-gray-900"><?php echo e($fin->effective_date ? calendar_date($fin->effective_date) : '-'); ?></td>
<td class="px-5 py-3">
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium
<?php echo e($fin->type === 'salary' ? 'bg-blue-50 text-blue-700' :
($fin->type === 'bonus' ? 'bg-emerald-50 text-emerald-700' :
($fin->type === 'deduction' ? 'bg-red-50 text-red-700' :
($fin->type === 'overtime' ? 'bg-amber-50 text-amber-700' :
($fin->type === 'advance' ? 'bg-purple-50 text-purple-700' : 'bg-gray-50 text-gray-700'))))); ?>">
<?php echo e(__('employee.' . $fin->type)); ?>
</span>
</td>
<td class="px-5 py-3 text-sm font-medium <?php echo e(in_array($fin->type, ['deduction', 'advance']) ? 'text-red-600' : 'text-gray-900'); ?>">
<?php echo e(in_array($fin->type, ['deduction', 'advance']) ? '-' : '+'); ?><?php echo e(format_currency((float)$fin->amount, $fin->currency?->code)); ?>
</td>
<td class="px-5 py-3">
<?php if(isset($fin->is_paid)): ?>
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium
<?php echo e($fin->is_paid ? 'bg-emerald-50 text-emerald-700' : 'bg-amber-50 text-amber-700'); ?>">
<?php echo e($fin->is_paid ? __('employee.isPaid') : __('employee.isUnpaid')); ?>
</span>
<?php else: ?>
<span class="text-xs text-gray-400">-</span>
<?php endif; ?>
</td>
<td class="px-5 py-3 text-sm text-gray-600 max-w-xs truncate"><?php echo e($fin->description ?? '-'); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
<td colspan="5" class="text-center py-12 text-gray-500"><?php echo e(__('employee.noFinancials')); ?></td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<!-- Pagination -->
<div class="flex justify-center">
<?php echo e($financials->withQueryString()->links()); ?>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\projectra\resources\views/employees/financials.blade.php ENDPATH**/ ?>