{{-- resources/views/vpn-requests/show.blade.php --}} @extends('layouts.app') @section('content')

申請詳情

{{-- 申請基本資訊 --}}
{{ $vpnRequest->username }}
{{ $vpnRequest->group }}
{{ \Carbon\Carbon::parse($vpnRequest->expire_date)->toDateString() }}
{{ $vpnRequest->note ?: '-' }}
{{ $vpnRequest->supervisor->name }}
{{ $vpnRequest->user->name }}
{{ $vpnRequest->created_at->format('Y-m-d H:i') }}
@php $color = match ($vpnRequest->status) { 'approved' => 'success', 'rejected' => 'danger', 'pending_supervisor' => 'warning', 'pending_admin' => 'info', default => 'secondary', }; @endphp
@switch($vpnRequest->status) @case('pending_supervisor') 待主管審核 @break @case('pending_admin') 待管理者審核 @break @case('approved') 已通過 @break @case('rejected') 已拒絕 @break @default 未知狀態 @endswitch
{{-- 操作按鈕 --}}
{{-- 下載申請單(僅通過才能下載) --}} @if ($vpnRequest->status === 'approved') 下載申請單 @else @endif {{-- 取消申請(尚未審核或審核中才可) --}} @if (!in_array($vpnRequest->status, ['approved', 'rejected']))
@csrf @method('DELETE')
@endif 返回列表
@endsection