@extends('layouts.admin') @section('page-title', 'Projects') @section('content')
{{-- Success Message --}} @if(session('success'))
{{ session('success') }}
@endif {{-- Page Header --}}

All Projects

Track progress, status and quotes for every project

Add New Project
{{-- Stats Row --}}
@php $allCount = $projects->count(); $activeCount = $projects->where('status', 'active')->count(); $completedCount = $projects->where('status', 'completed')->count(); $pendingCount = $projects->where('status', 'pending')->count(); @endphp
{{ $allCount }}
Total Projects
{{ $activeCount }}
Active Jobs
{{ $completedCount }}
Completed Jobs
{{ $pendingCount }}
Pending Jobs
{{-- Filter Bar --}}
Showing {{ $projects->count() }} projects
{{-- Table Card --}}
@forelse($projects as $project) @php $statusColors = [ 'active' => ['bg' => '#eff6ff', 'text' => '#1d4ed8', 'dot' => '#0d6efd'], 'pending' => ['bg' => '#fef9c3', 'text' => '#854d0e', 'dot' => '#eab308'], 'completed' => ['bg' => '#dcfce7', 'text' => '#15803d', 'dot' => '#22c55e'], 'cancelled' => ['bg' => '#fee2e2', 'text' => '#dc2626', 'dot' => '#ef4444'], 'in-progress' => ['bg' => '#e0f2fe', 'text' => '#0369a1', 'dot' => '#0ea5e9'], ]; $s = $statusColors[strtolower($project->status)] ?? ['bg' => '#f3f4f6', 'text' => '#374151', 'dot' => '#9ca3af']; $prog = $project->progress ?? 0; $pColor = $prog < 40 ? '#ef4444' : ($prog < 70 ? '#eab308' : '#22c55e'); @endphp {{-- Quote No --}} {{-- Project Title --}} {{-- Client with Avatar --}} {{-- Status --}} {{-- Progress --}} {{-- Closure Date --}} {{-- Tonnage --}} {{-- Final Quote --}} {{-- Actions --}} @empty @endforelse
Quote No Project Client Status Factory Progress Closure Date Tonnage Final Quote Action
@if($project->quotation) {{ strtoupper(substr($project->quotation->state_code ?? '', 0, 2)) }}-{{ \Carbon\Carbon::parse($project->quotation->created_at)->format('y') }}-{{ str_pad($project->quotation->id ?? 0, 3, '0', STR_PAD_LEFT) }} @else — @endif
{{ $project->title }}
{{ $project->client_name }}
{{ ucfirst($project->status) }}
{{ $prog }}%
@if($project->expected_closure_date) @php $closure = \Carbon\Carbon::parse($project->expected_closure_date); $overdue = $closure->isPast() && strtolower($project->status) !== 'completed'; @endphp
{{ $closure->format('d M Y') }}
@if($overdue)
Overdue
@else
{{ $closure->diffForHumans() }}
@endif @else — @endif
{{ $project->tonnage ? $project->tonnage . ' T' : '—' }} @if($project->final_quote_value) ₹{{ number_format($project->final_quote_value, 0) }} @else — @endif
No projects found

Try adjusting your filters or add a new project.

Add New Project
{{-- Footer --}}
{{ $projects->count() }} project(s) shown @if(method_exists($projects, 'links')) {{ $projects->links('pagination::bootstrap-5') }} @endif
@endsection