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

Assigned Projects

Total Projects
{{ $totalProjects }}
Active Projects
{{ $activeProjects }}
Prediction Amount
${{ number_format($predictionAmount, 2) }}
(ALL) Amount Received
${{ number_format($amountReceived, 2) }}
@forelse($projects as $index => $project) @empty @endforelse
# Name / URL Action Office Details Price Added On Type Project Type Status Client Details Description Attachments
{{ ($projects->currentPage() - 1) * $projects->perPage() + $loop->iteration }}
{{ $project->name_or_url }}
Business: {{ $project->business_type }}
PM: {{ optional($project->projectManager)->name }}
Dept: {{ optional($project->department)->name }}
Employee: {{ optional($project->assignMainEmployee)->name ?? 'N/A' }}
Sales: {{ optional($project->salesPerson)->name ?? 'N/A' }}
{{ $project->price }} {{ $project->created_at->format('d M, Y') }} {{ $project->project_grade }} {{ $project->project_type }} @php $statusColors = [ 'complete' => 'text-green-700 bg-green-200 font-bold', 'working' => 'text-teal-600 bg-teal-100 font-bold', 'hold' => 'text-yellow-600 bg-yellow-100 font-bold', 'paused' => 'text-purple-600 bg-purple-100 font-bold', 'issues' => 'text-red-600 bg-red-100 font-bold', 'temp hold' => 'text-orange-600 bg-orange-100 font-bold', 'closed' => 'text-gray-600 bg-gray-100 font-bold', ]; $statusRaw = $project->project_status ?? 'working'; $status = strtolower(trim($statusRaw)); $statusClass = $statusColors[$status] ?? 'text-gray-500 bg-gray-100 font-bold'; @endphp {{ $project->project_status ?? 'Working' }}
{{ $project->client_name }}
{{ $project->client_email }}
{!! e(Str::words($project->description, 10, '...')) !!} @if (str_word_count($project->description) > 10) @endif
@forelse ($project->attachments as $attachment) {{ basename($attachment->file_path) }} @empty No attachments @endforelse Add Attachment
No projects found.
{{ $projects->links() }}
@endsection