@extends('layouts.master_panel') @section('title', trans('titles.diligenciar')) @section('card-icon')@endsection @section('card-title', strtoupper(trans('titles.diligenciar'))) @section('content')
@include('sections.validation.messages') @include('sections.forms.components.messages')
@include('sections.forms.components.global-buttons')
{!! trans('buttons.regresar') !!}

{{ strtoupper($form->name) }}

{!! Form::open([ 'method' => 'POST', 'role' => 'form', 'url' => url('answeredForms/save'), 'id' => 'format', 'enctype' => 'multipart/form-data', ]) !!} {!! Form::hidden('id', isset($answeredFormat) ? $answeredFormat->id : null, ['id' => 'id']) !!} {!! Form::hidden('fk_id_format', isset($form) ? $form->id : null, ['id' => 'fk_id_format']) !!} {!! Form::hidden('fk_id_user', $idUser, ['id' => 'fk_id_user']) !!}
{!! Form::select('fk_id_person', $persons, isset($answeredFormat) ? $answeredFormat->fk_id_person : null, [ 'class' => 'form-control selectpicker especialdrop is_required', 'title' => trans('labels.personaQueDiligencia'), 'data-actions-box' => 'true', 'id' => 'fk_id_person', 'required' => 'true', 'data-live-search' => 'true', ]) !!}
@foreach ($form->groups->sortBy('order') as $group)
@if ($group->visible_name == 1) {{ $group->name }} @else   @endif @if ($group->visible_description == 1)
@else   @endif
  • @foreach ($group->questions->sortBy('order') as $question) @if ($question->dynamic == null && $question->dynamic != 2) @component('sections.forms.components.question', [ 'question' => $question, 'projects' => $projects, 'responsibleHse' => isset($responsibleHse) ? $responsibleHse : [], 'machines' => isset($machines) ? $machines : [], 'supervisors' => isset($supervisors) ? $supervisors : [], 'drillers' => isset($drillers) ? $drillers : [], 'drillingAuxiliars' => isset($drillingAuxiliars) ? $drillingAuxiliars : [], 'answer' => isset($answeredFormat) ? $answeredFormat->questions->where('id', $question->id)->first() : null, ]) @endcomponent @elseif($question->dynamic == 1) @component('sections.forms.components.dynamic-question', [ 'questions' => $group->questions->where('fk_id_question_type',$question->fk_id_question_type)->where('columns',$question->columns), 'answers' => isset($answeredFormat) ? $answeredFormat->questions->where('fk_id_question_type',$question->fk_id_question_type) : null ]) @endcomponent @endif @endforeach
@endforeach
{!! trans('labels.archivoSoporte') !!}
@if (isset($answeredFormat) && $answeredFormat->file_url != null)
{!! trans('buttons.descargar') !!}
@endif
{!! Form::textarea('comment', isset($answeredFormat) ? $answeredFormat->comment : null, [ 'class' => 'form-control', 'id' => 'comment', ]) !!}
@if (isset($viewMode)) @endif @if (!isset($viewMode)) @if (!isset($answeredFormat)) @else @endif @endif
{!! Form::close() !!}
@endsection @push('plugins') @endpush