@extends('layouts.layoutMaster') @section('title', __('Project Details')) @section('vendor-style') @vite(['resources/assets/vendor/libs/apex-charts/apex-charts.scss']) @vite(['resources/assets/vendor/libs/datatables-bs5/datatables.bootstrap5.scss']) @vite(['resources/assets/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.scss']) @vite(['resources/assets/vendor/libs/select2/select2.scss']) @vite(['resources/assets/vendor/libs/flatpickr/flatpickr.scss']) @vite(['resources/assets/vendor/libs/sweetalert2/sweetalert2.scss']) @endsection @section('vendor-script') @vite(['resources/assets/vendor/libs/apex-charts/apexcharts.js']) @vite(['resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js']) @vite(['resources/assets/vendor/libs/select2/select2.js']) @vite(['resources/assets/vendor/libs/flatpickr/flatpickr.js']) @vite(['resources/assets/vendor/libs/sweetalert2/sweetalert2.js']) @endsection @section('page-script') @vite(['Modules/PMCore/resources/assets/js/project-show.js']) @endsection @section('content')
{{ __('Team Members') }}
{{ $stats['total_members'] }}
{{ __('Total Tasks') }}
{{ $stats['total_tasks'] }}
{{ __('Completed') }}
{{ $stats['completed_tasks'] }}
{{ __('In Progress') }}
{{ $stats['in_progress_tasks'] }}
{{ __('Overdue') }}
{{ $stats['overdue_tasks'] }}
{{ __('Total Hours') }}
{{ number_format($stats['total_hours'], 2) }}
{{ __('Milestones') }}
{{ $stats['milestones'] }}
{{ __('Project Progress') }}
@if($stats['days_remaining'] !== null) {{ $stats['days_remaining'] >= 0 ? $stats['days_remaining'] . ' ' . __('days remaining') : __('Overdue') }} @else {{ __('No end date set') }} @endif
{{ $stats['progress_percentage'] }}% {{ __('Complete') }}
{{ __('Task Status Distribution') }}
@if(!empty($stats['task_stats_by_status'])) @foreach($stats['task_stats_by_status'] as $status)
{{ $status['name'] }}
{{ $status['count'] }}
@endforeach @else

{{ __('No tasks found') }}

@endif
{{ __('Priority Distribution') }}
@if(!empty($stats['task_stats_by_priority'])) @foreach($stats['task_stats_by_priority'] as $priority)
{{ $priority['name'] }}
{{ $priority['count'] }}
@endforeach @else

{{ __('No tasks found') }}

@endif
{{ __('Quick Stats') }}

{{ $stats['total_tasks'] }}

{{ __('Total') }}

{{ $stats['completed_tasks'] }}

{{ __('Completed') }}

{{ $stats['pending_tasks'] }}

{{ __('Pending') }}

{{ $stats['overdue_tasks'] }}

{{ __('Overdue') }}

{{ __('Billable Hours') }}
{{ number_format($stats['billable_hours'], 2) }}
{{ __('Timesheet Value') }}
{{ \App\Helpers\FormattingHelper::formatCurrency($stats['total_timesheet_amount']) }}
{{ __('Approved Hours') }}
{{ number_format($stats['approved_hours'], 2) }}
{{ __('Avg Rate/Hour') }}
@if($stats['billable_hours'] > 0) {{ \App\Helpers\FormattingHelper::formatCurrency($stats['total_timesheet_amount'] / $stats['billable_hours']) }} @else - @endif
{{ __('Project Information') }}

{{ $project->name }}

{{ $project->code ?: '-' }}

{{ $project->client?->name ?? '-' }}

{{ $project->projectManager?->name ?? '-' }}

{{ $project->status->label() }}

{{ $project->priority->label() }}

{{ $project->start_date?->format('M d, Y') ?? '-' }}

{{ $project->end_date?->format('M d, Y') ?? '-' }}

@if($project->description)

{{ $project->description }}

