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

83 lines
6.0 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">
<h1 class="text-2xl font-bold text-gray-900"><?php echo e(__('employee.employees')); ?></h1>
<a href="<?php echo e(route('employees.create')); ?>" class="inline-flex items-center gap-2 px-4 py-2 bg-teal-600 text-white text-sm font-medium rounded-lg hover:bg-teal-700 transition-colors">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
<?php echo e(__('employee.new')); ?>
</a>
</div>
<!-- Filters -->
<div class="bg-white rounded-xl border border-gray-200 p-4">
<form method="GET" action="<?php echo e(route('employees.index')); ?>" class="flex flex-wrap gap-3 items-end">
<div class="flex-1 min-w-[200px]">
<label class="block text-xs font-medium text-gray-500 mb-1"><?php echo e(__('common.search')); ?></label>
<input type="text" name="search" value="<?php echo e(request('search')); ?>"
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-teal-500 focus:border-teal-500"
placeholder="<?php echo e(__('employee.search_placeholder')); ?>">
</div>
<div class="w-44">
<label class="block text-xs font-medium text-gray-500 mb-1"><?php echo e(__('employee.project')); ?></label>
<select name="project_id" class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-teal-500 focus:border-teal-500">
<option value=""><?php echo e(__('common.all')); ?></option>
<?php $__currentLoopData = $projects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $project): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($project->id); ?>" <?php echo e(request('project_id') == $project->id ? 'selected' : ''); ?>><?php echo e($project->name); ?></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(__('employee.contract_type')); ?></label>
<select name="contract_type" class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-teal-500 focus:border-teal-500">
<option value=""><?php echo e(__('common.all')); ?></option>
<?php $__currentLoopData = $contractTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($type); ?>" <?php echo e(request('contract_type') === $type ? 'selected' : ''); ?>><?php echo e(__('employee.contract_' . $type)); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</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>
<!-- Employee Cards -->
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
<?php $__empty_1 = true; $__currentLoopData = $employees; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $employee): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<a href="<?php echo e(route('employees.show', $employee)); ?>" class="block bg-white rounded-xl border border-gray-200 hover:border-teal-300 hover:shadow-md transition-all p-5 text-center">
<div class="w-14 h-14 mx-auto bg-teal-50 text-teal-700 rounded-full flex items-center justify-center text-xl font-semibold mb-3">
<?php echo e(mb_strtoupper(mb_substr($employee->full_name, 0, 1))); ?>
</div>
<h3 class="text-sm font-semibold text-gray-900"><?php echo e($employee->full_name); ?></h3>
<p class="text-xs text-gray-500 mt-0.5"><?php echo e($employee->job_title ?? $employee->contract_type_label); ?></p>
<div class="mt-3 flex items-center justify-center gap-2">
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium <?php echo e($employee->status === 'active' ? 'bg-emerald-50 text-emerald-700' : 'bg-gray-100 text-gray-600'); ?>">
<?php echo e($employee->status === 'active' ? __('employee.active') : __('employee.inactive')); ?>
</span>
</div>
<?php if($employee->project): ?>
<p class="text-xs text-gray-400 mt-2"><?php echo e($employee->project->name); ?></p>
<?php endif; ?>
</a>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<div class="col-span-full text-center py-12">
<svg class="w-12 h-12 mx-auto text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1z"/></svg>
<p class="mt-2 text-gray-500"><?php echo e(__('employee.no_employees')); ?></p>
</div>
<?php endif; ?>
</div>
<!-- Pagination -->
<div class="flex justify-center">
<?php echo e($employees->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/index.blade.php ENDPATH**/ ?>