100 lines
6.6 KiB
PHP
100 lines
6.6 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(__('project.projects')); ?></h1>
|
|
<a href="<?php echo e(route('projects.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(__('project.new')); ?>
|
|
|
|
</a>
|
|
</div>
|
|
|
|
<!-- Filters -->
|
|
<div class="bg-white rounded-xl border border-gray-200 p-4">
|
|
<form method="GET" action="<?php echo e(route('projects.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(__('project.search_placeholder')); ?>">
|
|
</div>
|
|
<div class="w-40">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1"><?php echo e(__('project.status')); ?></label>
|
|
<select name="status" 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 = ['planning', 'active', 'on_hold', 'completed', 'cancelled']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<option value="<?php echo e($status); ?>" <?php echo e(request('status') === $status ? 'selected' : ''); ?>><?php echo e(__('project.status_' . $status)); ?></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>
|
|
<a href="<?php echo e(route('projects.index')); ?>" class="px-4 py-2 text-gray-500 text-sm hover:text-gray-700"><?php echo e(__('common.reset')); ?></a>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Project Cards -->
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
<?php $__empty_1 = true; $__currentLoopData = $projects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $project): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
|
<a href="<?php echo e(route('projects.show', $project)); ?>" class="block bg-white rounded-xl border border-gray-200 hover:border-teal-300 hover:shadow-md transition-all">
|
|
<div class="p-5">
|
|
<div class="flex items-center justify-between mb-3">
|
|
<span class="text-xs font-mono text-gray-400"><?php echo e($project->code); ?></span>
|
|
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium
|
|
<?php echo e($project->status === 'active' ? 'bg-emerald-50 text-emerald-700' :
|
|
($project->status === 'planning' ? 'bg-blue-50 text-blue-700' :
|
|
($project->status === 'on_hold' ? 'bg-amber-50 text-amber-700' :
|
|
($project->status === 'completed' ? 'bg-gray-50 text-gray-700' : 'bg-red-50 text-red-700')))); ?>">
|
|
<?php echo e($project->status_label); ?>
|
|
|
|
</span>
|
|
</div>
|
|
<h3 class="text-base font-semibold text-gray-900 mb-2"><?php echo e($project->name); ?></h3>
|
|
|
|
<!-- Progress Bar -->
|
|
<div class="mb-3">
|
|
<div class="flex items-center justify-between mb-1">
|
|
<span class="text-xs text-gray-500"><?php echo e(__('project.progress')); ?></span>
|
|
<span class="text-xs font-medium text-gray-700"><?php echo e($project->progress); ?>%</span>
|
|
</div>
|
|
<div class="w-full bg-gray-100 rounded-full h-1.5">
|
|
<div class="h-1.5 rounded-full <?php echo e($project->progress >= 75 ? 'bg-emerald-500' : ($project->progress >= 50 ? 'bg-amber-500' : 'bg-teal-500')); ?>"
|
|
style="width: <?php echo e($project->progress); ?>%"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex items-center justify-between text-xs text-gray-500">
|
|
<span><?php echo e(__('project.budget')); ?>: <?php echo e(format_currency((float)$project->budget)); ?></span>
|
|
<?php if($project->manager): ?>
|
|
<span><?php echo e($project->manager->name); ?></span>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<?php if($project->start_date): ?>
|
|
<div class="mt-2 text-xs text-gray-400">
|
|
<?php echo e(calendar_date($project->start_date)); ?> — <?php echo e($project->end_date ? calendar_date($project->end_date) : '...'); ?>
|
|
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</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="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5"/></svg>
|
|
<p class="mt-2 text-gray-500"><?php echo e(__('project.no_projects')); ?></p>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<!-- Pagination -->
|
|
<div class="flex justify-center">
|
|
<?php echo e($projects->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/projects/index.blade.php ENDPATH**/ ?>
|