Files
portal-api/resources/views/frontend/service/partials/service-header.blade.php
T
2025-07-29 15:48:51 +07:00

43 lines
1.5 KiB
PHP

{{-- Service Header Partial - Cached for performance --}}
@php
$serverName = $invoice->invoiceItem->first()->server_name ?? 'Cloud VPS';
$vmStatus = $vmInfo['status'] ?? null;
$statusBg = match ($vmStatus) {
'POWERED_ON' => 'bg-green-600',
'POWERED_OFF' => 'bg-red-600',
default => 'bg-gray-600',
};
@endphp
<div class="bg-gray-100 rounded-xl shadow-lg p-8 flex flex-col items-center justify-center relative">
<span class="text-sm text-gray-600">{{ $invoice->invoiceItem->first()?->getProductAttribute()?->name }}</span>
<div class="bg-white rounded-lg p-6 mb-4 shadow-md">
<svg class="w-16 h-16 text-gray-700" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"
d="M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4" />
</svg>
</div>
<h1 class="text-2xl font-bold text-gray-800 text-center mb-2">
{{ $serverName }}
</h1>
<p class="text-sm text-gray-600 text-center">
{{ $serverName }}
</p>
<div class="mt-4">
</div>
<div class="h-10 w-full rounded-b-lg absolute bottom-0 left-0 flex items-center justify-center {{ $statusBg }}">
<span class="text-center text-white">
@if ($vmStatus == 'POWERED_ON')
{{ __('RUNNING') }}
@elseif($vmStatus == 'POWERED_OFF')
{{ __('STOPPED') }}
@else
{{ __('UNKNOWN') }}
@endif
</span>
</div>
</div>