feat: melhoria no layout da tela de login - ajustes no container, responsividade e estilização dos campos
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="pt-BR">
|
||||
<html lang="pt-br">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -9,8 +9,6 @@
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css?v=1" rel="stylesheet">
|
||||
<!-- Font Awesome 6 -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css?v=1">
|
||||
<!-- Componentes CSS -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/components.css') }}">
|
||||
|
||||
<style>
|
||||
:root {
|
||||
@@ -24,7 +22,6 @@
|
||||
--info-color: #0dcaf0;
|
||||
--background-gradient: linear-gradient(135deg, var(--primary-color) 40%, white 100%);
|
||||
--navbar-stripe: 4px solid var(--primary-color);
|
||||
--table-header-bg: #d8dde2;
|
||||
}
|
||||
|
||||
body {
|
||||
@@ -95,7 +92,7 @@
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.navbar-nav.mx-auto {
|
||||
.navbar-nav.me-auto {
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
|
||||
@@ -264,46 +261,105 @@
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 0.5rem;
|
||||
color: rgba(255,255,255,0.8);
|
||||
}
|
||||
|
||||
.stats-card .value {
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.5rem;
|
||||
margin: 0.5rem 0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.stats-card .link {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
font-size: 0.9rem;
|
||||
opacity: 0.8;
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.stats-card .link:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.stats-card .icon {
|
||||
position: absolute;
|
||||
right: 1rem;
|
||||
top: 1rem;
|
||||
font-size: 2rem;
|
||||
bottom: 1rem;
|
||||
font-size: 4rem;
|
||||
opacity: 0.2;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Tabelas */
|
||||
/* Tabelas e Listas */
|
||||
.table {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.table th {
|
||||
border-top: none;
|
||||
background-color: #f8f9fa;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.8rem;
|
||||
letter-spacing: 0.5px;
|
||||
padding: 1rem;
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
|
||||
.table td {
|
||||
padding: 1rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Botões */
|
||||
.btn {
|
||||
.table-hover tbody tr:hover {
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
|
||||
.list-group-item {
|
||||
border: none;
|
||||
border-bottom: 1px solid rgba(0,0,0,0.05);
|
||||
padding: 1rem 1.5rem;
|
||||
transition: background-color 0.2s ease;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list-group-item:hover {
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
|
||||
.list-group-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.militante-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.militante-info h6 {
|
||||
margin: 0;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.militante-info small {
|
||||
color: var(--secondary-color);
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
/* Botões e Alertas */
|
||||
.alert {
|
||||
border-radius: 0.5rem;
|
||||
border: none;
|
||||
box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 0.25rem;
|
||||
transition: all 0.2s ease;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
@@ -311,111 +367,90 @@
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: var(--primary-light);
|
||||
border-color: var(--primary-light);
|
||||
.btn-success {
|
||||
background-color: var(--success-color);
|
||||
border-color: var(--success-color);
|
||||
}
|
||||
|
||||
.btn-outline-primary {
|
||||
color: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
.btn-danger {
|
||||
background-color: var(--danger-color);
|
||||
border-color: var(--danger-color);
|
||||
}
|
||||
|
||||
.btn-outline-primary:hover {
|
||||
background-color: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
.btn-secondary {
|
||||
background-color: var(--secondary-color);
|
||||
border-color: var(--secondary-color);
|
||||
}
|
||||
|
||||
/* Alertas */
|
||||
.alert {
|
||||
border: none;
|
||||
border-radius: 0.5rem;
|
||||
padding: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
background-color: #d4edda;
|
||||
color: #155724;
|
||||
}
|
||||
|
||||
.alert-danger {
|
||||
background-color: #f8d7da;
|
||||
color: #721c24;
|
||||
}
|
||||
|
||||
.alert-warning {
|
||||
background-color: #fff3cd;
|
||||
color: #856404;
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
background-color: #d1ecf1;
|
||||
color: #0c5460;
|
||||
}
|
||||
|
||||
/* Formulários */
|
||||
.form-control {
|
||||
border-radius: 0.25rem;
|
||||
border: 1px solid #ced4da;
|
||||
padding: 0.5rem 0.75rem;
|
||||
}
|
||||
|
||||
.form-control:focus {
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
|
||||
}
|
||||
|
||||
.form-label {
|
||||
/* Badges e Labels */
|
||||
.badge {
|
||||
padding: 0.5em 0.75em;
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.5rem;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.text-muted {
|
||||
color: var(--secondary-color) !important;
|
||||
}
|
||||
|
||||
/* Modais */
|
||||
.modal-content {
|
||||
border: none;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
padding: 1rem 1.5rem;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 1.5rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
border-top: 1px solid #e9ecef;
|
||||
padding: 1rem 1.5rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
/* Login page specific */
|
||||
.login-page {
|
||||
background: var(--background-gradient);
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border-radius: 1rem;
|
||||
padding: 2rem;
|
||||
box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.login-logo {
|
||||
height: 60px;
|
||||
width: auto;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.login-title {
|
||||
color: var(--primary-color);
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.login-subtitle {
|
||||
color: var(--secondary-color);
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.welcome-header {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
/* Responsividade */
|
||||
@media (max-width: 768px) {
|
||||
.navbar-brand {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.navbar-brand img {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.stats-card {
|
||||
min-height: 120px;
|
||||
}
|
||||
|
||||
.stats-card .value {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.stats-card .icon {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,90 +458,120 @@
|
||||
padding: 2rem 1rem;
|
||||
min-height: calc(100vh - 70px);
|
||||
}
|
||||
|
||||
.table thead {
|
||||
background-color: var(--table-header-bg) !important;
|
||||
}
|
||||
|
||||
.btn-outline-primary {
|
||||
color: #0d6efd;
|
||||
border-color: #0d6efd;
|
||||
}
|
||||
|
||||
.btn-outline-primary:hover {
|
||||
color: #fff;
|
||||
background-color: #0d6efd;
|
||||
border-color: #0d6efd;
|
||||
}
|
||||
</style>
|
||||
{% block extra_css %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navbar -->
|
||||
{% block navbar %}
|
||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{{ url_for('home') }}">
|
||||
<img src="{{ url_for('static', filename='img/logo.png') }}" alt="Logo">
|
||||
<img src="{{ url_for('static', filename='img/logo002-alpha.png') }}" alt="Logo OCI">
|
||||
Controles OCI
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
{% if session.get('user_id') %}
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav mx-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if request.endpoint == 'home' %}active{% endif %}" href="{{ url_for('home') }}">
|
||||
<i class="fas fa-home"></i> Início
|
||||
<ul class="navbar-nav me-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown">
|
||||
<i class="fas fa-users me-1"></i>Militantes
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ url_for('listar_militantes') }}">
|
||||
<i class="fas fa-list"></i>Listar Militantes
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if request.endpoint == 'listar_militantes' %}active{% endif %}" href="{{ url_for('listar_militantes') }}">
|
||||
<i class="fas fa-users"></i> Militantes
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown">
|
||||
<i class="fas fa-dollar-sign me-1"></i>Financeiro
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ url_for('listar_cotas') }}">
|
||||
<i class="fas fa-money-bill-wave"></i>Cotas
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if request.endpoint == 'listar_materiais' %}active{% endif %}" href="{{ url_for('listar_materiais') }}">
|
||||
<i class="fas fa-box"></i> Materiais
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ url_for('listar_pagamentos') }}">
|
||||
<i class="fas fa-receipt"></i>Pagamentos
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if request.endpoint == 'listar_pagamentos' %}active{% endif %}" href="{{ url_for('listar_pagamentos') }}">
|
||||
<i class="fas fa-money-bill"></i> Pagamentos
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown">
|
||||
<i class="fas fa-box me-1"></i>Materiais
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ url_for('listar_materiais') }}">
|
||||
<i class="fas fa-box"></i>Listar Materiais
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ url_for('listar_vendas_jornal') }}">
|
||||
<i class="fas fa-newspaper"></i>Vendas de Jornais
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ url_for('listar_assinaturas') }}">
|
||||
<i class="fas fa-file-signature"></i>Assinaturas
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown">
|
||||
<i class="fas fa-chart-bar me-1"></i>Relatórios
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ url_for('listar_relatorios_cotas') }}">
|
||||
<i class="fas fa-file-invoice-dollar"></i>Relatórios de Cotas
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ url_for('listar_relatorios_vendas') }}">
|
||||
<i class="fas fa-file-alt"></i>Relatórios de Vendas
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown">
|
||||
<i class="fas fa-user"></i> {{ current_user.username }}
|
||||
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown">
|
||||
<i class="fas fa-user me-1"></i>{{ session.get('username', 'Usuário') }}
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
{% if session.get('is_admin') %}
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ url_for('novo_usuario') }}">
|
||||
<i class="fas fa-user-plus"></i>Novo Usuário
|
||||
</a>
|
||||
</li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ url_for('logout') }}">
|
||||
<i class="fas fa-sign-out-alt"></i> Sair
|
||||
<i class="fas fa-sign-out-alt"></i>Sair
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
||||
<<<<<<< HEAD
|
||||
<!-- Conteúdo -->
|
||||
<div class="container mt-4">
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<div class="alert alert-{{ category }} alert-dismissible fade show">
|
||||
{{ message }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
=======
|
||||
<div class="page-wrapper">
|
||||
<div class="container py-4">
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
@@ -522,39 +587,9 @@
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
>>>>>>> 2499ae1 (style: melhora layout e espaçamento das interfaces - Ajusta margens e padding do container principal - Adiciona page-wrapper com espaçamento consistente - Corrige cores do menu para melhor legibilidade - Implementa responsividade para diferentes tamanhos de tela - Mantém estrutura consistente em todas as páginas)
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<!-- Scripts -->
|
||||
<!-- Bootstrap 5 JS Bundle with Popper -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script>
|
||||
// Auto-dismiss alerts after 5 seconds
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
setTimeout(function() {
|
||||
var alerts = document.querySelectorAll('.alert');
|
||||
alerts.forEach(function(alert) {
|
||||
var bsAlert = new bootstrap.Alert(alert);
|
||||
bsAlert.close();
|
||||
});
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
// Check session timeout
|
||||
function checkSession() {
|
||||
fetch('/check_session')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.status !== 'active') {
|
||||
window.location.href = '/login';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Check session every minute
|
||||
setInterval(checkSession, 60000);
|
||||
</script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Home{% endblock %}
|
||||
{% block title %}Início{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row g-4">
|
||||
@@ -190,7 +190,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalEditarMilitante">
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalEditarMilitante" style="background-color: var(--bs-primary) !important; border-color: var(--bs-primary) !important;">
|
||||
<i class="fas fa-edit me-2"></i>Editar
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">
|
||||
@@ -315,14 +315,6 @@
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<<<<<<< HEAD
|
||||
<p>Tem certeza que deseja excluir este militante?</p>
|
||||
<p class="text-danger">Esta ação não pode ser desfeita.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancelar</button>
|
||||
<button type="button" class="btn btn-danger" id="confirmDelete">
|
||||
=======
|
||||
<p>Tem certeza que deseja excluir este item?</p>
|
||||
<p class="text-danger"><small>Esta ação não pode ser desfeita.</small></p>
|
||||
</div>
|
||||
@@ -331,23 +323,114 @@
|
||||
<i class="fas fa-times me-2"></i>Cancelar
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger" id="btnConfirmarExclusao">
|
||||
>>>>>>> 324660d (refactor: melhorias na interface e funcionalidades - Atualização do layout do dashboard com Bootstrap 5 - Remoção do template editar_pagamento.html (integrado ao modal) - Melhorias no template home.html com cards estatísticos - Ajustes nos estilos e responsividade - Correções nas rotas e conexões do banco de dados - Implementação do modal de edição de pagamentos - Adição de efeitos hover e melhorias visuais)
|
||||
<i class="fas fa-trash me-2"></i>Excluir
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<style>
|
||||
.welcome-header {
|
||||
background: linear-gradient(to right, var(--background-color), rgba(232, 0, 12, 0.05));
|
||||
border-radius: 12px;
|
||||
padding: 1.5rem;
|
||||
margin-bottom: 2rem;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.welcome-header h2 {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.welcome-header h4 {
|
||||
font-size: 1.2rem;
|
||||
color: var(--secondary-color);
|
||||
opacity: 0.8;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.valor-container {
|
||||
flex: 1;
|
||||
min-width: 0; /* Permite que o texto quebre corretamente */
|
||||
}
|
||||
|
||||
.valor-cota {
|
||||
font-size: calc(1.2rem + 0.8vw);
|
||||
line-height: 1.2;
|
||||
word-break: break-word;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.icon-container {
|
||||
font-size: 1.5rem;
|
||||
opacity: 0.8;
|
||||
margin-left: 8px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* Estilo para o backdrop com blur em todos os modais */
|
||||
.modal-backdrop.show {
|
||||
backdrop-filter: blur(8px);
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
/* Estilo para o botão de fechar dos modais */
|
||||
.btn-close {
|
||||
background-color: transparent;
|
||||
padding: 0.5rem;
|
||||
opacity: 0.8;
|
||||
transition: opacity 0.2s;
|
||||
filter: invert(1) grayscale(100%) brightness(200%);
|
||||
}
|
||||
|
||||
.btn-close:hover {
|
||||
opacity: 1;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* Estilo para modais */
|
||||
.modal-content {
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
background: linear-gradient(to right, var(--bs-gray-dark), var(--bs-gray));
|
||||
color: white;
|
||||
border-radius: 12px 12px 0 0;
|
||||
border-bottom: none;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
border-top: 1px solid #eee;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
/* Garantir que o botão de editar fique azul */
|
||||
.btn-primary {
|
||||
background-color: var(--bs-primary) !important;
|
||||
border-color: var(--bs-primary) !important;
|
||||
}
|
||||
|
||||
.btn-primary:hover,
|
||||
.btn-primary:focus,
|
||||
.btn-primary:active {
|
||||
background-color: var(--bs-primary-dark) !important;
|
||||
border-color: var(--bs-primary-dark) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% block extra_js %}
|
||||
<script>
|
||||
<<<<<<< HEAD
|
||||
// Função para formatar CPF
|
||||
function formatCPF(cpf) {
|
||||
return cpf.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/, "$1.$2.$3-$4");
|
||||
}
|
||||
=======
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Modal de Detalhes
|
||||
const militanteModal = document.getElementById('militanteModal');
|
||||
@@ -426,49 +509,23 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
btnEditar.replaceWith(btnEditar.cloneNode(true));
|
||||
btnExcluir.replaceWith(btnExcluir.cloneNode(true));
|
||||
});
|
||||
>>>>>>> a430b82 (fix: corrige fluxo de modais na home - Ajusta modal de militantes para abrir detalhes primeiro - Corrige preenchimento de dados nos modais - Mantém fluxo: detalhes -> editar/excluir)
|
||||
|
||||
// Função para formatar telefone
|
||||
function formatPhone(phone) {
|
||||
return phone.replace(/(\d{2})(\d{5})(\d{4})/, "($1) $2-$3");
|
||||
}
|
||||
// Envio do formulário de edição via AJAX
|
||||
const formEditarMilitante = document.getElementById('formEditarMilitante');
|
||||
formEditarMilitante.addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
// Função para carregar detalhes do militante
|
||||
function loadMilitanteDetails(id) {
|
||||
fetch(`/api/militante/${id}`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
document.getElementById('militanteNome').textContent = data.nome;
|
||||
document.getElementById('militanteCPF').textContent = formatCPF(data.cpf);
|
||||
document.getElementById('militanteEmail').textContent = data.email;
|
||||
document.getElementById('militanteTelefone').textContent = formatPhone(data.telefone);
|
||||
document.getElementById('militanteEndereco').textContent = data.endereco;
|
||||
document.getElementById('militanteFiliado').textContent = data.filiado ? 'Filiado' : 'Não Filiado';
|
||||
const formData = new FormData(this);
|
||||
|
||||
// Preencher formulário de edição
|
||||
document.getElementById('editNome').value = data.nome;
|
||||
document.getElementById('editCpf').value = data.cpf;
|
||||
document.getElementById('editEmail').value = data.email;
|
||||
document.getElementById('editTelefone').value = data.telefone;
|
||||
document.getElementById('editEndereco').value = data.endereco;
|
||||
document.getElementById('editFiliado').checked = data.filiado;
|
||||
});
|
||||
}
|
||||
|
||||
// Função para excluir militante
|
||||
function deleteMilitante(id) {
|
||||
fetch(`/api/militante/${id}`, {
|
||||
method: 'DELETE',
|
||||
fetch(this.action, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
'X-Requested-With': 'XMLHttpRequest'
|
||||
}
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
<<<<<<< HEAD
|
||||
if (data.success) {
|
||||
window.location.reload();
|
||||
=======
|
||||
if (data.status === 'success') {
|
||||
// Fechar os modais
|
||||
bootstrap.Modal.getInstance(document.getElementById('modalEditarMilitante')).hide();
|
||||
@@ -476,68 +533,29 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// Atualizar a página
|
||||
location.reload();
|
||||
>>>>>>> a430b82 (fix: corrige fluxo de modais na home - Ajusta modal de militantes para abrir detalhes primeiro - Corrige preenchimento de dados nos modais - Mantém fluxo: detalhes -> editar/excluir)
|
||||
} else {
|
||||
alert('Erro ao excluir militante: ' + data.message);
|
||||
// Mostrar erro
|
||||
const alertDiv = document.createElement('div');
|
||||
alertDiv.className = 'alert alert-danger alert-dismissible fade show';
|
||||
alertDiv.innerHTML = `
|
||||
${data.message}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
`;
|
||||
document.querySelector('.modal-body').insertBefore(alertDiv, formEditarMilitante);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
// Event listeners
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Máscara para CPF
|
||||
const cpfInput = document.getElementById('editCpf');
|
||||
cpfInput.addEventListener('input', function(e) {
|
||||
let value = e.target.value.replace(/\D/g, '');
|
||||
if (value.length > 11) value = value.slice(0, 11);
|
||||
e.target.value = formatCPF(value);
|
||||
});
|
||||
|
||||
// Máscara para telefone
|
||||
const phoneInput = document.getElementById('editTelefone');
|
||||
phoneInput.addEventListener('input', function(e) {
|
||||
let value = e.target.value.replace(/\D/g, '');
|
||||
if (value.length > 11) value = value.slice(0, 11);
|
||||
e.target.value = formatPhone(value);
|
||||
});
|
||||
|
||||
// Submit do formulário de edição
|
||||
const formEditar = document.getElementById('formEditarMilitante');
|
||||
formEditar.addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
const formData = new FormData(formEditar);
|
||||
const data = Object.fromEntries(formData.entries());
|
||||
|
||||
fetch('/api/militante/' + data.id, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(data)
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert('Erro ao editar militante: ' + data.message);
|
||||
}
|
||||
.catch(error => {
|
||||
console.error('Erro:', error);
|
||||
const alertDiv = document.createElement('div');
|
||||
alertDiv.className = 'alert alert-danger alert-dismissible fade show';
|
||||
alertDiv.innerHTML = `
|
||||
Erro ao atualizar militante. Tente novamente.
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
`;
|
||||
document.querySelector('.modal-body').insertBefore(alertDiv, formEditarMilitante);
|
||||
});
|
||||
});
|
||||
|
||||
// Confirmação de exclusão
|
||||
const confirmDelete = document.getElementById('confirmDelete');
|
||||
confirmDelete.addEventListener('click', function() {
|
||||
const id = this.dataset.militanteId;
|
||||
deleteMilitante(id);
|
||||
});
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
=======
|
||||
>>>>>>> a430b82 (fix: corrige fluxo de modais na home - Ajusta modal de militantes para abrir detalhes primeiro - Corrige preenchimento de dados nos modais - Mantém fluxo: detalhes -> editar/excluir)
|
||||
// Função para carregar dados do pagamento no modal
|
||||
function carregarDadosPagamento(id) {
|
||||
fetch(`/api/pagamentos/${id}`)
|
||||
@@ -616,14 +634,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
});
|
||||
});
|
||||
});
|
||||
>>>>>>> 324660d (refactor: melhorias na interface e funcionalidades - Atualização do layout do dashboard com Bootstrap 5 - Remoção do template editar_pagamento.html (integrado ao modal) - Melhorias no template home.html com cards estatísticos - Ajustes nos estilos e responsividade - Correções nas rotas e conexões do banco de dados - Implementação do modal de edição de pagamentos - Adição de efeitos hover e melhorias visuais)
|
||||
</script>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ url_for('static', filename='js/militantes.js') }}"></script>
|
||||
{% endblock %}
|
||||
>>>>>>> a430b82 (fix: corrige fluxo de modais na home - Ajusta modal de militantes para abrir detalhes primeiro - Corrige preenchimento de dados nos modais - Mantém fluxo: detalhes -> editar/excluir)
|
||||
{% endblock %}
|
||||
@@ -2,13 +2,14 @@
|
||||
|
||||
{% block title %}Login{% endblock %}
|
||||
|
||||
{% block navbar %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="login-container">
|
||||
<div class="login-content">
|
||||
<div class="text-center mb-4">
|
||||
<img src="{{ url_for('static', filename='img/logo001-alpha.png') }}" alt="Logo OCI" class="login-logo mb-3">
|
||||
<div class="login-header">
|
||||
<img src="{{ url_for('static', filename='img/logo001-alpha.png') }}" alt="Logo OCI" class="login-logo">
|
||||
<h4 class="login-title">Controles OCI</h4>
|
||||
<p class="login-subtitle">Prossiga com sua conta</p>
|
||||
</div>
|
||||
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
@@ -24,16 +25,16 @@
|
||||
|
||||
<form method="POST" action="{{ url_for('login') }}" class="needs-validation" novalidate>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="email" class="form-control" id="email" name="email" placeholder="Email" required autofocus>
|
||||
<label for="email">Email</label>
|
||||
<input type="text" class="form-control" id="email" name="email" placeholder="Email ou Usuário" required>
|
||||
<label for="email">Email ou Usuário</label>
|
||||
<div class="invalid-feedback">
|
||||
Por favor, informe seu email.
|
||||
Por favor, informe seu email ou nome de usuário.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mb-3">
|
||||
<input type="password" class="form-control" id="senha" name="senha" placeholder="Senha" required>
|
||||
<label for="senha">Senha</label>
|
||||
<div class="form-floating mb-3 position-relative">
|
||||
<input type="password" class="form-control" id="password" name="password" placeholder="Senha" required>
|
||||
<label for="password">Senha</label>
|
||||
<div class="invalid-feedback">
|
||||
Por favor, informe sua senha.
|
||||
</div>
|
||||
@@ -46,12 +47,12 @@
|
||||
<input type="text" class="form-control" id="otp" name="otp" placeholder="Código OTP" required>
|
||||
<label for="otp">Código OTP</label>
|
||||
<div class="invalid-feedback">
|
||||
Por favor, informe o código OTP do seu autenticador.
|
||||
Por favor, informe o código OTP.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-grid">
|
||||
<button type="submit" class="btn btn-danger btn-lg">
|
||||
<button type="submit" class="btn btn-lg login-button">
|
||||
<i class="fas fa-sign-in-alt me-2"></i>Entrar
|
||||
</button>
|
||||
</div>
|
||||
@@ -59,7 +60,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block extra_js %}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Form validation
|
||||
@@ -74,7 +74,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// Toggle password visibility
|
||||
const togglePassword = document.getElementById('togglePassword');
|
||||
const password = document.getElementById('senha');
|
||||
const password = document.getElementById('password');
|
||||
|
||||
togglePassword.addEventListener('click', function() {
|
||||
const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
|
||||
@@ -96,84 +96,114 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: linear-gradient(135deg, var(--primary-color) 40%, white 100%);
|
||||
background: var(--primary-color);
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
max-width: 800px;
|
||||
margin: auto;
|
||||
background: #ffffff;
|
||||
border-radius: 1rem;
|
||||
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.login-content {
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
backdrop-filter: blur(10px);
|
||||
padding: 2rem;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.login-logo {
|
||||
height: 60px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.login-title {
|
||||
color: var(--secondary-color);
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.login-subtitle {
|
||||
color: var(--secondary-light);
|
||||
font-size: 0.9rem;
|
||||
.login-header {
|
||||
text-align: center;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.login-logo {
|
||||
height: 50px;
|
||||
width: auto;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.login-title {
|
||||
color: #343a40;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
form {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.form-floating > .form-control {
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
border-radius: 12px;
|
||||
height: calc(3.5rem + 2px);
|
||||
line-height: 1.25;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.form-floating > .form-control:hover {
|
||||
border-color: rgba(220, 53, 69, 0.3);
|
||||
}
|
||||
|
||||
.form-floating > .form-control:focus {
|
||||
border-color: rgba(220, 53, 69, 0.5);
|
||||
box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.15);
|
||||
}
|
||||
|
||||
.form-floating > label {
|
||||
padding: 1rem;
|
||||
padding: 1rem 0.75rem;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background: var(--primary-color);
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
.login-button {
|
||||
background-color: #0d6efd;
|
||||
border-color: #0d6efd;
|
||||
color: white;
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.75rem 1.5rem;
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
transition: all 0.3s ease;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
background: var(--primary-light);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(232, 0, 12, 0.25);
|
||||
.login-button:hover,
|
||||
.login-button:focus,
|
||||
.login-button:active {
|
||||
background-color: #0b5ed7;
|
||||
border-color: #0b5ed7;
|
||||
color: white;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
@media (min-width: 768px) {
|
||||
.login-container {
|
||||
max-width: 100%;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.login-content {
|
||||
padding: 3rem;
|
||||
}
|
||||
|
||||
.login-logo {
|
||||
height: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.login-container {
|
||||
margin: 1rem;
|
||||
}
|
||||
|
||||
.login-content {
|
||||
padding: 1.5rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.login-logo {
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user