@extends('layouts.admin')
@section('title','Consentimentos')
@section('content')
<h1>Consentimentos</h1>
<p><a class="btn" href="{{ route('admin.consents.create') }}">Novo consentimento</a></p>
<table><thead><tr><th>Titular</th><th>Caso</th><th>Tipo</th><th>Data</th><th></th></tr></thead><tbody>@foreach($consents as $consent)<tr><td>{{ $consent->subject_name }}</td><td>{{ $consent->caseFile?->title }}</td><td>{{ $consent->consent_type }}</td><td>{{ $consent->granted_at }}</td><td><a href="{{ route('admin.consents.edit', $consent) }}">Editar</a> | <form method="POST" action="{{ route('admin.consents.destroy', $consent) }}" style="display:inline">@csrf @method('DELETE')<button type="submit">Excluir</button></form></td></tr>@endforeach</tbody></table>
@endsection
