Initial implementation of the HomeSysPanel CMS built with Laravel 13.0. Includes complete admin panel, content management, user authentication, modular architecture for products/services/chatbot, and marketing tools. Key features: - User authentication with email verification and password reset - Role-based access control (Admin/User with granular permissions) - Content management (pages, news, FAQ, downloads, galleries, banners) - Contact management system with subjects and responses - Marketing tools (email campaigns, visitor analytics, social sharing) - Modular architecture (Products, Services, Chatbot modules) - AI Chatbot integration with OpenRouter.ai and LlamaCpp support - Visitor tracking with geolocation - SEO optimization with meta tags and Open Graph - Responsive design with Bootstrap 5 - Dark mode support - Maintenance mode - Feature request system
127 lines
5.8 KiB
PHP
Executable File
127 lines
5.8 KiB
PHP
Executable File
@extends('layouts.admin')
|
|
|
|
@section('title', 'Chatbot - Base de Conhecimento')
|
|
|
|
@section('content')
|
|
<div class="container-fluid px-4">
|
|
<!-- Page Heading -->
|
|
<div class="d-sm-flex align-items-center justify-content-between mb-4">
|
|
<h1 class="h3 text-gray-800">
|
|
<i class="bi bi-robot me-2"></i>Chatbot - Base de Conhecimento
|
|
</h1>
|
|
<div class="d-flex gap-2">
|
|
<a href="{{ route('admin.chatbot.settings') }}" class="btn btn-secondary btn-sm">
|
|
<i class="bi bi-gear me-1"></i>Configurações
|
|
</a>
|
|
<a href="{{ route('admin.chatbot.create') }}" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-plus-circle me-1"></i>Nova Informação
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
@if(session('success'))
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
{{ session('success') }}
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
@endif
|
|
|
|
<!-- Info Card -->
|
|
<div class="card shadow mb-4">
|
|
<div class="card-header py-3 d-flex align-items-center">
|
|
<h6 class="m-0 font-weight-bold text-primary">Informações do Chatbot</h6>
|
|
</div>
|
|
<div class="card-body">
|
|
<p class="text-muted mb-0">
|
|
<i class="bi bi-info-circle me-1"></i>
|
|
Adicione informações sobre a empresa, produtos e serviços para que o assistente virtual possa responder aos visitantes.
|
|
Quanto mais detalhada for a base de conhecimento, melhores serão as respostas.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Knowledge Base Table -->
|
|
<div class="card shadow mb-4">
|
|
<div class="card-header py-3">
|
|
<h6 class="m-0 font-weight-bold text-primary">Base de Conhecimento ({{ $knowledgeEntries->total() }} entradas)</h6>
|
|
</div>
|
|
<div class="card-body">
|
|
@if($knowledgeEntries->count() > 0)
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered table-hover" width="100%" cellspacing="0">
|
|
<thead>
|
|
<tr>
|
|
<th>Título</th>
|
|
<th>Categoria</th>
|
|
<th>Conteúdo</th>
|
|
<th>Restrições</th>
|
|
<th>Status</th>
|
|
<th width="120">Ações</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($knowledgeEntries as $entry)
|
|
<tr>
|
|
<td class="font-weight-bold">{{ $entry->title }}</td>
|
|
<td>
|
|
<span class="badge badge-info">
|
|
{{ $categories[$entry->category] ?? $entry->category }}
|
|
</span>
|
|
</td>
|
|
<td class="text-truncate" style="max-width: 250px;">
|
|
{{ Str::limit($entry->content, 80) }}
|
|
</td>
|
|
<td class="text-truncate" style="max-width: 200px;">
|
|
@if($entry->restrictions)
|
|
<span class="text-warning" title="{{ $entry->restrictions }}">
|
|
<i class="bi bi-exclamation-triangle me-1"></i>{{ Str::limit($entry->restrictions, 50) }}
|
|
</span>
|
|
@else
|
|
<span class="text-muted">—</span>
|
|
@endif
|
|
</td>
|
|
<td>
|
|
@if($entry->active)
|
|
<span class="badge badge-success">Ativo</span>
|
|
@else
|
|
<span class="badge badge-secondary">Inativo</span>
|
|
@endif
|
|
</td>
|
|
<td>
|
|
<a href="{{ route('admin.chatbot.edit', $entry) }}" class="btn btn-sm btn-outline-primary" title="Editar">
|
|
<i class="bi bi-pencil"></i>
|
|
</a>
|
|
<form action="{{ route('admin.chatbot.destroy', $entry) }}" method="POST" class="d-inline" onsubmit="return confirm('Tem certeza que deseja excluir esta informação?');">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="btn btn-sm btn-outline-danger" title="Excluir">
|
|
<i class="bi bi-trash"></i>
|
|
</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="d-flex justify-content-center">
|
|
{{ $knowledgeEntries->withQueryString()->links() }}
|
|
</div>
|
|
@else
|
|
<div class="text-center py-5">
|
|
<i class="bi bi-robot text-muted" style="font-size: 3rem;"></i>
|
|
<h5 class="mt-3 text-muted">Nenhuma informação cadastrada</h5>
|
|
<p class="text-muted">Adicione informações sobre a empresa para o assistente virtual.</p>
|
|
<a href="{{ route('admin.chatbot.create') }}" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-plus-circle me-1"></i>Adicionar Primeira Informação
|
|
</a>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|