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

{{$equipment_name}} CheckList:


@php $checkListContent=''; foreach ($divs as $div){ $div_id = $div['id']; $div_name = $div['name']; $checkListContent .='
'.$div_name.'
'; foreach ($used_fields as $val) { foreach ($val as $value) { $input_type = $value['type']; //0=>text, 1=>radio, 2=>info if ($input_type==0) { $text_input = ''; $field_inputs = $text_input; } elseif ($input_type==1) { $radio_1 = '
'; $radio_2 = '
'; $radio_3 = '
'; $radio_input = $radio_1.$radio_2.$radio_3; $field_inputs = $radio_input; } else { $info_input=' '; $field_inputs = $info_input; } if($value['chklistdiv_id'] == $div_id) { $checkListContent .='
'.$value["description"].':
'.$field_inputs.'
'; } } } $checkListContent .='
'; } // foreach ($chkliststructures as $chkliststructure) // { // $chklist_id = $chkliststructure->chklist_id; // $div_id = $chkliststructure->chklistdiv_id; // $field_id = $chkliststructure->chklistfield_id; // $div_name = Chklistdiv::where(); // } @endphp
@php echo ($checkListContent) @endphp
@foreach ($divs as $div) @php $div_id = $div['id']; $div_name = $div['name']; $checkListContent=''; @endphp
    @php foreach ($used_fields as $val) foreach ($val as $value) { { if($value['id'] == $div->id ) { $input_type = $value['type']; //0=>text, 1=>radio, 2=>info if ($input_type==0) { $text_input = ''; $field_inputs = $text_input; } elseif ($input_type==1) { $radio_1 = '
    '; $radio_2 = '
    '; $radio_3 = '
    '; $radio_input = $radio_1.$radio_2.$radio_3; $field_inputs = $radio_input; } else { $info_input=' '; $field_inputs = $info_input; } $checkListContent .='
  • '.$value["description"].'
    '.$field_inputs.'
  • '; } } } echo ($checkListContent); @endphp
@endforeach
@endsection