diff --git a/functions/database.py b/functions/database.py
index 1719042..20e9bcb 100644
--- a/functions/database.py
+++ b/functions/database.py
@@ -1,4 +1,4 @@
-from sqlalchemy import create_engine, Column, Integer, String, Boolean, Numeric, Date, ForeignKey, DateTime
+from sqlalchemy import create_engine, Column, Integer, String, Boolean, Numeric, Date, ForeignKey, DateTime, Text
from sqlalchemy.orm import relationship, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from werkzeug.security import generate_password_hash, check_password_hash
@@ -57,42 +57,116 @@ class Celula(Base):
nome = Column(String(100), nullable=False)
setor_id = Column(Integer, ForeignKey('setores.id'))
cr_id = Column(Integer, ForeignKey('comites_regionais.id'))
+ secretario = Column(Integer, ForeignKey('militantes.id'))
+ responsavel_financas = Column(Integer, ForeignKey('militantes.id'))
+ quadro_orientador = Column(String(255))
+ # Relacionamentos
setor = relationship("Setor", back_populates="celulas")
cr = relationship("ComiteRegional", back_populates="celulas")
- militantes = relationship("Militante", back_populates="celula")
+ militantes = relationship("Militante", back_populates="celula", foreign_keys="[Militante.celula_id]")
+ secretario_rel = relationship("Militante", foreign_keys=[secretario])
+ responsavel_financas_rel = relationship("Militante", foreign_keys=[responsavel_financas])
+ pagamentos = relationship("PagamentoCelula", back_populates="celula")
class ComiteRegional(Base):
__tablename__ = 'comites_regionais'
id = Column(Integer, primary_key=True, autoincrement=True)
nome = Column(String(100), nullable=False)
+ responsavel_financas = Column(Integer, ForeignKey('militantes.id'))
+ responsavel_formacao = Column(Integer, ForeignKey('militantes.id'))
+ secretario_organizacao = Column(Integer, ForeignKey('militantes.id'))
+ correspondente_jornal = Column(Integer, ForeignKey('militantes.id'))
+ # Relacionamentos
+ responsavel_financas_rel = relationship("Militante", foreign_keys=[responsavel_financas])
+ responsavel_formacao_rel = relationship("Militante", foreign_keys=[responsavel_formacao])
+ secretario_organizacao_rel = relationship("Militante", foreign_keys=[secretario_organizacao])
+ correspondente_jornal_rel = relationship("Militante", foreign_keys=[correspondente_jornal])
setores = relationship("Setor", back_populates="cr")
celulas = relationship("Celula", back_populates="cr")
+class EmailMilitante(Base):
+ __tablename__ = 'emails_militantes'
+
+ id = Column(Integer, primary_key=True, autoincrement=True)
+ militante_id = Column(Integer, ForeignKey('militantes.id'))
+ endereco_email = Column(String(100))
+ militante = relationship("Militante", back_populates="emails")
+
+class Endereco(Base):
+ __tablename__ = 'enderecos'
+
+ id = Column(Integer, primary_key=True, autoincrement=True)
+ estado = Column(String(2))
+ cidade = Column(String(50))
+ bairro = Column(String(50))
+ rua = Column(String(100))
+ numero = Column(String(10))
+ complemento = Column(String(50))
+ cep = Column(String(9))
+ militantes = relationship("Militante", back_populates="endereco")
+
+class RedeSocial(Base):
+ __tablename__ = 'redes_sociais'
+
+ id = Column(Integer, primary_key=True, autoincrement=True)
+ militante_id = Column(Integer, ForeignKey('militantes.id'))
+ tipo = Column(String(20)) # Instagram, TikTok, Discord, etc.
+ identificador = Column(String(100))
+ militante = relationship("Militante", back_populates="redes_sociais")
+
class Militante(Base):
__tablename__ = 'militantes'
id = Column(Integer, primary_key=True, autoincrement=True)
nome = Column(String(100), nullable=False)
cpf = Column(String(14), unique=True)
- email = Column(String(100), unique=True)
- telefone = Column(String(15))
- endereco = Column(String(255))
- filiado = Column(Boolean, default=False)
+ # Novos campos básicos
+ titulo_eleitoral = Column(String(20))
+ data_nascimento = Column(Date)
+ data_entrada_oci = Column(Date)
+ data_efetivacao_oci = Column(Date)
+ # Campos de contato
+ telefone1 = Column(String(15))
+ telefone2 = Column(String(15))
+ # Relacionamento para múltiplos emails
+ emails = relationship("EmailMilitante", back_populates="militante")
+ # Endereço
+ endereco_id = Column(Integer, ForeignKey('enderecos.id'))
+ endereco = relationship("Endereco", back_populates="militantes")
+ # Redes sociais
+ redes_sociais = relationship("RedeSocial", back_populates="militante")
+ # Campos profissionais
+ profissao = Column(String(100))
+ regime_trabalho = Column(String(50)) # CLT, Estatutário, etc.
+ empresa = Column(String(100))
+ contratante = Column(String(100)) # Para terceirizados
+ # Campos acadêmicos
+ instituicao_ensino = Column(String(100))
+ tipo_instituicao = Column(String(20)) # Federal, Estadual, etc.
+ # Campos sindicais
+ sindicato = Column(String(100))
+ cargo_sindical = Column(String(50))
+ dirigente_sindical = Column(Boolean)
+ central_sindical = Column(String(100))
+ # Responsável pelo cadastro
+ registrado_por = Column(Integer, ForeignKey('militantes.id'))
+ # Campos existentes
celula_id = Column(Integer, ForeignKey('celulas.id'))
- responsabilidades = Column(Integer, default=0) # Armazenará as responsabilidades como bits
+ responsabilidades = Column(Integer, default=0)
otp_secret = Column(String(32))
temp_token = Column(String(64))
temp_token_expiry = Column(DateTime)
+ # Relacionamentos existentes
cotas_mensais = relationship("CotaMensal", back_populates="militante")
pagamentos = relationship("Pagamento", back_populates="militante")
materiais_vendidos = relationship("MaterialVendido", back_populates="militante")
vendas_jornais = relationship("VendaJornalAvulso", back_populates="militante")
assinaturas = relationship("AssinaturaAnual", back_populates="militante")
- celula = relationship("Celula", back_populates="militantes")
+ celula = relationship("Celula", back_populates="militantes", foreign_keys=[celula_id])
# Constantes para responsabilidades
SECRETARIO = 1
@@ -186,19 +260,22 @@ class TipoPagamento(Base):
id = Column(Integer, primary_key=True, autoincrement=True)
descricao = Column(String(100), nullable=False)
- pagamentos = relationship("Pagamento", back_populates="tipo_pagamento")
-
class Pagamento(Base):
__tablename__ = 'pagamentos'
id = Column(Integer, primary_key=True, autoincrement=True)
militante_id = Column(Integer, ForeignKey('militantes.id'))
- tipo_pagamento_id = Column(Integer, ForeignKey('tipos_pagamento.id'))
+ tipo_pagamento = Column(String(50)) # Cota, Jornal, Assinatura, etc.
+ mes_referencia = Column(Date)
+ numero_jornal = Column(String(20))
+ numero_inicial_assinatura = Column(String(20))
+ numero_final_assinatura = Column(String(20))
+ campanha_financeira = Column(String(50))
valor = Column(Numeric(10, 2), nullable=False)
data_pagamento = Column(Date, nullable=False)
militante = relationship("Militante", back_populates="pagamentos")
- tipo_pagamento = relationship("TipoPagamento", back_populates="pagamentos")
+ transacoes_pix = relationship("TransacaoPIX", back_populates="pagamento")
class TipoMaterial(Base):
__tablename__ = 'tipos_materiais'
@@ -250,13 +327,20 @@ class AssinaturaAnual(Base):
class Setor(Base):
__tablename__ = 'setores'
- id = Column(Integer, primary_key=True, autoincrement=True)
+ id = Column(Integer, primary_key=True)
nome = Column(String(100), nullable=False)
-
- relatorios_cotas = relationship("RelatorioCotasMensais", back_populates="setor")
- relatorios_vendas = relationship("RelatorioVendasMateriais", back_populates="setor")
+ cr_id = Column(Integer, ForeignKey('comites_regionais.id'))
+ responsavel = Column(Integer, ForeignKey('militantes.id'))
+ responsavel_financas = Column(Integer, ForeignKey('militantes.id'))
+
+ # Relacionamentos
+ cr = relationship("ComiteRegional", back_populates="setores")
+ responsavel_rel = relationship("Militante", foreign_keys=[responsavel])
+ responsavel_financas_rel = relationship("Militante", foreign_keys=[responsavel_financas])
usuarios = relationship("Usuario", back_populates="setor")
celulas = relationship("Celula", back_populates="setor")
+ relatorios_cotas = relationship("RelatorioCotasMensais", back_populates="setor")
+ relatorios_vendas = relationship("RelatorioVendasMateriais", back_populates="setor")
class ComiteCentral(Base):
__tablename__ = 'comites_centrais'
@@ -306,9 +390,13 @@ class Usuario(Base):
ultimo_login = Column(DateTime)
ultimo_logout = Column(DateTime)
motivo_logout = Column(String(100))
+ cr_id = Column(Integer, ForeignKey('comites_regionais.id'))
+ celula_id = Column(Integer, ForeignKey('celulas.id'))
role = relationship("Role", back_populates="usuarios")
setor = relationship("Setor", back_populates="usuarios")
+ celula = relationship("Celula")
+ cr = relationship("ComiteRegional")
def __init__(self, username, password, is_admin=False):
self.username = username
@@ -373,6 +461,78 @@ class RolePermissao(Base):
role = relationship("Role", back_populates="permissoes")
permissao = relationship("Permissao", back_populates="roles")
+class PagamentoCelula(Base):
+ __tablename__ = 'pagamentos_celula'
+
+ id = Column(Integer, primary_key=True, autoincrement=True)
+ celula_id = Column(Integer, ForeignKey('celulas.id'))
+ data = Column(Date)
+ valor = Column(Numeric(10, 2))
+ metodo_pagamento = Column(String(20)) # PIX, Dinheiro, etc.
+ codigo_pix = Column(String(100))
+ descricao = Column(String(255))
+ registrado_por = Column(Integer, ForeignKey('militantes.id'))
+
+ celula = relationship("Celula", back_populates="pagamentos")
+ registrado_por_rel = relationship("Militante", foreign_keys=[registrado_por])
+
+class Atividade(Base):
+ __tablename__ = 'atividades'
+
+ id = Column(Integer, primary_key=True, autoincrement=True)
+ descricao = Column(String(255))
+ data = Column(Date)
+ responsavel1 = Column(Integer, ForeignKey('militantes.id'))
+ responsavel2 = Column(Integer, ForeignKey('militantes.id'))
+
+ responsavel1_rel = relationship("Militante", foreign_keys=[responsavel1])
+ responsavel2_rel = relationship("Militante", foreign_keys=[responsavel2])
+ materiais = relationship("MaterialAtividade", back_populates="atividade")
+
+class MaterialAtividade(Base):
+ __tablename__ = 'materiais_atividades'
+
+ id = Column(Integer, primary_key=True, autoincrement=True)
+ atividade_id = Column(Integer, ForeignKey('atividades.id'))
+ tipo = Column(String(20)) # Jornal, Revista, etc.
+ quantidade = Column(Integer)
+ detalhes = Column(String(255))
+
+ atividade = relationship("Atividade", back_populates="materiais")
+
+class Relatorio(Base):
+ __tablename__ = 'relatorios'
+
+ id = Column(Integer, primary_key=True, autoincrement=True)
+ tipo = Column(String(50)) # Semanal, Quinzenal, Mensal
+ periodo_inicio = Column(Date)
+ periodo_fim = Column(Date)
+ gerado_por = Column(Integer, ForeignKey('militantes.id'))
+ conteudo = Column(Text)
+ # Relacionamento hierárquico
+ celula_id = Column(Integer, ForeignKey('celulas.id'))
+ setor_id = Column(Integer, ForeignKey('setores.id'))
+ cr_id = Column(Integer, ForeignKey('comites_regionais.id'))
+
+ gerado_por_rel = relationship("Militante", foreign_keys=[gerado_por])
+ celula = relationship("Celula", foreign_keys=[celula_id])
+ setor = relationship("Setor", foreign_keys=[setor_id])
+ cr = relationship("ComiteRegional", foreign_keys=[cr_id])
+
+class TransacaoPIX(Base):
+ __tablename__ = 'transacoes_pix'
+
+ id = Column(Integer, primary_key=True, autoincrement=True)
+ chave_pix = Column(String(100))
+ valor = Column(Numeric(10, 2))
+ data_geracao = Column(DateTime)
+ data_pagamento = Column(DateTime)
+ status = Column(String(20)) # Pendente, Pago, Expirado
+ qr_code = Column(Text)
+ pagamento_id = Column(Integer, ForeignKey('pagamentos.id'))
+
+ pagamento = relationship("Pagamento", back_populates="transacoes_pix")
+
# Remover o banco de dados existente (se existir)
if os.path.exists(db_path):
os.remove(db_path)
diff --git a/templates/base.html b/templates/base.html
index 35dc81a..9cbafde 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,26 +1,75 @@
-
+
- {% block title %}{% endblock %} - Sistema de Gestão
- {{ bootstrap.load_css() }}
+ {% block title %}{% endblock %} - Sistema de Controle OCI
+
+
+
- {% if 'user_id' in session %}
-
+
- {% endif %}
-
+
{% block content %}{% endblock %}
-
- {{ bootstrap.load_js() }}
-
-
-
- {% if 'user_id' in session %}
-
- {% endif %}
+
+
\ No newline at end of file
diff --git a/templates/editar_celula.html b/templates/editar_celula.html
new file mode 100644
index 0000000..c2652d5
--- /dev/null
+++ b/templates/editar_celula.html
@@ -0,0 +1,94 @@
+{% extends 'base.html' %}
+
+{% block title %}Editar Célula{% endblock %}
+
+{% block content %}
+
+
+
+
Editar Célula
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/editar_comite.html b/templates/editar_comite.html
new file mode 100644
index 0000000..6e71785
--- /dev/null
+++ b/templates/editar_comite.html
@@ -0,0 +1,94 @@
+{% extends 'base.html' %}
+
+{% block title %}Editar Comitê Regional{% endblock %}
+
+{% block content %}
+
+
+
+
Editar Comitê Regional
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/editar_comite_central.html b/templates/editar_comite_central.html
new file mode 100644
index 0000000..55e5674
--- /dev/null
+++ b/templates/editar_comite_central.html
@@ -0,0 +1,81 @@
+{% extends 'base.html' %}
+
+{% block title %}Editar Comitê Central{% endblock %}
+
+{% block content %}
+
+
+
+
Editar Comitê Central
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/editar_material.html b/templates/editar_material.html
new file mode 100644
index 0000000..d5aac8c
--- /dev/null
+++ b/templates/editar_material.html
@@ -0,0 +1,94 @@
+{% extends 'base.html' %}
+
+{% block title %}Editar Material{% endblock %}
+
+{% block content %}
+
+
+
+
Editar Material
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/editar_militante.html b/templates/editar_militante.html
index d12776a..34b9fd8 100644
--- a/templates/editar_militante.html
+++ b/templates/editar_militante.html
@@ -3,32 +3,193 @@
{% block title %}Editar Militante{% endblock %}
{% block content %}
- Editar Militante
+
+
+
+
Editar Militante
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
Nome
+
+
+ Por favor, insira o nome do militante.
+
+
+
+
+
CPF
+
+
+ Por favor, insira o CPF do militante.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Dirigente Sindical
+
+
+
+
+
+ Central Sindical
+
+
+
+
+
+
+
Setor
+
+ Selecione um setor
+ {% for setor in setores %}
+ {{ setor.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione um setor.
+
+
+
+
+
Célula
+
+ Selecione uma célula
+ {% for celula in celulas %}
+ {{ celula.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione uma célula.
+
+
+
+
+
+
+
+
+
+
+
{% endblock %}
\ No newline at end of file
diff --git a/templates/editar_relatorio_cotas.html b/templates/editar_relatorio_cotas.html
new file mode 100644
index 0000000..d6c0135
--- /dev/null
+++ b/templates/editar_relatorio_cotas.html
@@ -0,0 +1,91 @@
+{% extends 'base.html' %}
+
+{% block title %}Editar Relatório de Cotas{% endblock %}
+
+{% block content %}
+
+
+
+
Editar Relatório de Cotas
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
Setor
+
+ Selecione um setor
+ {% for setor in setores %}
+ {{ setor.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o setor.
+
+
+
+
+
Comitê Central
+
+ Selecione um comitê
+ {% for comite in comites %}
+ {{ comite.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o comitê central.
+
+
+
+
+
Total de Cotas
+
+
+ Por favor, insira o total de cotas.
+
+
+
+
+
Data do Relatório
+
+
+ Por favor, insira a data do relatório.
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/editar_relatorio_pagamentos.html b/templates/editar_relatorio_pagamentos.html
new file mode 100644
index 0000000..13f461a
--- /dev/null
+++ b/templates/editar_relatorio_pagamentos.html
@@ -0,0 +1,91 @@
+{% extends 'base.html' %}
+
+{% block title %}Editar Relatório de Pagamentos{% endblock %}
+
+{% block content %}
+
+
+
+
Editar Relatório de Pagamentos
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
Setor
+
+ Selecione um setor
+ {% for setor in setores %}
+ {{ setor.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o setor.
+
+
+
+
+
Comitê Central
+
+ Selecione um comitê
+ {% for comite in comites %}
+ {{ comite.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o comitê central.
+
+
+
+
+
Total de Pagamentos
+
+
+ Por favor, insira o total de pagamentos.
+
+
+
+
+
Data do Relatório
+
+
+ Por favor, insira a data do relatório.
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/editar_relatorio_vendas.html b/templates/editar_relatorio_vendas.html
new file mode 100644
index 0000000..54dad6c
--- /dev/null
+++ b/templates/editar_relatorio_vendas.html
@@ -0,0 +1,91 @@
+{% extends 'base.html' %}
+
+{% block title %}Editar Relatório de Vendas{% endblock %}
+
+{% block content %}
+
+
+
+
Editar Relatório de Vendas
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
Setor
+
+ Selecione um setor
+ {% for setor in setores %}
+ {{ setor.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o setor.
+
+
+
+
+
Comitê Central
+
+ Selecione um comitê
+ {% for comite in comites %}
+ {{ comite.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o comitê central.
+
+
+
+
+
Total de Vendas
+
+
+ Por favor, insira o total de vendas.
+
+
+
+
+
Data do Relatório
+
+
+ Por favor, insira a data do relatório.
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/editar_setor.html b/templates/editar_setor.html
new file mode 100644
index 0000000..0519ecb
--- /dev/null
+++ b/templates/editar_setor.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/templates/editar_tipo_material.html b/templates/editar_tipo_material.html
new file mode 100644
index 0000000..dd277bf
--- /dev/null
+++ b/templates/editar_tipo_material.html
@@ -0,0 +1,74 @@
+{% extends 'base.html' %}
+
+{% block title %}Editar Tipo de Material{% endblock %}
+
+{% block content %}
+
+
+
+
Editar Tipo de Material
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
Nome
+
+
+ Por favor, insira o nome do tipo de material.
+
+
+
+
+
Preço
+
+
+ Por favor, insira o preço do tipo de material.
+
+
+
+
+
+
+ Descrição
+ {{ tipo.descricao }}
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/editar_venda.html b/templates/editar_venda.html
new file mode 100644
index 0000000..a4e401b
--- /dev/null
+++ b/templates/editar_venda.html
@@ -0,0 +1,124 @@
+{% extends 'base.html' %}
+
+{% block title %}Editar Venda{% endblock %}
+
+{% block content %}
+
+
+
+
Editar Venda
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
Militante
+
+ Selecione um militante
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o militante.
+
+
+
+
+
Material
+
+ Selecione um material
+ {% for material in materiais %}
+ {{ material.nome }} - R$ {{ "%.2f"|format(material.preco) }}
+ {% endfor %}
+
+
+ Por favor, selecione o material.
+
+
+
+
+
Quantidade
+
+
+ Por favor, insira a quantidade.
+
+
+
+
+ Valor Total
+
+
+
+
+
Data da Venda
+
+
+ Por favor, insira a data da venda.
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/home.html b/templates/home.html
index 78bbb56..17bb28e 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -1,12 +1,12 @@
{% extends 'base.html' %}
-{% block title %}Início{% endblock %}
+{% block title %}Home{% endblock %}
{% block content %}
-
-
Menu do Sistema
+
+
Bem-vindo, {{ current_user.username }}!
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
@@ -16,12 +16,83 @@
{% endif %}
{% endwith %}
-
- {% for url, nome in links %}
-
- {{ nome }}
-
- {% endfor %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Gerencie as configurações da organização.
+
Novo Usuário
+
+
+
diff --git a/templates/listar_celulas.html b/templates/listar_celulas.html
new file mode 100644
index 0000000..a1c0577
--- /dev/null
+++ b/templates/listar_celulas.html
@@ -0,0 +1,56 @@
+{% extends 'base.html' %}
+
+{% block title %}Listar Células{% endblock %}
+
+{% block content %}
+
+
+
+
Lista de Células
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+ ID
+ Nome
+ Responsável
+ Responsável Finanças
+ Setor
+ Ações
+
+
+
+ {% for celula in celulas %}
+
+ {{ celula.id }}
+ {{ celula.nome }}
+ {{ celula.responsavel_rel.nome if celula.responsavel_rel else '-' }}
+ {{ celula.responsavel_financas_rel.nome if celula.responsavel_financas_rel else '-' }}
+ {{ celula.setor.nome }}
+
+ Editar
+ Excluir
+
+
+ {% endfor %}
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/listar_comites.html b/templates/listar_comites.html
new file mode 100644
index 0000000..acdedc7
--- /dev/null
+++ b/templates/listar_comites.html
@@ -0,0 +1,56 @@
+{% extends 'base.html' %}
+
+{% block title %}Listar Comitês Regionais{% endblock %}
+
+{% block content %}
+
+
+
+
Lista de Comitês Regionais
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+ ID
+ Nome
+ Responsável
+ Responsável Finanças
+ Comitê Central
+ Ações
+
+
+
+ {% for comite in comites %}
+
+ {{ comite.id }}
+ {{ comite.nome }}
+ {{ comite.responsavel_rel.nome if comite.responsavel_rel else '-' }}
+ {{ comite.responsavel_financas_rel.nome if comite.responsavel_financas_rel else '-' }}
+ {{ comite.comite_central.nome }}
+
+ Editar
+ Excluir
+
+
+ {% endfor %}
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/listar_comites_centrais.html b/templates/listar_comites_centrais.html
new file mode 100644
index 0000000..38055b4
--- /dev/null
+++ b/templates/listar_comites_centrais.html
@@ -0,0 +1,54 @@
+{% extends 'base.html' %}
+
+{% block title %}Listar Comitês Centrais{% endblock %}
+
+{% block content %}
+
+
+
+
Lista de Comitês Centrais
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+ ID
+ Nome
+ Responsável
+ Responsável Finanças
+ Ações
+
+
+
+ {% for comite in comites %}
+
+ {{ comite.id }}
+ {{ comite.nome }}
+ {{ comite.responsavel_rel.nome if comite.responsavel_rel else '-' }}
+ {{ comite.responsavel_financas_rel.nome if comite.responsavel_financas_rel else '-' }}
+
+ Editar
+ Excluir
+
+
+ {% endfor %}
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/listar_materiais.html b/templates/listar_materiais.html
index 00ff160..7ce803a 100644
--- a/templates/listar_materiais.html
+++ b/templates/listar_materiais.html
@@ -1,33 +1,58 @@
{% extends 'base.html' %}
-{% block title %}Listar Militantes{% endblock %}
+{% block title %}Listar Materiais{% endblock %}
{% block content %}
-
Materiais Vendidos
-
Adicionar Novo Material
-
-
-
- ID
- Militante ID
- Tipo Material
- Descrição
- Valor
- Data da Venda
-
-
-
- {% for material in materiais %}
-
- {{ material.id }}
- {{ material.militante_id }}
- {{ material.tipo_material_id }}
- {{ material.descricao }}
- R$ {{ material.valor }}
- {{ material.data_venda }}
-
- {% endfor %}
-
-
-
Home
+
+
+
+
Lista de Materiais
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+ ID
+ Nome
+ Descrição
+ Preço
+ Quantidade
+ Tipo
+ Ações
+
+
+
+ {% for material in materiais %}
+
+ {{ material.id }}
+ {{ material.nome }}
+ {{ material.descricao }}
+ R$ {{ "%.2f"|format(material.preco) }}
+ {{ material.quantidade }}
+ {{ material.tipo.nome }}
+
+ Editar
+ Excluir
+
+
+ {% endfor %}
+
+
+
+
+
+
{% endblock %}
diff --git a/templates/listar_militantes.html b/templates/listar_militantes.html
index 1a71ca3..262434c 100644
--- a/templates/listar_militantes.html
+++ b/templates/listar_militantes.html
@@ -3,55 +3,86 @@
{% block title %}Listar Militantes{% endblock %}
{% block content %}
-
-
-
Lista de Militantes
-
Novo Militante
-
-
-
-
- Nome
- CPF
- Email
- Telefone
- Endereço
- Filiado
-
-
-
- {% for militante in militantes %}
-
- {{ militante.nome }}
- {{ militante.cpf }}
- {{ militante.email }}
- {{ militante.telefone }}
- {{ militante.endereco }}
- {{ 'Sim' if militante.filiado else 'Não' }}
-
- {% endfor %}
-
-
+
+
+
+
Lista de Militantes
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+ ID
+ Nome
+ CPF
+ Título Eleitoral
+ Data de Nascimento
+ Data de Entrada
+ Data de Efetivação
+ Telefone 1
+ Telefone 2
+ Profissão
+ Regime de Trabalho
+ Empresa
+ Contratante
+ Instituição de Ensino
+ Tipo de Instituição
+ Sindicato
+ Cargo Sindical
+ Dirigente Sindical
+ Central Sindical
+ Setor
+ Célula
+ Ações
+
+
+
+ {% for militante in militantes %}
+
+ {{ militante.id }}
+ {{ militante.nome }}
+ {{ militante.cpf }}
+ {{ militante.titulo_eleitoral }}
+ {{ militante.data_nascimento.strftime('%d/%m/%Y') }}
+ {{ militante.data_entrada_oci.strftime('%d/%m/%Y') }}
+ {{ militante.data_efetivacao_oci.strftime('%d/%m/%Y') }}
+ {{ militante.telefone1 }}
+ {{ militante.telefone2 }}
+ {{ militante.profissao }}
+ {{ militante.regime_trabalho }}
+ {{ militante.empresa }}
+ {{ militante.contratante }}
+ {{ militante.instituicao_ensino }}
+ {{ militante.tipo_instituicao }}
+ {{ militante.sindicato }}
+ {{ militante.cargo_sindical }}
+ {{ 'Sim' if militante.dirigente_sindical else 'Não' }}
+ {{ militante.central_sindical }}
+ {{ militante.setor.nome }}
+ {{ militante.celula.nome }}
+
+ Editar
+ Excluir
+
+
+ {% endfor %}
+
+
+
+
-
-
-
-
{% endblock %}
\ No newline at end of file
diff --git a/templates/listar_relatorios_cotas.html b/templates/listar_relatorios_cotas.html
index 85c3558..29e2d4a 100644
--- a/templates/listar_relatorios_cotas.html
+++ b/templates/listar_relatorios_cotas.html
@@ -1,32 +1,57 @@
{% extends 'base.html' %}
-{% block title %}Listar Militantes{% endblock %}
+{% block title %}Listar Relatórios de Cotas{% endblock %}
{% block content %}
-
Relatórios de Cotas Mensais
-
Adicionar Novo Relatório
-
-
-
- ID
- Setor ID
- Comitê ID
- Total de Cotas
- Data do Relatório
-
-
-
- {% for relatorio in relatorios %}
-
- {{ relatorio.id }}
- {{ relatorio.setor_id }}
- {{ relatorio.comite_id }}
- R$ {{ relatorio.total_cotas }}
- {{ relatorio.data_relatorio }}
-
- {% endfor %}
-
-
-
Home
+
+
+
+
Lista de Relatórios de Cotas
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+ ID
+ Setor
+ Comitê Central
+ Total de Cotas
+ Data do Relatório
+ Ações
+
+
+
+ {% for relatorio in relatorios %}
+
+ {{ relatorio.id }}
+ {{ relatorio.setor.nome }}
+ {{ relatorio.comite.nome }}
+ R$ {{ "%.2f"|format(relatorio.total_cotas) }}
+ {{ relatorio.data_relatorio.strftime('%d/%m/%Y') }}
+
+ Editar
+ Excluir
+
+
+ {% endfor %}
+
+
+
+
+
+
{% endblock %}
diff --git a/templates/listar_relatorios_pagamentos.html b/templates/listar_relatorios_pagamentos.html
new file mode 100644
index 0000000..de978f3
--- /dev/null
+++ b/templates/listar_relatorios_pagamentos.html
@@ -0,0 +1,56 @@
+{% extends 'base.html' %}
+
+{% block title %}Listar Relatórios de Pagamentos{% endblock %}
+
+{% block content %}
+
+
+
+
Lista de Relatórios de Pagamentos
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+ ID
+ Setor
+ Comitê Central
+ Total de Pagamentos
+ Data do Relatório
+ Ações
+
+
+
+ {% for relatorio in relatorios %}
+
+ {{ relatorio.id }}
+ {{ relatorio.setor.nome }}
+ {{ relatorio.comite.nome }}
+ R$ {{ "%.2f"|format(relatorio.total_pagamentos) }}
+ {{ relatorio.data_relatorio.strftime('%d/%m/%Y') }}
+
+ Editar
+ Excluir
+
+
+ {% endfor %}
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/listar_relatorios_vendas.html b/templates/listar_relatorios_vendas.html
index 0694fca..dfe7a25 100644
--- a/templates/listar_relatorios_vendas.html
+++ b/templates/listar_relatorios_vendas.html
@@ -1,32 +1,56 @@
{% extends 'base.html' %}
-{% block title %}Listar Militantes{% endblock %}
+{% block title %}Listar Relatórios de Vendas{% endblock %}
{% block content %}
-
Relatórios de Vendas de Materiais
-
Adicionar Novo Relatório
-
-
-
- ID
- Setor ID
- Comitê ID
- Total de Vendas
- Data do Relatório
-
-
-
- {% for relatorio in relatorios %}
-
- {{ relatorio.id }}
- {{ relatorio.setor_id }}
- {{ relatorio.comite_id }}
- R$ {{ relatorio.total_vendas }}
- {{ relatorio.data_relatorio }}
-
- {% endfor %}
-
-
-
Home
-
+
+
+
+
Lista de Relatórios de Vendas
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+ ID
+ Setor
+ Comitê Central
+ Total de Vendas
+ Data do Relatório
+ Ações
+
+
+
+ {% for relatorio in relatorios %}
+
+ {{ relatorio.id }}
+ {{ relatorio.setor.nome }}
+ {{ relatorio.comite.nome }}
+ R$ {{ "%.2f"|format(relatorio.total_vendas) }}
+ {{ relatorio.data_relatorio.strftime('%d/%m/%Y') }}
+
+ Editar
+ Excluir
+
+
+ {% endfor %}
+
+
+
+
+
+
{% endblock %}
diff --git a/templates/listar_setores.html b/templates/listar_setores.html
new file mode 100644
index 0000000..ab77fd1
--- /dev/null
+++ b/templates/listar_setores.html
@@ -0,0 +1,56 @@
+{% extends 'base.html' %}
+
+{% block title %}Listar Setores{% endblock %}
+
+{% block content %}
+
+
+
+
Lista de Setores
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+ ID
+ Nome
+ Responsável
+ Responsável Finanças
+ Comitê Regional
+ Ações
+
+
+
+ {% for setor in setores %}
+
+ {{ setor.id }}
+ {{ setor.nome }}
+ {{ setor.responsavel_rel.nome if setor.responsavel_rel else '-' }}
+ {{ setor.responsavel_financas_rel.nome if setor.responsavel_financas_rel else '-' }}
+ {{ setor.comite_regional.nome }}
+
+ Editar
+ Excluir
+
+
+ {% endfor %}
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/listar_tipos_materiais.html b/templates/listar_tipos_materiais.html
new file mode 100644
index 0000000..c4946ac
--- /dev/null
+++ b/templates/listar_tipos_materiais.html
@@ -0,0 +1,54 @@
+{% extends 'base.html' %}
+
+{% block title %}Listar Tipos de Materiais{% endblock %}
+
+{% block content %}
+
+
+
+
Lista de Tipos de Materiais
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+ ID
+ Nome
+ Descrição
+ Preço
+ Ações
+
+
+
+ {% for tipo in tipos %}
+
+ {{ tipo.id }}
+ {{ tipo.nome }}
+ {{ tipo.descricao }}
+ R$ {{ "%.2f"|format(tipo.preco) }}
+
+ Editar
+ Excluir
+
+
+ {% endfor %}
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/listar_vendas.html b/templates/listar_vendas.html
new file mode 100644
index 0000000..b8110d6
--- /dev/null
+++ b/templates/listar_vendas.html
@@ -0,0 +1,58 @@
+{% extends 'base.html' %}
+
+{% block title %}Listar Vendas{% endblock %}
+
+{% block content %}
+
+
+
+
Lista de Vendas
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
+
+
+ ID
+ Militante
+ Material
+ Quantidade
+ Valor Total
+ Data da Venda
+ Ações
+
+
+
+ {% for venda in vendas %}
+
+ {{ venda.id }}
+ {{ venda.militante.nome }}
+ {{ venda.material.nome }}
+ {{ venda.quantidade }}
+ R$ {{ "%.2f"|format(venda.valor_total) }}
+ {{ venda.data_venda.strftime('%d/%m/%Y') }}
+
+ Editar
+ Excluir
+
+
+ {% endfor %}
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/nova_celula.html b/templates/nova_celula.html
new file mode 100644
index 0000000..cdcfc8a
--- /dev/null
+++ b/templates/nova_celula.html
@@ -0,0 +1,94 @@
+{% extends 'base.html' %}
+
+{% block title %}Nova Célula{% endblock %}
+
+{% block content %}
+
+
+
+
Nova Célula
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
Nome
+
+
+ Por favor, insira o nome da célula.
+
+
+
+
+
Setor
+
+ Selecione um setor
+ {% for setor in setores %}
+ {{ setor.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione um setor.
+
+
+
+
+
+
+ Responsável
+
+ Selecione um responsável
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+ Responsável Finanças
+
+ Selecione um responsável financeiro
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/nova_venda.html b/templates/nova_venda.html
new file mode 100644
index 0000000..94be82b
--- /dev/null
+++ b/templates/nova_venda.html
@@ -0,0 +1,121 @@
+{% extends 'base.html' %}
+
+{% block title %}Nova Venda{% endblock %}
+
+{% block content %}
+
+
+
+
Nova Venda
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
Militante
+
+ Selecione um militante
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o militante.
+
+
+
+
+
Material
+
+ Selecione um material
+ {% for material in materiais %}
+ {{ material.nome }} - R$ {{ "%.2f"|format(material.preco) }}
+ {% endfor %}
+
+
+ Por favor, selecione o material.
+
+
+
+
+
Quantidade
+
+
+ Por favor, insira a quantidade.
+
+
+
+
+ Valor Total
+
+
+
+
+
Data da Venda
+
+
+ Por favor, insira a data da venda.
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/novo_celula.html b/templates/novo_celula.html
new file mode 100644
index 0000000..c76df12
--- /dev/null
+++ b/templates/novo_celula.html
@@ -0,0 +1,74 @@
+{% extends 'base.html' %}
+
+{% block title %}Nova Célula{% endblock %}
+
+{% block content %}
+
+
+
+
Nova Célula
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+ Nome:
+
+
+
+
+ Setor:
+
+ Selecione o setor
+ {% for setor in setores %}
+ {{ setor.nome }}
+ {% endfor %}
+
+
+
+
+ Comitê Regional:
+
+ Selecione o comitê
+ {% for comite in comites %}
+ {{ comite.nome }}
+ {% endfor %}
+
+
+
+
+ Responsável:
+
+ Selecione o responsável
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+ Responsável por Finanças:
+
+ Selecione o responsável
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/novo_comite.html b/templates/novo_comite.html
new file mode 100644
index 0000000..25ad361
--- /dev/null
+++ b/templates/novo_comite.html
@@ -0,0 +1,94 @@
+{% extends 'base.html' %}
+
+{% block title %}Novo Comitê Regional{% endblock %}
+
+{% block content %}
+
+
+
+
Novo Comitê Regional
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
Nome
+
+
+ Por favor, insira o nome do comitê regional.
+
+
+
+
+
Comitê Central
+
+ Selecione um comitê central
+ {% for comite in comites_centrais %}
+ {{ comite.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione um comitê central.
+
+
+
+
+
+
+ Responsável
+
+ Selecione um responsável
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+ Responsável Finanças
+
+ Selecione um responsável financeiro
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/novo_comite_central.html b/templates/novo_comite_central.html
new file mode 100644
index 0000000..db04685
--- /dev/null
+++ b/templates/novo_comite_central.html
@@ -0,0 +1,81 @@
+{% extends 'base.html' %}
+
+{% block title %}Novo Comitê Central{% endblock %}
+
+{% block content %}
+
+
+
+
Novo Comitê Central
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
Nome
+
+
+ Por favor, insira o nome do comitê central.
+
+
+
+
+ Responsável
+
+ Selecione um responsável
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+
+
+ Responsável Finanças
+
+ Selecione um responsável financeiro
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/novo_comite_regional.html b/templates/novo_comite_regional.html
new file mode 100644
index 0000000..39e736a
--- /dev/null
+++ b/templates/novo_comite_regional.html
@@ -0,0 +1,54 @@
+{% extends 'base.html' %}
+
+{% block title %}Novo Comitê Regional{% endblock %}
+
+{% block content %}
+
+
+
+
Novo Comitê Regional
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+ Nome:
+
+
+
+
+ Responsável:
+
+ Selecione o responsável
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+ Responsável por Finanças:
+
+ Selecione o responsável
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/novo_endereco.html b/templates/novo_endereco.html
new file mode 100644
index 0000000..d880bf3
--- /dev/null
+++ b/templates/novo_endereco.html
@@ -0,0 +1,74 @@
+{% extends 'base.html' %}
+
+{% block title %}Novo Endereço{% endblock %}
+
+{% block content %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/novo_material.html b/templates/novo_material.html
index d48b738..001261b 100644
--- a/templates/novo_material.html
+++ b/templates/novo_material.html
@@ -1,35 +1,94 @@
{% extends 'base.html' %}
-{% block title %}Listar Militantes{% endblock %}
+{% block title %}Novo Material{% endblock %}
{% block content %}
-
Registrar Novo Material
-
-
-
ID do Militante:
-
+
+
+
+
Novo Material
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
Nome
+
+
+ Por favor, insira o nome do material.
+
+
+
+
+
Descrição
+
+
+ Por favor, insira a descrição do material.
+
+
+
+
+
Preço
+
+
+ Por favor, insira o preço do material.
+
+
+
+
+
Quantidade
+
+
+ Por favor, insira a quantidade do material.
+
+
+
+
+
Tipo de Material
+
+ Selecione um tipo
+ {% for tipo in tipos %}
+ {{ tipo.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o tipo do material.
+
+
+
+
+
-
- Tipo de Material:
-
-
-
- Descrição:
-
-
-
- Valor:
-
-
-
- Data da Venda:
-
-
-
-
+
+
+
{% endblock %}
diff --git a/templates/novo_militante.html b/templates/novo_militante.html
index da7d850..e2cc335 100644
--- a/templates/novo_militante.html
+++ b/templates/novo_militante.html
@@ -6,7 +6,7 @@
-
Criar Novo Militante
+
Novo Militante
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
@@ -19,82 +19,123 @@
Nome:
-
+
CPF:
-
+
- Email:
-
+ Título Eleitoral:
+
- Telefone:
-
+ Data de Nascimento:
+
- Endereço:
-
-
-
-
-
- Filiado
+ Data de Entrada na OCI:
+
-
Responsabilidades:
-
- {% for valor, nome in responsabilidades %}
-
- {% endfor %}
-
+
Data de Efetivação na OCI:
+
- {% if celulas %}
- Célula:
-
- Selecione uma célula
- {% for cr in celulas_por_cr %}
-
- {% for setor in cr.setores %}
-
- {% for celula in setor.celulas %}
- {{ celula.nome }}
- {% endfor %}
-
- {% endfor %}
-
+ Telefone 1:
+
+
+
+
+ Telefone 2:
+
+
+
+
+ Profissão:
+
+
+
+
+ Regime de Trabalho:
+
+
+
+
+ Empresa:
+
+
+
+
+ Contratante:
+
+
+
+
+ Instituição de Ensino:
+
+
+
+
+ Tipo de Instituição:
+
+ Selecione o tipo
+ Pública
+ Privada
+
+
+
+
+ Sindicato:
+
+
+
+
+ Cargo Sindical:
+
+
+
+
+ Dirigente Sindical:
+
+ Não
+ Sim
+
+
+
+
+ Central Sindical:
+
+
+
+
+ Setor:
+
+ Selecione o setor
+ {% for setor in setores %}
+ {{ setor.nome }}
+ {% endfor %}
+
+
+
+
+ Célula:
+
+ Selecione a célula
+ {% for celula in celulas %}
+ {{ celula.nome }}
{% endfor %}
- {% endif %}
diff --git a/templates/novo_pagamento.html b/templates/novo_pagamento.html
index cf76169..01c97f0 100644
--- a/templates/novo_pagamento.html
+++ b/templates/novo_pagamento.html
@@ -6,17 +6,61 @@
-
Registrar Novo Pagamento
+
Novo Pagamento
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
- ID do Militante:
-
+ Militante:
+
+ Selecione o militante
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
- Tipo de Pagamento:
-
+ Tipo de Pagamento:
+
+ Selecione o tipo
+ Cota
+ Jornal
+ Assinatura
+ Campanha Financeira
+
+
+
+
+ Mês de Referência:
+
+
+
+
+ Número do Jornal:
+
+
+
+
+ Número Inicial da Assinatura:
+
+
+
+
+ Número Final da Assinatura:
+
+
+
+
+ Campanha Financeira:
+
diff --git a/templates/novo_relatorio_cotas.html b/templates/novo_relatorio_cotas.html
index 2e17576..7f32a54 100644
--- a/templates/novo_relatorio_cotas.html
+++ b/templates/novo_relatorio_cotas.html
@@ -1,30 +1,92 @@
{% extends 'base.html' %}
-{% block title %}Listar Militantes{% endblock %}
+{% block title %}Novo Relatório de Cotas{% endblock %}
{% block content %}
-
Registrar Novo Relatório de Cotas
-
-
-
ID do Setor:
-
+
+
+
+
Novo Relatório de Cotas
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
Setor
+
+ Selecione um setor
+ {% for setor in setores %}
+ {{ setor.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o setor.
+
+
+
+
+
Comitê Central
+
+ Selecione um comitê
+ {% for comite in comites %}
+ {{ comite.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o comitê central.
+
+
+
+
+
Total de Cotas
+
+
+ Por favor, insira o total de cotas.
+
+
+
+
+
Data do Relatório
+
+
+ Por favor, insira a data do relatório.
+
+
+
+
+
-
- ID do Comitê:
-
-
-
- Total de Cotas:
-
-
-
- Data do Relatório:
-
-
-
Registrar Relatório
-
-
Voltar para Lista
-
Home
+
+
+
{% endblock %}
diff --git a/templates/novo_relatorio_pagamentos.html b/templates/novo_relatorio_pagamentos.html
new file mode 100644
index 0000000..535c7ab
--- /dev/null
+++ b/templates/novo_relatorio_pagamentos.html
@@ -0,0 +1,91 @@
+{% extends 'base.html' %}
+
+{% block title %}Novo Relatório de Pagamentos{% endblock %}
+
+{% block content %}
+
+
+
+
Novo Relatório de Pagamentos
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
Setor
+
+ Selecione um setor
+ {% for setor in setores %}
+ {{ setor.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o setor.
+
+
+
+
+
Comitê Central
+
+ Selecione um comitê
+ {% for comite in comites %}
+ {{ comite.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o comitê central.
+
+
+
+
+
Total de Pagamentos
+
+
+ Por favor, insira o total de pagamentos.
+
+
+
+
+
Data do Relatório
+
+
+ Por favor, insira a data do relatório.
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/novo_relatorio_vendas.html b/templates/novo_relatorio_vendas.html
index 06a55a6..1492092 100644
--- a/templates/novo_relatorio_vendas.html
+++ b/templates/novo_relatorio_vendas.html
@@ -1,30 +1,91 @@
{% extends 'base.html' %}
-{% block title %}Listar Militantes{% endblock %}
+{% block title %}Novo Relatório de Vendas{% endblock %}
{% block content %}
-
Registrar Novo Relatório de Vendas
-
-
-
ID do Setor:
-
+
+
+
+
Novo Relatório de Vendas
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
Setor
+
+ Selecione um setor
+ {% for setor in setores %}
+ {{ setor.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o setor.
+
+
+
+
+
Comitê Central
+
+ Selecione um comitê
+ {% for comite in comites %}
+ {{ comite.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione o comitê central.
+
+
+
+
+
Total de Vendas
+
+
+ Por favor, insira o total de vendas.
+
+
+
+
+
Data do Relatório
+
+
+ Por favor, insira a data do relatório.
+
+
+
+
+
-
- ID do Comitê:
-
-
-
- Total de Vendas:
-
-
-
- Data do Relatório:
-
-
-
Registrar Relatório
-
-
Voltar para Lista
-
Home
-
+
+
+
{% endblock %}
diff --git a/templates/novo_setor.html b/templates/novo_setor.html
new file mode 100644
index 0000000..5cb5ca0
--- /dev/null
+++ b/templates/novo_setor.html
@@ -0,0 +1,94 @@
+{% extends 'base.html' %}
+
+{% block title %}Novo Setor{% endblock %}
+
+{% block content %}
+
+
+
+
Novo Setor
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
Nome
+
+
+ Por favor, insira o nome do setor.
+
+
+
+
+
Comitê Regional
+
+ Selecione um comitê regional
+ {% for comite in comites %}
+ {{ comite.nome }}
+ {% endfor %}
+
+
+ Por favor, selecione um comitê regional.
+
+
+
+
+
+
+ Responsável
+
+ Selecione um responsável
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+ Responsável Finanças
+
+ Selecione um responsável financeiro
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/novo_tipo_material.html b/templates/novo_tipo_material.html
new file mode 100644
index 0000000..ae5c1da
--- /dev/null
+++ b/templates/novo_tipo_material.html
@@ -0,0 +1,74 @@
+{% extends 'base.html' %}
+
+{% block title %}Novo Tipo de Material{% endblock %}
+
+{% block content %}
+
+
+
+
Novo Tipo de Material
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+
+
Nome
+
+
+ Por favor, insira o nome do tipo de material.
+
+
+
+
+
Preço
+
+
+ Por favor, insira o preço do tipo de material.
+
+
+
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/novo_tipo_pagamento.html b/templates/novo_tipo_pagamento.html
new file mode 100644
index 0000000..0519ecb
--- /dev/null
+++ b/templates/novo_tipo_pagamento.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/templates/novo_usuario.html b/templates/novo_usuario.html
index f3ad9d3..ddda868 100644
--- a/templates/novo_usuario.html
+++ b/templates/novo_usuario.html
@@ -6,52 +6,68 @@
diff --git a/templates/novo_venda.html b/templates/novo_venda.html
new file mode 100644
index 0000000..15e52d0
--- /dev/null
+++ b/templates/novo_venda.html
@@ -0,0 +1,64 @@
+{% extends 'base.html' %}
+
+{% block title %}Nova Venda{% endblock %}
+
+{% block content %}
+
+
+
+
Registrar Nova Venda
+
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ {% for category, message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
+
+
+
+ Militante:
+
+ Selecione o militante
+ {% for militante in militantes %}
+ {{ militante.nome }}
+ {% endfor %}
+
+
+
+
+ Material:
+
+ Selecione o material
+ {% for material in materiais %}
+ {{ material.descricao }}
+ {% endfor %}
+
+
+
+
+ Quantidade:
+
+
+
+
+ Valor Total:
+
+
+
+
+ Data da Venda:
+
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file