@php use App\Http\Controllers\ModCronos; use App\Models\Profile; use App\Http\Controllers\Mod\ModNegotiation; @endphp

Negociação:   {{$id_negotiation }} {{-- ACESSO AS FERRAMENTAS DA NEGOCIACAO --}} @if( ModNegotiation::accessTool([ 'idUserResponsible'=>$record_negotiation->idUserResponsible, 'idUserResponsibleClient'=>$record_negotiation->idUserResponsibleClient, 'idUserResponsibleAssistant'=> $record_negotiation->idUserResponsibleAssistant, ]) == 1) @include('mod-negotiation-relationship.index-negotiation-action') @else
@endif

{{--PERMISSAO| VENDEDOR: RESPONSAVEL/ASSISTENTE/ADM--}} {{--@if($record_negotiation->idUserResponsible !== $profile->idUser)--}} @php $profile_seller = Profile::user( $record_negotiation->idUserResponsible) ; @endphp
Vendedor: {{$profile_seller->userName}}
{{--@endif--}} {{--@dump($record_negotiation->idUserResponsible, $profile->idUser)--}} @if($record_negotiation->idUserResponsibleAssistant !== null) @php $profile_assistant= Profile::user($record_negotiation->idUserResponsibleAssistant); @endphp @if($record_negotiation->idUserResponsible == $profile->idUser)
Auxiliar de Venda: {{ $profile_assistant->userName }}
@elseif($record_negotiation->idUserResponsible !== $profile->idUser) @if($record_negotiation->idUserResponsibleAssistant !== $profile->idUser)
Auxiliar de Venda: {{ $profile_assistant->userName }}
@endif @endif @endif
: {{$record_negotiation->contactName }}
: {{$record_negotiation->contactCel }}
: {{$record_negotiation->contactEmail }}
Relacionamento: {{ModCronos::convertDateTimeBR(isset($record_negotiation->created_at_relationship)?$record_negotiation->created_at_relationship:'x') }}
Criado: {{ModCronos::convertDateTimeBR($record_negotiation->created_at) }}
Atualizado: {{ModCronos::convertDateTimeBR($record_negotiation->updated_at) }}