@php $isEditing = isset($parceiro) && $parceiro->exists; $allTags = \V2\Core\Models\ConexaoTag::orderBy('name')->get(); $selectedTags = old('tags', $isEditing && $parceiro->relationLoaded('tags') ? $parceiro->tags->pluck('name')->toArray() : []); // Redes sociais existentes convertidas para JSON do builder (SEM site — campo independente) $defaultSocial = [ ['network' => 'linkedin', 'icon' => 'bi-linkedin', 'url' => '', 'order' => 1, 'active' => true], ['network' => 'facebook', 'icon' => 'bi-facebook', 'url' => '', 'order' => 2, 'active' => true], ['network' => 'instagram', 'icon' => 'bi-instagram', 'url' => '', 'order' => 3, 'active' => true], ]; $socialInit = []; if ($parceiro->linkedin_url ?? '') $socialInit[] = ['network'=>'linkedin', 'url'=>$parceiro->linkedin_url, 'icon'=>'bi-linkedin', 'order'=>1, 'active'=>true]; if ($parceiro->facebook_url ?? '') $socialInit[] = ['network'=>'facebook', 'url'=>$parceiro->facebook_url, 'icon'=>'bi-facebook', 'order'=>2, 'active'=>true]; if ($parceiro->instagram_url ?? '') $socialInit[] = ['network'=>'instagram','url'=>$parceiro->instagram_url, 'icon'=>'bi-instagram','order'=>3, 'active'=>true]; $socialInitJson = json_encode(!empty($socialInit) ? $socialInit : $defaultSocial); @endphp @push('css') @endpush {{-- ============================================= --}} {{-- SEÇÃO 1: METADADOS --}} {{-- ============================================= --}}
Metadados
{{-- Linha 1: Nome + Slug --}}
@if($errors->has('name'))
{{ $errors->first('name') }}
@endif
Nome oficial do parceiro ou empresa.
/{{ $parceiro->slug ?? str_slug(old('name', 'nome-do-parceiro')) }}
Gerado automaticamente a partir do nome.
{{-- Tags --}}
@if(!empty($selectedTags)) @foreach($selectedTags as $tagName) {{ $tagName }} @endforeach @endif
@if($allTags->isNotEmpty())
@foreach($allTags as $tag) @endforeach
Clique em uma tag disponível para adicioná-la. @endif
{{-- Linha 2: Site + Redes Sociais --}}
    {{-- Hidden inputs mantidos para compatibilidade com o controller --}}
    Links para as redes sociais do parceiro. Todos opcionais.
    {{-- Linha 3: Endereço + Google Maps --}}
    @if($errors->has('address'))
    {{ $errors->first('address') }}
    @endif
    @if($errors->has('google_maps_url'))
    {{ $errors->first('google_maps_url') }}
    @endif
    Link da localização no Google Maps.
    @push('scripts') @endpush