@endif
{{ __('Project Progress') }}
{{ __('Overall Progress') }} {{ $stats['progress_percentage'] }}%
{{ $stats['total_tasks'] }}
{{ __('Total Tasks') }}
{{ $stats['completed_tasks'] }}
{{ __('Completed') }}
{{ $stats['total_tasks'] - $stats['completed_tasks'] }}
{{ __('Remaining') }}
{{ __('Budget Information') }}
{{ __('Total Budget') }} ${{ number_format($project->budget ?? 0, 2) }}
{{ __('Hourly Rate') }} ${{ number_format($project->hourly_rate ?? 0, 2) }}
{{ __('Billable') }} {{ $project->is_billable ? __('Yes') : __('No') }}
{{ __('Team Members') }}
@if($project->activeMembers->count() > 0) @foreach($project->activeMembers as $member)
{{ substr($member->user->getFullName() ?? 'N/A', 0, 2) }}
{{ $member->user->getFullName() ?? 'Unknown User' }}
{{ $member->role?->label() ?? $member->role }}
@endforeach @else

{{ __('No team members assigned') }}

@endif
{{ __('Resource Allocations') }}
{{ __('Allocate Resource') }}
@if($project->resourceAllocations->count() > 0) @foreach($project->resourceAllocations as $allocation)
@if($allocation->user->profile_picture) Avatar @else
{{ $allocation->user->getInitials() }}
@endif
{{ $allocation->user->name }}
{{ $allocation->allocation_percentage }}% allocation {{ ucfirst($allocation->status) }} @if($allocation->is_billable) {{ __('Billable') }} @endif
{{ $allocation->start_date->format('M d, Y') }} @if($allocation->end_date) - {{ $allocation->end_date->format('M d, Y') }} @else - {{ __('Ongoing') }} @endif
@endforeach
{{ $stats['total_allocated_resources'] }}
{{ __('Resources') }}
{{ $stats['resource_hours_per_day'] }}h
{{ __('Hours/Day') }}
{{ number_format($stats['total_allocation_percentage'] / max($stats['total_allocated_resources'], 1), 0) }}%
{{ __('Avg Allocation') }}
@else

{{ __('No resources allocated') }}

{{ __('Allocate First Resource') }}
@endif
@if(moduleExists('TaskSystem'))
{{ __('Recent Tasks') }}
{{ __('View All') }}
@if(!empty($stats['recent_tasks'])) @foreach($stats['recent_tasks'] as $task)
@if($task['is_milestone']) @else @endif
{{ $task['title'] }}
@if($task['status']) {{ $task['status'] }} @endif @if($task['priority']) {{ $task['priority'] }} @endif @if($task['is_overdue']) {{ __('Overdue') }} @endif
@if($task['assigned_to']) {{ __('Assigned to') }}: {{ $task['assigned_to'] }} @endif
@if($task['completed_at']) {{ __('Completed') }}: {{ $task['completed_at'] }} @elseif($task['due_date']) {{ __('Due') }}: {{ $task['due_date'] }} @endif
@endforeach @else

{{ __('No recent tasks') }}

@endif
{{ __('Upcoming Tasks') }}
{{ __('Board View') }}
@if(!empty($stats['upcoming_tasks'])) @foreach($stats['upcoming_tasks'] as $task)
@if($task['is_milestone']) @else @endif
{{ $task['title'] }}
@if($task['status']) {{ $task['status'] }} @endif @if($task['priority']) {{ $task['priority'] }} @endif
@if($task['assigned_to']) {{ __('Assigned to') }}: {{ $task['assigned_to'] }} @endif
@if($task['due_date']) {{ __('Due') }}: {{ $task['due_date'] }} @if($task['days_until_due'] !== null)
{{ $task['days_until_due'] == 0 ? __('Due Today') : ($task['days_until_due'] == 1 ? __('Due Tomorrow') : $task['days_until_due'] . ' ' . __('days')) }} @endif @endif
@endforeach @else

{{ __('No upcoming tasks') }}

@endif
@endif
{{ __('Recent Timesheets') }}
{{ __('View All') }}
@if($recent_timesheets->count() > 0)
@foreach($recent_timesheets as $timesheet) @endforeach
{{ __('Date') }} {{ __('User') }} {{ __('Task') }} {{ __('Hours') }} {{ __('Status') }} {{ __('Amount') }}
{{ $timesheet->date->format('M d, Y') }} {{ $timesheet->task?->title ?? '-' }} {{ number_format($timesheet->hours, 2) }} {!! $timesheet->status_badge !!} @if($timesheet->is_billable && $timesheet->billing_rate) {{ \App\Helpers\FormattingHelper::formatCurrency($timesheet->hours * $timesheet->billing_rate) }} @else - @endif
@else

{{ __('No timesheets recorded yet') }}

@endif
@endsection