71 lines
3.2 KiB
PHP
Executable File
71 lines
3.2 KiB
PHP
Executable File
@extends('layouts.app')
|
|
|
|
@section('header', 'Provedores de IA')
|
|
|
|
@section('breadcrumbs')
|
|
@php
|
|
$breadcrumbs = [
|
|
'Provedores' => route('ai-providers.index')
|
|
];
|
|
@endphp
|
|
@endsection
|
|
|
|
@section('content')
|
|
<div class="card shadow mb-4">
|
|
<div class="card-header py-3 d-flex justify-content-between align-items-center">
|
|
<h6 class="m-0 fw-bold text-primary">Lista de Provedores</h6>
|
|
<a href="{{ route('ai-providers.create') }}" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-plus-circle"></i> Novo Provedor
|
|
</a>
|
|
</div>
|
|
<div class="card-body">
|
|
@if(isset($providers) && count($providers) > 0)
|
|
<div class="table-responsive">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Nome</th>
|
|
<th>Tipo</th>
|
|
<th>Status</th>
|
|
<th>Ações</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($providers as $provider)
|
|
<tr>
|
|
<td>{{ $provider->name }}</td>
|
|
<td>{{ $provider->type ?? 'N/A' }}</td>
|
|
<td>
|
|
<span class="badge bg-{{ $provider->is_active ? 'success' : 'secondary' }}">
|
|
{{ $provider->is_active ? 'Ativo' : 'Inativo' }}
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<a href="{{ route('ai-providers.show', $provider) }}" class="btn btn-info btn-sm">
|
|
<i class="bi bi-eye"></i>
|
|
</a>
|
|
<a href="{{ route('ai-providers.edit', $provider) }}" class="btn btn-warning btn-sm">
|
|
<i class="bi bi-pencil"></i>
|
|
</a>
|
|
<form action="{{ route('ai-providers.destroy', $provider) }}" method="POST" class="d-inline" onsubmit="return confirm('Tem certeza?')">
|
|
@csrf @method('DELETE')
|
|
<button class="btn btn-danger btn-sm"><i class="bi bi-trash"></i></button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@if(is_object($providers) && method_exists($providers, 'links'))
|
|
<div class="mt-3">
|
|
{{ $providers->links() }}
|
|
</div>
|
|
@endif
|
|
@else
|
|
<p class="text-muted">Nenhum provedor encontrado.</p>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@endsection
|