@extends('adminlte::page') @section('title', 'Approval Request') @section('css') @endsection @section('content_header') @php $title = $threat?->record_type == 'Threat' ? 'Threat' : 'Opportunity'; $routeName = $threat?->record_type == 'Threat' ? 'threats.edit' : 'opportunities.edit'; @endphp

Approval Request Details

@endsection @section('content')
@php $statusClass = ''; if (strtolower($approvalDetails->status) === 'approved') { $statusClass = 'text-success'; // green } elseif (strtolower($approvalDetails->status) === 'pending') { $statusClass = 'text-orange'; // orange } @endphp

{{ $title }} Approval - {{ ucfirst($approvalDetails->status ?? '-') }}

@if (ucfirst($approvalDetails->status) === 'Pending' && $approvalDetails->assigned_to === Auth::user()->id) @endif

{{ $submitter?->full_name ?? '-' }}

{{ optional($approvalDetails->datetime)->format('d-m-Y') ?? '-' }}

{{ $actualApprover?->full_name ?? '-' }}

{{ $assignee?->full_name ?? '-' }}

Approval Details

{{ $threat?->owner?->full_name ?? '-' }}

{{ $threat?->overall_status ?? '-' }}

{{ $phase?->full_name ?? '-' }}

{{ $threatActionCount }}

{{-- Submitter Comments --}}

Submitter Comments

@forelse($histories as $history) @if (!empty($history->comment))
user image {{ $history->creator?->full_name ?? 'Unknown User' }} {{ \Carbon\Carbon::parse($history->created_at)->format('d-m-Y h:i A') }}

{{ $history->comment }}

@endif @empty

No submitter comments available.

@endforelse
@include('backend.my_approvals.modals-myapprovals') @endsection