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

{{ __('contract.vote.title') }}


@if( $contract['generated'] || $contract['title'] == 'free_body' )

{{ __('contract.vote.freeword.description') }}

@else

{{ __('contract.vote.description') }}

@endif @foreach ($contract['questionGroups'] as $group)

{{ $group['label'] }}

@foreach ( $group['questions'] as $question ) @php $voteKey = false; @endphp @if( $question['renderType'] == 'input' ) {!! $form->index( 'edit', $question, 'd-block' ) !!} @php $voteShow = false; @endphp @else {!! $form->index( 'summary', $question ) !!} @foreach ( $group['vote'] as $key => $vote ) @if ( isset($vote['userId']) && $vote['userId'] == $user['id'] ) @php $voteKey = $key; @endphp @endif @endforeach @php $voteKey = 0; @endphp @php $voteShow = true; @endphp @endif @endforeach @if( $loop->index == 0 )
@if( $group['vote'][0]['data'] == 'accepted' ) @if( $question['renderType'] == 'input' ) @else {!! $form->vote( $group['vote'][0]['data'], $voteShow, $voteKey, $loop->iteration ) !!} {!! $form->vote_cancel() !!} @endif @else {!! $form->vote( $group['vote'][0]['data'], $voteShow, $voteKey, $loop->iteration ) !!} {!! $form->vote_cancel() !!} @endif
@endif @if ( $loop->index != 0 ) @if( $contract[ 'status' ] == 'review' ) {!! $form->vote( $group['vote'][0]['data'], $voteShow, $voteKey, $loop->iteration ) !!} {!! $form->vote_cancel() !!} @else {!! $form->vote_status( $group['vote'][0]['data'] ) !!} @endif @endif
@endforeach
@if( $this_parties['signed'] == false ) @else @endif
@endsection @push('scripts') @endpush