{{-- si possible download PDF --}}
@php $brief = (new App\Http\Controllers\BriefController())->brief( $projet->id, 1 ) ; @endphp {{-- {{ ($brief['level']) }} --}}
@foreach($brief['projets'] as $p)
{{ $p['question'] }} @if($p['type'] == 'textarea' || $p['type'] == 'text' )

{{ $projet->brief[ $p['name'] ] ?? '--' }}

@endif @if($p['type'] == 'radio' ) @if($p['reponses']??0) @foreach($p['reponses'] as $reponse)
{{ $reponse['libelle'] }}
@if( $reponse['libelle']=='Autre' /*&& $projet->brief[ $reponse['name'] ] == $reponse['value'] */) {{ $projet->brief[ str_replace('[]','',$reponse['name']).'_preciser' ] }} @endif @if( $reponse['name']=='projet_q4' && $reponse['value']=='Oui' ) {{ $projet->brief[ str_replace('[]','',$reponse['name']).'_preciser' ] }} @endif @endforeach @endif @endif {{-- TODO : à verifier --}} @if( $p['type'] == 'checkbox' ) @if ($p['reponses'][0]['name'] == 'projet_q1[]') @if($p['reponses']??0) @foreach($p['reponses'] as $reponse) @if(is_array(json_decode($projet->brief[ str_replace('[]', '', $reponse['name']) ])))
{{ $reponse['libelle'] }}
@else
{{ $reponse['libelle'] }}
@endif @if( $reponse['libelle']=='Autre' && in_array($reponse['value'], is_array(json_decode($projet->brief[ str_replace('[]', '', $reponse['name']) ])) ? json_decode($projet->brief[ str_replace('[]', '', $reponse['name']) ]) : [] ) ) {{ $projet->brief[ str_replace('[]','',$reponse['name']).'_preciser' ] }} @endif @endforeach @endif @else @if($p['reponses']??0) @foreach($p['reponses'] as $reponse) @if(is_array($projet->brief[ str_replace('[]', '', $reponse['name']) ]))
{{ $reponse['libelle'] }}
@else
{{ $reponse['libelle'] }}
@endif @if( $reponse['libelle'] == 'Autre' && isset($projet->brief[str_replace('[]', '', $reponse['name'])]) && is_array($projet->brief[str_replace('[]', '', $reponse['name'])]) && in_array($reponse['value'], $projet->brief[str_replace('[]', '', $reponse['name'])]) ) {{ $projet->brief[str_replace('[]', '', $reponse['name']) . '_preciser'] }} @endif @endforeach @endif @endif @endif

@endforeach
{{-- {{ count($brief['personalite']) }} --}} @foreach($brief['personalite'] as $p)
{{ $p['question'] }} @if($p['type'] == 'textarea' || $p['type'] == 'text' )

{{ $projet->brief[ $p['name'] ] }}

@endif @if($p['type'] == 'radio' ) @if($p['reponses']??0) @foreach($p['reponses'] as $reponse)
{{ $reponse['libelle'] }}
@endforeach @endif @endif {{-- TODO : à verifier --}} @if( $p['type'] == 'checkbox' ) @if($p['reponses']??0) @foreach($p['reponses'] as $reponse) @if(is_array($projet->brief[ str_replace('[]', '', $reponse['name']) ]) && $projet->brief[ str_replace('[]', '', $reponse['name']) ] ?? 0)
{{ $reponse['libelle'] }}
@else
{{ $reponse['libelle'] }}
@endif @endforeach @endif @endif

@endforeach @if ($projet->type == "pro") {{ lang('Si oui, téléchargez votre charte graphique.') }} @if($projet->brief) @if(!$projet->brief->charte) Aucune photo téléchargée @else
@php $j = 0; @endphp @foreach(json_decode($projet->brief->charte) ?? [] as $photo) @php $extension = pathinfo(asset($photo))['extension']; @endphp
@if($extension == 'pdf')
@else
@endif

{{ json_decode($projet->brief->commentaire_charte)[$j++] ?? '' }}

@endforeach
@endif @endif @endif
@foreach($brief['palettes'] as $p) @php $index = (int)preg_replace('/[^0-9]/', '', $p['name']); @endphp
@if($p['palette']??0) {{ $p['question'] }} (x/5) @php $i=0; @endphp
@foreach( $p['palette'] as $key => $url ) @if ($index > 36)

{{ $key }} : {{ (json_decode($projet->brief[ $p['name'] ])[$i]) ?? '-' }}
@else

{{ $key }} : {{ ($projet->brief[ $p['name'] ][$i]) ?? '-' }}
@endif @php $i++; @endphp @endforeach
@endif @if($p['type'] == 'textarea' || $p['type'] == 'text' ) {{ $p['question'] }}

{{ $projet->brief[ $p['name'] ] ?? '--' }}

@endif

