@extends('layouts.app') @section('title', $project->title) @section('content') @php $sv = $project->status instanceof \App\Enums\ProjectStatus ? $project->status->value : $project->status; $statusBadge = match($sv) { 'active' => 'bg-emerald-50 text-emerald-700', 'completed' => 'bg-slate-100 text-slate-600', 'on_hold' => 'bg-amber-50 text-amber-600', 'cancelled' => 'bg-red-50 text-red-600', default => 'bg-slate-100 text-slate-500', }; $statusLabel = match($sv) { 'active' => 'Active', 'completed' => 'Completed', 'on_hold' => 'On Hold', 'cancelled' => 'Cancelled', default => ucfirst($sv), }; $symMap = $financials['symMap']; $hasOutstanding = !empty($financials['outstandingByCurrency']); @endphp
Total Proposed
@if (empty($financials['totalProposedByCurrency']))—
@else @foreach ($financials['totalProposedByCurrency'] as $cur => $amt){{ $symMap[$cur] ?? $cur }} {{ number_format($amt, 2) }}
@endforeach @endifTotal Approved
@if (empty($financials['totalApprovedByCurrency']))—
@else @foreach ($financials['totalApprovedByCurrency'] as $cur => $amt){{ $symMap[$cur] ?? $cur }} {{ number_format($amt, 2) }}
@endforeach @endifTotal Paid
@if (empty($financials['totalPaidByCurrency']))—
@else @foreach ($financials['totalPaidByCurrency'] as $cur => $amt){{ $symMap[$cur] ?? $cur }} {{ number_format($amt, 2) }}
@endforeach @endifOutstanding
@if (!$hasOutstanding)Settled
@else @foreach ($financials['outstandingByCurrency'] as $cur => $amt){{ $symMap[$cur] ?? $cur }} {{ number_format($amt, 2) }}
@endforeach @endifProposals
New ProposalNo proposals yet
Create first proposal →| Title | Amount | Status | Valid Until | |
|---|---|---|---|---|
| {{ $proposal->title ?? '—' }} | {{ $pSymbol }} {{ number_format($proposal->amount, 2) }} | {{ ucfirst($pSv) }} | {{ $proposal->valid_until ? $proposal->valid_until->format('d M Y') : '—' }} | View → |
Invoices
No invoices yet
| Invoice # | Amount | Status | Due Date | Progress | |
|---|---|---|---|---|---|
| {{ $invoice->invoice_number }} | {{ $iSymbol }} {{ number_format($invoice->amount, 2) }} | {{ $iLabel }} | {{ $invoice->due_date->format('d M Y') }} |
|
View → |
Project Details
Description
{{ $project->description ?? '—' }}
Created
{{ $project->created_at->format('d M Y') }}
Updated
{{ $project->updated_at->format('d M Y') }}
Client
{{ $project->client->name }}
@if ($project->client->email) {{ $project->client->email }} @endif @if ($project->client->phone){{ $project->client->phone }}
@endifProject Team
@if ($project->assignedUsers->isNotEmpty()) {{ $project->assignedUsers->count() }} @endif{{ $member->name }}
@if ($member->pivot->role_on_project){{ $member->pivot->role_on_project }}
@else{{ $memberRole }}
@endifNo team members assigned yet.
@endif {{-- Assign form — managers only --}} @can('projects.manage') @if ($availableUsers->isNotEmpty())All users are already assigned.
@endif @endcanUpdate Status
{{ $statusLabel }}Timeline
EditStart
{{ $project->start_date->format('d M Y') }}
Deadline
{{ $project->end_date->format('d M Y') }}
@if ($project->isOverdue()) {{ abs($project->daysRemaining()) }}d overdue @elseif ($project->daysRemaining() !== null) {{ $project->daysRemaining() }}d left @endifDuration
{{ $project->durationForHumans() }}
Completed
{{ $project->actual_completion_date->format('d M Y') }}
No timeline set. Add dates
@endifProject age
{{ $project->created_at->diffForHumans() }}
First proposal
{{ $project->proposals->sortBy('created_at')->first()?->created_at?->format('d M Y') ?? '—' }}
Last payment
{{ $project->invoices->flatMap->payments->sortByDesc('paid_at')->first()?->paid_at?->format('d M Y') ?? '—' }}