@extends('layouts.app') @section('title', $consultor->full_name . ' | Meu Perfil Detalhado') @push('styles') @endpush @section('content')

{{ $consultor->full_name }}

{{ $consultor->current_title ?? 'Profissional' }}

Atualizado em {{ $consultor->updated_at->format('d M Y') }}

{{ $consultor->experience_years ?? '0' }} anos de experiência
@php $columnsConfig = [ // ========================= // DADOS PESSOAIS (ALTA) // ========================= 'first_name' => [ 'name' => 'Nome', 'weight' => 4, 'category' => 'Dados Pessoais' ], 'last_name' => [ 'name' => 'Sobrenome', 'weight' => 4, 'category' => 'Dados Pessoais' ], 'date_of_birth' => [ 'name' => 'Data de Nascimento', 'weight' => 3, 'category' => 'Dados Pessoais' ], 'gender' => [ 'name' => 'Género', 'weight' => 2, 'category' => 'Dados Pessoais' ], 'nationality' => [ 'name' => 'Nacionalidade', 'weight' => 2, 'category' => 'Dados Pessoais' ], // ========================= // CONTACTOS (ALTA) // ========================= 'phone' => [ 'name' => 'Telefone', 'weight' => 4, 'category' => 'Contactos' ], 'address' => [ 'name' => 'Endereço', 'weight' => 2, 'category' => 'Contactos' ], // ========================= // LOCALIZAÇÃO (MÉDIA) // ========================= 'province_id' => [ 'name' => 'Província', 'weight' => 2, 'category' => 'Localização' ], 'city' => [ 'name' => 'Cidade', 'weight' => 2, 'category' => 'Localização' ], // ========================= // PERFIL PROFISSIONAL (ALTA) // ========================= 'current_title' => [ 'name' => 'Título Profissional', 'weight' => 5, 'category' => 'Perfil Profissional' ], 'bio' => [ 'name' => 'Resumo Profissional', 'weight' => 3, 'category' => 'Perfil Profissional' ], 'experience_years' => [ 'name' => 'Anos de Experiência', 'weight' => 4, 'category' => 'Perfil Profissional' ], 'education_level' => [ 'name' => 'Nível de Educação', 'weight' => 3, 'category' => 'Perfil Profissional' ], 'expected_salary' => [ 'name' => 'Expectativa Salarial', 'weight' => 2, 'category' => 'Perfil Profissional' ], // ========================= // COMPETÊNCIAS (ALTA) // ========================= 'skills' => [ 'name' => 'Competências', 'weight' => 4, 'category' => 'Competências', 'type' => 'array' ], 'languages' => [ 'name' => 'Idiomas', 'weight' => 3, 'category' => 'Competências', 'type' => 'array' ], // ========================= // PREFERÊNCIAS (BAIXA) // ========================= 'preferred_locations' => [ 'name' => 'Localizações Preferidas', 'weight' => 1, 'category' => 'Preferências', 'type' => 'array' ], 'preferred_job_types' => [ 'name' => 'Tipos de Emprego Preferidos', 'weight' => 1, 'category' => 'Preferências', 'type' => 'array' ], // ========================= // STATUS (BAIXA) // ========================= 'is_active' => [ 'name' => 'Perfil Ativo', 'weight' => 1, 'category' => 'Status' ], 'is_available' => [ 'name' => 'Disponível para Trabalho', 'weight' => 1, 'category' => 'Status' ], ]; // Inicializar variáveis $totalWeight = 0; $filledWeight = 0; $completionDetails = []; $categoryProgress = []; if (isset($consultor) && $consultor) { foreach ($columnsConfig as $column => $config) { $totalWeight += $config['weight']; $isFilled = false; $value = $consultor->$column; // Verificar se o campo está preenchido if (isset($config['type']) && $config['type'] === 'array') { // Campos do tipo array/JSON if (!empty($value)) { if (is_array($value) && count($value) > 0) { $filledWeight += $config['weight']; $isFilled = true; } elseif (is_string($value)) { $decoded = json_decode($value, true); if (is_array($decoded) && count($decoded) > 0) { $filledWeight += $config['weight']; $isFilled = true; } } } } else { // Campos normais if (!empty($value)) { $filledWeight += $config['weight']; $isFilled = true; } } // Armazenar detalhes $completionDetails[$column] = [ 'name' => $config['name'], 'filled' => $isFilled, 'weight' => $config['weight'], 'category' => $config['category'], 'value' => $value ]; // Calcular progresso por categoria if (!isset($categoryProgress[$config['category']])) { $categoryProgress[$config['category']] = [ 'total' => 0, 'filled' => 0, 'items' => [] ]; } $categoryProgress[$config['category']]['total'] += $config['weight']; if ($isFilled) { $categoryProgress[$config['category']]['filled'] += $config['weight']; } $categoryProgress[$config['category']]['items'][] = $config['name']; } $completionPercentage = $totalWeight > 0 ? round(($filledWeight / $totalWeight) * 100) : 0; } else { $completionPercentage = 0; $completionDetails = []; $categoryProgress = []; } @endphp

Estado do meu perfil

{{ $completionPercentage }}%
Completo
{{ $filledWeight }}/{{ $totalWeight }} pontos conquistados @if($completionPercentage >= 90) - Perfil completo e pronto para candidaturas! 🎉 @elseif($completionPercentage >= 70) - Perfil quase completo. Continue assim! 💪 @elseif($completionPercentage >= 50) - Perfil moderado. Complete mais dados. 📈 @else - Perfil básico. Complete seus dados. 🚀 @endif
Itens para completar seu perfil:
  • Nome
  • Telefone
  • Título profissional
  • Anos de experiência
  • Data de nascimento
  • Nível de educação
  • Idiomas
  • Competências
  • Resumo profissional
  • Endereço completo

Dados Pessoais

Nome {{ $consultor->full_name }}
Idade @if($consultor->date_of_birth) {{ $consultor->date_of_birth->age }} anos @else Não fornecida @endif
Género {{ $consultor->gender ?? 'Não fornecido' }}
País {{ $consultor->nationality ?? 'Não fornecida' }}
Endereço @if($consultor->province) {{ $consultor->city }}, {{ $consultor->province->name }} @else {{ $consultor->city ?? 'Não especificada' }} @endif

Contactos

E-mail {{ $consultor->user->email ?? 'N/A' }}
Telefone {{ $consultor->phone ?? 'Não fornecido' }}
Endereço {{ $consultor->address ?? 'Não fornecido' }}

Perfil Profissional

Título {{ $consultor->current_title ?? 'Não definido' }}
Resumo {{ $consultor->bio ?? 'Nenhum resumo adicionado.' }}
Remuneração @if($consultor->expected_salary) {{ number_format($consultor->expected_salary, 0, ',', '.') }} MZN @else Não definida @endif
Experiência {{ $consultor->experience_years ?? '0' }} anos
Habilitação {{ $consultor->education_level ?? 'Não definido' }}

Experiência Profissional

@php $skillsArray = []; if ($consultor->skills) { if (is_array($consultor->skills)) { $skillsArray = $consultor->skills; } elseif (is_string($consultor->skills)) { $decoded = json_decode($consultor->skills, true); $skillsArray = is_array($decoded) ? $decoded : []; } } $technicalSkills = array_filter($skillsArray, function($skill) { return ($skill['type'] ?? 'technical') === 'technical'; }); @endphp @if(count($technicalSkills) > 0) @foreach($technicalSkills as $index => $skill)
{{ $skill['name'] ?? 'Experiência não especificada' }}
Nível: {{ $skill['level'] }} | {{ $skill['years'] ?? '0' }} ano(s) de experiência
@if(!empty($skill['description']))

{{ $skill['description'] }}

@endif
@endforeach @else

Nenhuma experiência adicionada.

@endif

Educação

@php $educationsArray = []; if ($consultor->preferred_job_types) { if (is_array($consultor->preferred_job_types)) { $educationsArray = $consultor->preferred_job_types; } elseif (is_string($consultor->preferred_job_types)) { $decoded = json_decode($consultor->preferred_job_types, true); $educationsArray = is_array($decoded) ? $decoded : []; } } @endphp @if(count($educationsArray) > 0) @foreach($educationsArray as $index => $education)
{{ $education['degree'] ?? 'Grau não especificado' }}

{{ $education['institution'] ?? 'Instituição não especificada' }}

{{ \Carbon\Carbon::parse($education['start_date'])->format('m/Y') }} - {{ $education['is_current'] ? 'Cursando' : (\Carbon\Carbon::parse($education['end_date'])->format('m/Y') ?? 'N/A') }}
@if($education['field'] || $education['description'])
@if($education['field'])

Área: {{ $education['field'] }}

@endif @if($education['description'])

{{ $education['description'] }}

@endif
@endif
@endforeach @else

Nenhuma formação académica adicionada.

@endif

Idiomas

@php $languagesArray = []; if ($consultor->languages) { if (is_array($consultor->languages)) { $languagesArray = $consultor->languages; } elseif (is_string($consultor->languages)) { $decoded = json_decode($consultor->languages, true); $languagesArray = is_array($decoded) ? $decoded : []; } } @endphp @if(count($languagesArray) > 0)
@foreach($languagesArray as $index => $language)
{{ $language['name'] ?? 'Idioma' }}
Leitura: {{ $language['leitura'] }}
Escrita: {{ $language['escrita'] }}
Fala: {{ $language['fala'] }}
@endforeach
@else

Nenhum idioma adicionado.

@endif
@push('scripts') @endpush @endsection