{{ $project->title ?? $project->name ?? 'Project #'.$project->id }}
Project #{{ $project->id }}
Edit Project
Finance
{{ $stats['total_tasks'] }}
Total Tasks
{{ $stats['completed_tasks'] }}
Completed Tasks
{{ number_format($stats['total_hours'], 1) }}
Total Hours
{{ number_format($stats['billable_hours'], 1) }}
Billable Hours
Project Details
{{-- Customer/Client Display --}} @php $customerName = null; if ($project->relationLoaded('account') && $project->account) { $customerName = $project->account->company ?? $project->account->name ?? null; } elseif ($project->relationLoaded('customer') && $project->customer) { $customerName = $project->customer->company ?? $project->customer->name ?? null; } elseif ($project->client_name) { $customerName = $project->client_name; } @endphp @if($customerName)
Customer
{{ $customerName }}
@endif
Status
@if($project->relationLoaded('status') && $project->status) {{ $project->status->label }} @elseif($project->status) {{ ucfirst(str_replace('_', ' ', $project->status)) }} @else Unknown @endif
Billing Method
{{ ucfirst(str_replace('_', ' ', $project->billing_method)) }}
Planned Start
{{ $project->planned_start_date ? $project->planned_start_date->format('M d, Y') : 'Not set' }}
Planned End
{{ $project->planned_end_date ? $project->planned_end_date->format('M d, Y') : 'Not set' }}
@if($project->scope_notes)
Scope Notes
{{ $project->scope_notes }}
@endif
Team Members ({{ $project->team->count() }})
@if($project->team->count() > 0)
@foreach($project->team as $member)
{{ strtoupper(substr($member->name, 0, 1)) }}
{{ $member->name }}
@endforeach
@else
No team members assigned yet
Add team members to start collaborating
@endif
@php $hasTasksModule = Route::has('admin.tasks.index'); $taskCount = isset($tasks) ? $tasks->count() : 0; // Use hasTasksTable from controller if available, otherwise check Schema $showTasksSection = isset($hasTasksTable) ? $hasTasksTable : false; @endphp @if($showTasksSection)
Project Tasks
{{ $taskCount }} Tasks
@if($taskCount > 0 && $hasTasksModule)
View All
@endif
@if($taskCount > 0)
@foreach($tasks->take(10) as $task) @php $taskTitle = $task->title ?? $task->name ?? $task->subject ?? 'Task #'.$task->id; $taskStatus = $task->status ?? 'pending'; $taskPriority = $task->priority ?? 'medium'; $taskDueDate = $task->due_date ?? $task->deadline ?? null; // Status colors $statusColors = [ 'pending' => '#f59e0b', 'in_progress' => '#3b82f6', 'completed' => '#10b981', 'on_hold' => '#6b7280', 'cancelled' => '#ef4444', 'todo' => '#8b5cf6', 'open' => '#3b82f6', 'closed' => '#10b981', ]; $statusColor = $statusColors[$taskStatus] ?? '#6b7280'; $taskUrl = $hasTasksModule ? route('admin.tasks.show', $task->id) : '#'; @endphp
{{ $taskTitle }}
@if(isset($task->estimated_hours) && $task->estimated_hours)
{{ $task->estimated_hours }}h
@endif @if(isset($task->created_at))
{{ \Carbon\Carbon::parse($task->created_at)->format('M d, Y') }}
@endif
{{ ucfirst(str_replace('_', ' ', $taskStatus)) }}
@if($taskDueDate) @php $dueDate = \Carbon\Carbon::parse($taskDueDate); $isOverdue = $dueDate->isPast() && !in_array($taskStatus, ['completed', 'closed', 'cancelled']); @endphp
{{ $dueDate->format('M d') }}
@endif @if($hasTasksModule)
@endif
@endforeach
@if($taskCount > 10 && $hasTasksModule)
View All {{ $taskCount }} Tasks
@endif @else
No tasks created yet
@endif
@endif