@extends('layouts.sneat') @section('content')

Project Management

{{-- SUCCESS --}} @if (session('success')) @endif {{-- ERRORS --}} @if ($errors->any()) @endif {{-- ADD PROJECT --}} {{-- PROJECT LIST --}}
Project List
@forelse($projects as $p)
{{ $p->project_name }}
{{ $p->projectCategory->category }}
Client: {{ $p->contact->name ?? '-' }}
{{-- {{ $loop->iteration }} --}}
{{-- Status Badges --}} @php $statusCounts = $p->updates->groupBy('status')->map(fn($items) => $items->count()); @endphp @foreach ($statusCounts as $status => $count) @php $badgeClass = match ($status) { 'updation' => 'bg-label-success', 'modification' => 'bg-label-warning', 'revision' => 'bg-label-danger', default => 'bg-secondary', }; @endphp {{ ucfirst($status) }} ({{ $count }}) @endforeach
{{-- OFFCANVAS --}}
Questionnaire – {{ $p->project_name }}
@csrf @if ($p->updates->count() > 0)
@foreach ($p->updates->sortByDesc('created_at') as $update)
{{ $update->title }}
@foreach (['updation', 'modification', 'revision'] as $s)
status == $s ? 'checked' : '' }}>
@endforeach
@if ($update->attachment) @endif {{ $update->created_at->timezone('Asia/Kolkata')->format('d M Y, h:i A') }}
@endforeach
@else

No updates found for this project.

@endif
{{-- QUESTIONNAIRE MODAL --}} {{-- UPDATE ACTION MODAL --}}
@empty
No projects found
@endforelse
{{-- END PROJECT LIST --}}
{{-- STATUS FILTER MODAL --}} {{-- JS --}} @endsection