@php $hasStatus6 = $project->statuses->contains('status', 6); @endphp @if ($hasStatus6)
@php $structureUse = $surveys->structure_use; $status = null; if ($structureUse == '1') { $residential = $surveys->SurveyUserResidential->first(); $status = $residential?->updated_status; } elseif ($structureUse == '2') { $commercial = $surveys->surveyUserCommercial->first(); $status = $commercial?->updated_status; } elseif ($structureUse == '3') { $residential = $surveys->SurveyUserResidential->first(); $status = $residential?->updated_status; } elseif ($structureUse == '4') { $other = $surveys->surveyUserOthers->first(); $status = $other?->updated_status; } @endphp @php $hasStatus6 = $project->statuses->contains('status', 6); @endphp @if ($status == 'pending' && $hasStatus6)
@endif
{{-- Consumer Input --}}
@if ($docs->api_response) @php $savedData = json_decode($docs->api_response, true); $provider = $docs->provider ?? null; $keysToSkip = ['consumptions', 'internalNotes', 'extraData', 'rawJson']; $dataArray = []; $columns = []; if (is_array($savedData)) { $dataArray = $savedData; if ($provider === 'Property') { $columns = array_keys(array_diff_key($dataArray[0] ?? [], array_flip($keysToSkip))); } else { $columns = array_keys($dataArray[0] ?? []); } } @endphp @if (!empty($dataArray))
@foreach ($columns as $col) @endforeach @foreach ($dataArray as $row) @foreach ($columns as $col) @php $val = $row[$col] ?? '-'; if ( $val === '9999-12-31' || $val === '1900-01-01T00:00:00' || $val === '9999-12-31T00:00:00Z' ) { $val = ''; } @endphp @endforeach @endforeach
{{ $col }}
{{ $val !== '' ? $val : '' }}
@else
No valid data to display.
@endif @else
@endif @php $display = 'display:none;'; if ( !is_null($docs->api_response) // && is_null($docs->remarks) ) { $display = ''; } @endphp @php $structureUse = $surveys->structure_use; $status = null; if ($structureUse == '1') { $residential = $surveys->SurveyUserResidential->first(); $status = $residential?->updated_status; } elseif ($structureUse == '2') { $commercial = $surveys->surveyUserCommercial->first(); $status = $commercial?->updated_status; } elseif ($structureUse == '3') { $residential = $surveys->SurveyUserResidential->first(); $status = $residential?->updated_status; } elseif ($structureUse == '4') { $other = $surveys->surveyUserOthers->first(); $status = $other?->updated_status; } @endphp @if ($status == 'pending')
@endif
@endif @push('scripts') @endpush