feat(cms): implement complete SysSiteCMS content management system
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
This commit is contained in:
+131
@@ -0,0 +1,131 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', 'Minhas Preferências')
|
||||
|
||||
@section('content')
|
||||
<div class="d-sm-flex align-items-center justify-content-between mb-4">
|
||||
<h1 class="h3 mb-0 text-gray-800">Preferências</h1>
|
||||
</div>
|
||||
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success border-0 shadow-sm mb-4">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-8">
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Configurações da Conta</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ route('profile.preferences.update') }}" method="POST">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
<div class="form-group mb-4">
|
||||
<label class="font-weight-bold d-block mb-3">Notificações</label>
|
||||
<div class="custom-control custom-switch mb-2">
|
||||
<input type="checkbox" name="notifications_email" class="custom-control-input" id="notif1" {{ ($preferences['notifications_email'] ?? true) ? 'checked' : '' }}>
|
||||
<label class="custom-control-label" for="notif1">Receber alertas de novas mensagens de contato por e-mail</label>
|
||||
</div>
|
||||
<div class="custom-control custom-switch mb-2">
|
||||
<input type="checkbox" name="notifications_system" class="custom-control-input" id="notif2" {{ ($preferences['notifications_system'] ?? true) ? 'checked' : '' }}>
|
||||
<label class="custom-control-label" for="notif2">Receber notificações internas do sistema</label>
|
||||
</div>
|
||||
<div class="custom-control custom-switch mb-2">
|
||||
<input type="checkbox" name="notifications_new_users" class="custom-control-input" id="notif3" {{ ($preferences['notifications_new_users'] ?? true) ? 'checked' : '' }}>
|
||||
<label class="custom-control-label" for="notif3">Receber notificações de novos cadastros de usuários</label>
|
||||
</div>
|
||||
<div class="custom-control custom-switch mb-2">
|
||||
<input type="checkbox" name="notifications_page_actions" class="custom-control-input" id="notif4" {{ ($preferences['notifications_page_actions'] ?? true) ? 'checked' : '' }}>
|
||||
<label class="custom-control-label" for="notif4">Receber notificações de criação ou edição de páginas</label>
|
||||
</div>
|
||||
<div class="custom-control custom-switch mb-2">
|
||||
<input type="checkbox" name="notifications_gallery_actions" class="custom-control-input" id="notif5" {{ ($preferences['notifications_gallery_actions'] ?? true) ? 'checked' : '' }}>
|
||||
<label class="custom-control-label" for="notif5">Receber notificações de criação ou edição de galerias de fotos</label>
|
||||
</div>
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" name="notifications_product_actions" class="custom-control-input" id="notif6" {{ ($preferences['notifications_product_actions'] ?? true) ? 'checked' : '' }}>
|
||||
<label class="custom-control-label" for="notif6">Receber notificações de criação ou edição de produtos</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(Auth::user()->user_type === 'Admin')
|
||||
<hr>
|
||||
<div class="form-group mb-4">
|
||||
<label class="font-weight-bold d-block mb-3 text-danger"><i class="bi bi-tools me-2"></i> Administração Global</label>
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" name="site_maintenance" class="custom-control-input" id="site_maintenance" {{ \App\Models\Setting::get('site_maintenance') == 'on' ? 'checked' : '' }}>
|
||||
<label class="custom-control-label font-weight-bold text-danger" for="site_maintenance">Site em Manutenção</label>
|
||||
<small class="d-block text-muted">Quando ativado, apenas administradores poderão acessar as páginas públicas do site.</small>
|
||||
</div>
|
||||
<div class="custom-control custom-switch mt-3">
|
||||
<input type="checkbox" name="public_registration" class="custom-control-input" id="public_registration" {{ \App\Models\Setting::get('public_registration') == 'on' ? 'checked' : '' }}>
|
||||
<label class="custom-control-label font-weight-bold" for="public_registration">Registro Público</label>
|
||||
<small class="d-block text-muted">Permitir que novos usuários se cadastrem livremente na página de login.</small>
|
||||
</div>
|
||||
<div class="custom-control custom-switch mt-3">
|
||||
<input type="checkbox" name="whatsapp_floating_button" class="custom-control-input" id="whatsapp_floating_button" {{ \App\Models\Setting::get('whatsapp_floating_button') == 'on' ? 'checked' : '' }}>
|
||||
<label class="custom-control-label font-weight-bold" for="whatsapp_floating_button">Botão Flutuante do WhatsApp</label>
|
||||
<small class="d-block text-muted">Exibir ícone do WhatsApp em todas as páginas públicas do site para contato rápido.</small>
|
||||
</div>
|
||||
|
||||
<!-- Configurações de Horário do WhatsApp -->
|
||||
<div id="whatsapp_hours_container" class="mt-3 p-3 border rounded bg-light {{ \App\Models\Setting::get('whatsapp_floating_button') == 'on' ? '' : 'd-none' }}">
|
||||
<label class="font-weight-bold mb-2 small text-uppercase">Horário de Exibição do Botão</label>
|
||||
<div class="row g-2">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-2">
|
||||
<label class="small">Início do Expediente</label>
|
||||
<input type="time" name="whatsapp_start_time" class="form-control form-control-sm" value="{{ \App\Models\Setting::get('whatsapp_start_time', '08:00') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-2">
|
||||
<label class="small">Fim do Expediente</label>
|
||||
<input type="time" name="whatsapp_end_time" class="form-control form-control-sm" value="{{ \App\Models\Setting::get('whatsapp_end_time', '18:00') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-0">
|
||||
<label class="small">Início Almoço (Opcional)</label>
|
||||
<input type="time" name="whatsapp_lunch_start" class="form-control form-control-sm" value="{{ \App\Models\Setting::get('whatsapp_lunch_start') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-0">
|
||||
<label class="small">Fim Almoço (Opcional)</label>
|
||||
<input type="time" name="whatsapp_lunch_end" class="form-control form-control-sm" value="{{ \App\Models\Setting::get('whatsapp_lunch_end') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<small class="text-muted d-block mt-2">O botão só aparecerá no site durante os horários definidos acima.</small>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<button type="submit" class="btn btn-primary btn-block py-2 fw-bold shadow-sm">
|
||||
<i class="bi bi-floppy me-1"></i> Salvar Preferências
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@push('js')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Toggle exibição das configurações de horário do WhatsApp
|
||||
$('#whatsapp_floating_button').on('change', function() {
|
||||
if($(this).is(':checked')) {
|
||||
$('#whatsapp_hours_container').removeClass('d-none');
|
||||
} else {
|
||||
$('#whatsapp_hours_container').addClass('d-none');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endsection
|
||||
Reference in New Issue
Block a user