@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
{{-- Detail Information --}}
TNA Request History Detail
{{-- Row 1: Requestor Info --}}

{{ $list->requestor_nik }}

{{ $list->requestor_name }}

{{ $list->requestor_departemen }}

{{ $list->requestor_bagian }}

{{-- Row 2: Training Info & Date --}}

{{ $list->name_trn }}

{{ \Carbon\Carbon::parse($list->month_estimation)->format('d F Y') }}

@php $finalStatus = 'pending'; if ($list->approval_hrd == 'rejected') { $finalStatus = 'rejected'; } elseif (isset($tna_header) && $tna_header && $tna_header->approval_hrd == 'rejected') { $finalStatus = 'rejected'; } elseif (isset($tna_header) && $tna_header && $tna_header->approval_atasan == 'rejected') { $finalStatus = 'rejected'; } elseif ($list->approval_hrd == 'approved') { $finalStatus = 'approved'; } @endphp @if ($finalStatus == 'approved') Approved @elseif ($finalStatus == 'rejected') Rejected @else Pending @endif

{{-- Row 3: Description & Created --}}

{{ $list->description ?: '-' }}

{{ $list->created_at ? \Carbon\Carbon::parse($list->created_at)->format('d M Y H:i') : '-' }}

{{-- Rejection Reasons - Request TNA --}} @if ($list->approval_hrd == 'rejected' && $list->rejection_reason)

{{ $list->rejection_reason }}

@else
@endif
{{-- Rejection Reasons - Form TNA --}} @if (isset($tna_header) && $tna_header && ($tna_header->approval_hrd == 'rejected' || $tna_header->approval_atasan == 'rejected'))
@if ($tna_header->approval_hrd == 'rejected' && $tna_header->reject_reason_hrd)

{{ $tna_header->reject_reason_hrd }}

@endif @if ($tna_header->approval_atasan == 'rejected' && $tna_header->reject_reason_atasan)

{{ $tna_header->reject_reason_atasan }}

@endif
@endif
{{-- Tracking Steps --}}
Tracking
{{-- Step 1: Request Approval --}}
@if($steps['step1']['status'] == 'approved') @elseif($steps['step1']['status'] == 'rejected') @elseif($steps['step1']['status'] == 'disabled') @else @endif
{{ $steps['step1']['label'] }}

{{ $steps['step1']['description'] }}

{{-- Step 2: TNA HRD Approval --}}
@if($steps['step2']['status'] == 'approved') @elseif($steps['step2']['status'] == 'rejected') @elseif($steps['step2']['status'] == 'disabled') @else @endif
{{ $steps['step2']['label'] }}

{{ $steps['step2']['description'] }}

{{-- Step 3: TNA Atasan Approval --}}
@if($steps['step3']['status'] == 'approved') @elseif($steps['step3']['status'] == 'rejected') @elseif($steps['step3']['status'] == 'disabled') @else @endif
{{ $steps['step3']['label'] }}

{{ $steps['step3']['description'] }}

{{-- Step 4: Convert to TRN --}}
@if($steps['step4']['status'] == 'approved') @elseif($steps['step4']['status'] == 'rejected') @elseif($steps['step4']['status'] == 'disabled') @else @endif
{{ $steps['step4']['label'] }}

{{ $steps['step4']['description'] }}

@endsection @push('css') @endpush