@extends('layouts.app') @section('content')

รายงานผลการประเมินผลิตภัณฑ์

ข้อมูลผลิตภัณฑ์
ชื่อผลิตภัณฑ์: {{ $product->name ?? 'ไม่ระบุ' }}
โมเดล/รุ่น: {{ $product->model ?? 'ไม่ระบุ' }}
วิธีรับข้อมูล: {{ $product->log_receive_method ?? 'ไม่ระบุ' }}
ประเภทผลิตภัณฑ์: {{ $product->product_type ?? 'ไม่ระบุ' }}
Email ติดต่อ: {{ $product->user->Email ?? 'ไม่ระบุ' }}
@if($product->image)
รูปภาพผลิตภัณฑ์
@else

ไม่มีรูปภาพ

@endif
ตารางแสดงผลการประเมิน
@if(isset($assessment) && $assessment) @if(config('app.debug'))
Debug Info:
Assessment ID: {{ $assessment->id }}
Total Answers: {{ $assessment->answers->count() }}
Evaluation Answers: {{ $assessment->answers->where('question.use_in_evaluation', true)->count() }}
@endif
การประเมินวันที่: {{ $assessment->DtmIns->format('d/m/Y H:i') }}
@if(isset($assessment->answers) && $assessment->answers->count() > 0) @php $questionNumber = 1; @endphp @foreach($assessment->answers as $index => $answer) @php $question = $answer->question; // ตรวจสอบว่าเป็นคำถามที่ใช้ในการประเมินหรือไม่ $isEvaluationQuestion = $question && $question->use_in_evaluation; @endphp @if($isEvaluationQuestion) @php $questionNumber++; @endphp @endif @endforeach @if($questionNumber == 1) @endif @else @endif
ข้อ ข้อกำหนด คำตอบ ผลการตรวจสอบ คำอธิบาย
{{ $questionNumber }} {{ $question->question_text ?? 'ไม่ระบุ' }} @if($question->description)
{{ $question->description }} @endif
@if($question->question_type == 'yes_no') {{ $answer->answer_text }} @elseif($question->question_type == 'multiple_choice') {{ $answer->answer_text }} @elseif($question->question_type == 'text') ข้อความ
{{ Str::limit($answer->answer_text, 100) }}
@else {{ $answer->answer_text ?? 'ไม่ระบุ' }} @endif
@if($question->question_type == 'yes_no') @if($answer->answer_text == 'ใช่') @else @endif @elseif($question->question_type == 'multiple_choice') @elseif($question->question_type == 'text') @else @endif @if($answer->comment)
{{ $answer->comment }}
@else ไม่มีคำอธิบาย @endif
ไม่มีคำถามที่ใช้ในการประเมิน
ไม่มีข้อมูลการประเมิน
@else
ยังไม่มีข้อมูลการประเมิน

ไม่พบผลการประเมินสำหรับผลิตภัณฑ์นี้

@endif
@endsection