@extends('layouts.app') @section('title', 'Projects') @section('content')
{{ $statusCounts['all'] }} projects total
Active
{{ $statusCounts['active'] }}
On Hold
{{ $statusCounts['on_hold'] }}
Completed
{{ $statusCounts['completed'] }}
Cancelled
{{ $statusCounts['cancelled'] }}
No projects found
@if ($statusFilter) No projects match the selected status filter. @else Create your first project to get started. @endif
@can('projects.manage') @if (!$statusFilter) New Project @endif @endcan| Project | Client | Status | Proposals | Team | Due | Value | Outstanding | Actions |
|---|---|---|---|---|---|---|---|---|
|
{{ $project->title }}
@if ($project->description)
{{ Str::limit($project->description, 60) }} @endif |
{{ $project->client->name }} | {{ $statusLabel }} | {{ $project->proposals_count }} |
@if ($project->assignedUsers->isEmpty())
Unassigned
@else
@foreach ($project->assignedUsers->take(3) as $member)
@php
$ini = collect(explode(' ', $member->name))->map(fn($w) => strtoupper($w[0] ?? ''))->take(2)->implode('');
$mRole = $member->roles->first()?->name ?? '';
$aColor = match(true) {
str_contains($mRole, 'Admin') => 'bg-slate-700',
str_contains($mRole, 'Manager') => 'bg-emerald-600',
default => 'bg-sky-600',
};
@endphp
@endif
{{ $ini }}
@endforeach
@if ($project->assignedUsers->count() > 3)
+{{ $project->assignedUsers->count() - 3 }}
@endif
|
@if ($project->end_date)
{{ $project->end_date->format('d M Y') }} {{ $project->durationForHumans() }} @if ($project->isOverdue()) {{ abs($project->daysRemaining()) }}d overdue @elseif ($project->daysRemaining() <= 7) {{ $project->daysRemaining() }}d left @endif @else — @endif |
@if (empty($project->total_value_by_currency))
—
@else
@foreach ($project->total_value_by_currency as $cur => $amt)
{{ $symMap[$cur] ?? $cur }} {{ number_format($amt, 2) }} @endforeach @endif |
@if (empty($project->outstanding_by_currency))
Settled
@else
@foreach ($project->outstanding_by_currency as $cur => $amt)
{{ $symMap[$cur] ?? $cur }} {{ number_format($amt, 2) }} @endforeach @endif |
Showing {{ $projects->firstItem() }}–{{ $projects->lastItem() }} of {{ $projects->total() }}