@extends('admin.layouts.app') @section('title','CSR Projects') @section('breadcrumb') / CSR Management / Projects @endsection @section('content')
@php $statusMap = ['total'=>['bg'=>'primary','icon'=>'fa-layer-group','label'=>'Total'], 'active'=>['bg'=>'success','icon'=>'fa-play-circle','label'=>'Active'], 'pending'=>['bg'=>'warning','icon'=>'fa-clock','label'=>'Pending'], 'completed'=>['bg'=>'info','icon'=>'fa-check-circle','label'=>'Completed']]; @endphp @foreach($statusMap as $key => $s)
{{ $stats[$key] }}
{{ $s['label'] }}
@endforeach
Reset
All Projects
{{ $projects->total() }} total
@forelse($projects as $i => $project) @empty @endforelse
S.N. Project CSR Company Category Budget Progress Dates Status Actions
{{ ($projects->currentPage()-1)*$projects->perPage()+$i+1 }}
{{ $project->project_title }}
{{ $project->project_code }} @if($project->location)
{{ $project->location }}
@endif
{{ $project->csrCompany->company_name ?? '—' }} @if($project->category) {{ $project->category->name }} @else @endif @if($project->budget_allocation)
₹{{ number_format($project->budget_allocation) }}
Spent: ₹{{ number_format($project->total_spent) }}
@else @endif
@if($project->budget_allocation)
{{ $project->budget_used_percent }}% used
@else No budget set @endif
@if($project->start_date)
{{ $project->start_date->format('d M Y') }}
@endif @if($project->end_date)
{{ $project->end_date->format('d M Y') }}
@endif
@if(auth()->user()->hasPermission('projects.edit')) @endif @if(auth()->user()->hasPermission('projects.approve') && in_array($project->status,['pending','draft']))
@csrf
@endif @if(auth()->user()->hasPermission('projects.delete')) @endif

No projects found

@if(auth()->user()->hasPermission('projects.create')) Create First Project @endif
@if($projects->hasPages()) @endif
@endsection @push('scripts') @endpush