@extends('layouts.admin') @push('js') @endpush @section('content')

Dependentes

@alerts @endalerts @button([ 'route' => $routes['dependente']['create']['route'], 'routeParams' => $routes['dependente']['create']['params'], 'icon' => 'plus', 'label' => 'Incluir', 'class' => 'btn-primary' ]) @endbutton @foreach ($dependentes as $dependente) @php $listaConvenios = implode(', ', $dependente->convenios->pluck('convenio.nome')->toArray()); @endphp @endforeach
Nome Data de nascimento Grau Especial Convênios Ativo Ação
{{ $dependente->nome }} {{ $dependente->data_nascimento->format('d/m/Y') }} {{ $dependente->grau_parentesco->getValue() }} {{ $dependente->especial ? 'SIM' : 'NÃO' }} {{ $listaConvenios }} {{ $dependente->ativo ? 'SIM' : 'NÃO' }} @button([ 'route' => $routes['dependente']['edit']['route'], 'routeParams' => [$routes['dependido']['key'] => $routes['dependente']['edit']['params'][$routes['dependido']['key']], 'dependente' => $dependente], 'class' => 'btn-primary', 'label' => 'Visualizar/Editar', 'icon' => 'edit' ]) @endbutton @button([ 'class' => 'btn-danger btn-excluir-dependente', 'icon' => 'x', 'label' => 'Excluir', 'route' => $routes['dependente']['destroy']['route'], 'routeParams' => [$routes['dependido']['key'] => $routes['dependente']['destroy']['params'][$routes['dependido']['key']], 'dependente' => $dependente], ]) @endbutton
@endsection