@extends('admin.layouts.master') @section('title', __('admin.project_stages.show_title')) @section('css')@endsection @section('content')
@php $expenseTotal = (float) ($projectStage->expenses_sum_amount ?? 0); $healthClass = match($projectStage->health_status) { 'excellent' => 'success', 'critical' => 'danger', default => 'warning', }; @endphp

{{ __('admin.project_stages.show_title') }}: {{ $projectStage->name }}

{{ __('admin.project_stages.metrics.health') }} {{ __('admin.project_stages.health.'.$projectStage->health_status) }}
{{ __('admin.project_stages.fields.progress_percentage') }}

{{ $projectStage->progress_percentage }}%

{{ __('admin.project_stages.metrics.remaining_days') }}

{{ $projectStage->remaining_days ?? '—' }}

{{ __('admin.project_stages.metrics.stage_expenses') }}

{{ number_format($expenseTotal, 2) }}

{{ __('admin.project_stages.details_title') }}

{{ $projectStage->project?->project_name ?: $projectStage->project?->name }}
{{ $projectStage->name }}
{{ $projectStage->sequence_no }}
{{ __('admin.project_stages.statuses.'.$projectStage->status) }}
{{ $projectStage->progress_percentage }}%
{{ $projectStage->start_date?->format('Y-m-d') ?: '—' }}
{{ $projectStage->end_date?->format('Y-m-d') ?: '—' }}
{{ $projectStage->actual_start_date?->format('Y-m-d') ?: '—' }}
{{ $projectStage->actual_end_date?->format('Y-m-d') ?: '—' }}
{{ $projectStage->planned_duration_days ?? '—' }}
{{ $projectStage->actual_duration_days ?? '—' }}
{{ $projectStage->schedule_variance_days ?? '—' }}
{{ $projectStage->completed_at?->format('Y-m-d H:i') ?: '—' }}
{{ $projectStage->notes ?: '—' }}

{{ __('admin.project_stages.progress_card_title') }}

{{ $projectStage->progress_percentage }}%

{{ __('admin.project_stages.progress_hint') }}

{{ __('admin.project_stages.timeline_title') }}

{{ __('admin.project_stages.related_expenses_title') }}

{{ $projectStage->expenses_count }}
@if($projectStage->expenses->isEmpty())

{{ __('admin.project_stages.empty_related_expenses') }}

@else
@foreach($projectStage->expenses as $expense) @endforeach
{{ __('admin.expenses.fields.title') }} {{ __('admin.expenses.fields.expense_date') }} {{ __('admin.expenses.fields.amount') }} {{ __('admin.expenses.fields.status') }}
{{ $expense->title }} {{ $expense->expense_date?->format('Y-m-d') ?: '—' }} {{ number_format((float) $expense->amount, 2) }} {{ __('admin.expenses.statuses.'.$expense->status) }}
@endif

{{ __('admin.project_stages.related_attachments_title') }}

{{ $projectStage->attachments_count }}
@if($projectStage->attachments->isEmpty())

{{ __('admin.project_stages.empty_related_attachments') }}

@else
    @foreach($projectStage->attachments as $attachment)
  • {{ $attachment->original_name ?: $attachment->file_name }}
    {{ $attachment->category ?: '—' }}
  • @endforeach
@endif
@endsection