@extends('layouts.app') @section('content')
@if(session('success')) @endif @if(session('error')) @endif

{{ __('รายการผลิตภัณฑ์') }}

@if(Auth::user()->Agency_ID)

{{ __('บริษัท: ') . Auth::user()->agency->Agency_Name }}

@endif
@if(session('success')) @elseif(session('error') && !session('success')) @php session()->forget('error'); @endphp @endif @if($products->isEmpty())

{{ __('ไม่มีผลิตภัณฑ์') }}

@if(Auth::user()->Agency_ID) {{ __('บริษัทของคุณยังไม่มีผลิตภัณฑ์') }} @else {{ __('คุณยังไม่มีผลิตภัณฑ์') }} @endif

{{ __('เพิ่มผลิตภัณฑ์แรก') }}
@else
@foreach($products as $index => $product) @endforeach
ลำดับ ชื่อผลิตภัณฑ์ โมเดล/รุ่น วิธีรับข้อมูล ประเภทผลิตภัณฑ์ สถานะการประเมิน วันที่สร้าง การดำเนินการ
{{ $index + 1 }} {{ $product->name }} @if($product->description)
{{ Str::limit($product->description, 50) }} @endif
{{ $product->model ?? 'ไม่ระบุ' }} @switch($product->log_receive_method) @case('syslog_udp') syslog UDP @break @case('syslog_tcp') syslog TCP @break @case('syslog_both') syslog UDP & TCP @break @default {{ $product->log_receive_method }} @endswitch @if($product->product_type == 'hw_sw_log_server') Hardware + Software @else Software Only @endif @php $latestAssessment = $product->assessments()->latest()->first(); @endphp @if($latestAssessment) @if($latestAssessment->status == 'draft') ฉบับร่าง @elseif($latestAssessment->status == 'submitted') ส่งแล้ว @else {{ $latestAssessment->status }} @endif @else ยังไม่ประเมิน @endif {{ $product->DtmIns->format('d/m/Y') }}
@if($latestAssessment && $latestAssessment->status == 'draft') ทำต่อ @endif รายงาน
@csrf @method('DELETE')
@endif
@endsection