@endforeach
{{-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --}}
{!! lang('Une photo, un visuel ou une mise en situation ont attiré votre attention ?') !!} {!! lang('Copiez-collez les liens qui vous ont séduit sur Pinterest ou toute autres source.') !!} @if($projet->brief) @if(!$projet->brief->inspiration_attire_attention) Aucun lien ajouté @else @foreach($projet->brief->inspiration_attire_attention as $link ) @if(trim($link)) @if(strpos('http', $link) != -1 ) {{ $link }} @else {{ $link }} @endif @endif @endforeach @endif @endif {!! lang("Vous avez aussi la possibilité de télécharger vos photos d'inspiration préférées.") !!} @if($projet->brief) @if(!$projet->brief->inspirations) Aucune photo téléchargée @else
@php $j = 0; @endphp @foreach($projet->brief->inspirations ?? [] as $photo)
@if($projet->brief->commentaire_inspirations[$j] ?? null)

{{ $projet->brief->commentaire_inspirations[$j] ?? '' }}

@endif
@php $j++; @endphp @endforeach
@endif @endif {!! lang("Qu'est-ce que vous rêvez d'avoir dans votre nouvel espace ?") !!}

{{ $projet->brief->reve ?? '--' }}

{!! lang("A l'inverse, qu'est-ce que vous voulez absolument éviter dans votre nouvel espace ?") !!}

{{ $projet->brief->eviter ?? '--' }}

{{-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --}}
@foreach($brief['budgets'] as $p)
{{ $question }} @if( $p['type']??0 ) @if($p['type'] == 'radio') @if($p['reponses']??0) {!! lang('Pas flexible') !!} @foreach($p['reponses'] as $reponse)
{{ $reponse['libelle'] }}
@endforeach {!! lang('Très flexible') !!} @endif @endif @if($p['type'] == 'textarea' || $p['type'] == 'text' )

{{ $projet->brief[ $p['name'] ] }}

@endif @endif @if($p['elements']??0) @foreach( $p['elements'] as $key => $element )
{{ $element['libelle'] }}
@endforeach @endif

@endforeach
{{-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --}}
{!! lang('Prenez et téléchargez le plus de photos possible de votre espace.') !!}
{!! lang('Nous souhaitons avoir 4 photos au minimum : une photo de chaque côté, et une photo du plafond si applicable.') !!} {{-- {!! lang('(Champ obligatoire)') !!} --}}
@if($projet->brief) @if(!$projet->brief->espaces) Aucune photo téléchargée @else
@php $j = 0; @endphp @foreach($projet->brief->espaces ?? [] as $photo)

{{ $projet->brief->commentaire_espaces[$j++] ?? '' }}

@endforeach
@endif @endif {{ lang('Téléchargez un plan ou un croquis avec les dimensions de votre espace.') }} @if($projet->brief) @if(!$projet->brief->plans) Aucune photo téléchargée @else
@php $j = 0; @endphp @foreach($projet->brief->plans ?? [] as $photo) @php $extension = pathinfo(asset($photo))['extension']; @endphp
@if($extension == 'pdf')
@else
@endif

{{ $projet->brief->commentaire_plans[$j++] ?? '' }}

@endforeach
@endif @endif {!! lang('Prenez et téléchargez une petite vidéo de votre espace.') !!} @if($projet->brief->videos??0) @if (is_array($projet->brief->videos)) @foreach ($projet->brief->videos as $video)
@endforeach @else
@endif @else Aucune vidéo ajoutée @endif {!! lang('Souhaitez-vous conserver certains de vos meubles ou objets actuels dans votre nouvel espace ? Si oui, lesquels ?') !!} @if($projet->brief->conserver_meuble_text??'')

{{ $projet->brief->conserver_meuble_text ?? '--' }}

@endif {!! lang('Téléchargez des photos, en gros plan si possible, des meubles et des objets décoratifs que vous souhaitez conserver.') !!} @if($projet->brief) @if(!$projet->brief->meubles) Aucune photo téléchargée @else
@php $j = 0; @endphp @foreach($projet->brief->meubles ?? [] as $photo)

{{ $projet->brief->commentaire_meubles[$j++] ?? '' }}

@endforeach
@endif @endif {!! lang('Copiez-collez, si possible, des liens internet renvoyant vers ces meubles et ces objets décoratifs à conserver.') !!} @if($projet->brief) @if(!$projet->brief->attire_attention) Aucun lien ajouté @else @foreach($projet->brief->attire_attention as $link ) @if(trim($link)) @if(strpos('http', $link) != -1 ) {{ $link }} @else {{ $link }} @endif @endif @endforeach @endif @endif {!! lang('Avez-vous un commentaire ou une précision à apporter concernant votre espace (contraintes techniques, installation électriques, faux plafonds …) ?') !!}

{{ $projet->brief->commentaire ?? '--' }}

{{-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --}}