{{-- Partial: single checklist response row --}} @php $isYesno = $resp->template->item_type === 'yesno'; $hasAnswer = $resp->status !== 'pending'; // boolean cast makes null→false, so use status $displayVal = $isYesno ? ($hasAnswer ? ($resp->yesno_value ? '是' : '否') : null) : $resp->content; @endphp
  • {{ $resp->template->title }} @if($resp->status === 'confirmed') 已確認 @elseif($resp->status === 'filled') 已填寫 @else 待填寫 @endif
    @if($resp->template->description)
    {{ $resp->template->description }}
    @endif @if($handover->isEditable() && $isApplicant) @if($isYesno)
    yesno_value ? 'checked' : '' }}>
    yesno_value === false) ? 'checked' : '' }}>
    @else @endif {{-- optional attachment --}}
    @if($resp->attachment_path) @else @endif
    @else
    @if($displayVal !== null && $displayVal !== '') @if($isYesno) {{ $displayVal }} @else {{ $displayVal }} @endif @else (未填寫) @endif
    @if($resp->attachment_path)
    {{ $resp->attachment_name }}
    @endif
    @if($resp->confirmed_by)
    {{ $resp->confirmer?->name }}確認於 {{ $resp->confirmed_at?->format('Y-m-d H:i') }}
    @elseif($canConfirmItem ?? ($isThisStage && $canApprove)) @endif
    @endif