diff --git a/gerar_report_json.py b/gerar_report_json.py
new file mode 100644
index 0000000..b3747e0
--- /dev/null
+++ b/gerar_report_json.py
@@ -0,0 +1,98 @@
+#!/usr/bin/env python3
+"""
+Gerar report.json consolidado para o Dashboard Estático
+"""
+
+import json
+import sys
+from datetime import datetime
+
+# Arquivos
+ARQUIVO_DADOS = '/root/mission-control/financeiro/memory/daily/gastos-2026-02-09.json'
+ARQUIVO_SAIDA = '/root/clawd/financeiro-dashboard/report.json'
+
+def gerar_report_json():
+ """Gera o report.json consolidado"""
+
+ # 1. Ler dados brutos
+ print("Lendo dados brutos...")
+ try:
+ with open(ARQUIVO_DADOS, 'r', encoding='utf-8') as f:
+ transacoes = json.load(f)
+ except Exception as e:
+ print(f"Erro ao ler dados: {e}")
+ sys.exit(1)
+
+ print(f"{len(transacoes)} transacoes carregadas")
+
+ # 2. Agrupar por hotel
+ print("Agrupando por hotel...")
+ dados_por_hotel = {}
+
+ for transacao in transacoes:
+ hotel = transacao.get('unidade', 'Desconhecido')
+
+ if hotel not in dados_por_hotel:
+ dados_por_hotel[hotel] = {
+ 'total': 0,
+ 'transactions': []
+ }
+
+ dados_por_hotel[hotel]['total'] += float(transacao.get('valor', 0))
+ dados_por_hotel[hotel]['transactions'].append(transacao)
+
+ # 3. Calcular totais globais
+ print("Calculando totais...")
+ global_total = sum(h['total'] for h in dados_por_hotel.values())
+ global_count = sum(len(h['transactions']) for h in dados_por_hotel.values())
+
+ # 4. Criar lista de hotéis ordenada
+ print("Ordenando hotéis...")
+ hoteis_ordenados = []
+
+ for hotel, dados in dados_por_hotel.items():
+ hotel_entry = {
+ 'name': hotel,
+ 'total': dados['total'],
+ 'count': len(dados['transactions']),
+ 'transactions': dados['transactions']
+ }
+ hoteis_ordenados.append(hotel_entry)
+
+ # Ordenar por total (maior primeiro)
+ hoteis_ordenados.sort(key=lambda x: x['total'], reverse=True)
+
+ # 5. Criar estrutura JSON final
+ print("Criando JSON final...")
+ data_final = {
+ 'hotels': hoteis_ordenados,
+ 'global_total': global_total,
+ 'global_count': global_count,
+ 'date': datetime.now().strftime('%Y-%m-%d %H:%M:%S')
+ }
+
+ # 6. Salvar arquivo
+ print(f"Salvando em {ARQUIVO_SAIDA}...")
+ try:
+ with open(ARQUIVO_SAIDA, 'w', encoding='utf-8') as f:
+ json.dump(data_final, f, indent=2, ensure_ascii=False)
+
+ print(f"Arquivo salvo: {ARQUIVO_SAIDA}")
+ print(f"Total de hotéis: {len(hoteis_ordenados)}")
+ print(f"Custo global: R${global_total:.2f}")
+ print(f"Total de transações: {global_count}")
+ print()
+ print("JSON pronto para ser lido pelo dashboard!")
+ print()
+ print("Próximos passos:")
+ print("1. Commit do report.json no GitHub")
+ print("2. Commit do index.html (dashboard estático) no GitHub")
+ print("3. GitHub Pages vai publicar os dois arquivos")
+ print("4. Dashboard vai carregar o report.json automaticamente")
+
+ except Exception as e:
+ print(f"Erro ao salvar arquivo: {e}")
+ sys.exit(1)
+
+if __name__ == '__main__':
+ gerar_report_json()
diff --git a/index.html b/index.html
index 9f51c4f..3228759 100644
--- a/index.html
+++ b/index.html
@@ -17,7 +17,7 @@
padding: 0;
}
- .dashboard-container {
+ .container {
max-width: 1800px;
margin: 0 auto;
padding: 2rem;
@@ -31,35 +31,6 @@
margin-bottom: 1.5rem;
}
- .card-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 1rem;
- padding-bottom: 1rem;
- border-bottom: 1px solid #e0e0e0;
- }
-
- .card-title {
- font-size: 1.25rem;
- font-weight: 600;
- color: #1f2937;
- }
-
- .badge {
- display: inline-block;
- padding: 0.25rem 0.75rem;
- border-radius: 4px;
- font-size: 0.75rem;
- font-weight: 600;
- }
-
- .badge-success { background: #10b981; color: white; }
- .badge-warning { background: #f59e0b; color: white; }
- .badge-info { background: #3b82f6; color: white; }
- .badge-danger { background: #ef4444; color: white; }
- .badge-primary { background: #667eea; color: white; }
-
.hotel-card {
background: #f9fafb;
border: 1px solid #e5e7eb;
@@ -74,11 +45,13 @@
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}
- .hotel-header {
+ .header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
+ padding-bottom: 1rem;
+ border-bottom: 1px solid #e5e7eb;
}
.hotel-info {
@@ -87,36 +60,28 @@
gap: 0.75rem;
}
- .hotel-icon {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- color: white;
- border-radius: 8px;
- padding: 0.5rem;
+ .name {
font-size: 1.25rem;
- }
-
- .hotel-name {
- font-size: 1.125rem;
font-weight: 600;
color: #1f2937;
}
- .hotel-stats {
+ .stats {
text-align: right;
}
- .hotel-count {
+ .count {
font-size: 0.875rem;
color: #6b7280;
}
- .hotel-total {
+ .total {
font-size: 1.5rem;
font-weight: 700;
color: #1f2937;
}
- .toggle-button {
+ .button {
background: white;
border: 1px solid #667eea;
color: #667eea;
@@ -128,19 +93,19 @@
font-weight: 500;
}
- .toggle-button:hover {
+ .button:hover {
background: #667eea;
color: white;
}
- .transactions-container {
+ .transactions {
display: none;
margin-top: 1rem;
padding-top: 1rem;
border-top: 1px solid #e5e7eb;
}
- .transactions-container.expanded {
+ .transactions.show {
display: block;
animation: slideDown 0.3s ease;
}
@@ -162,7 +127,7 @@
margin-top: 0.5rem;
}
- .table th {
+ th {
background: #f8f9fa;
padding: 0.5rem;
text-align: left;
@@ -171,30 +136,31 @@
font-size: 0.875rem;
}
- .table td {
+ td {
padding: 0.5rem;
border-bottom: 1px solid #f3f4f6;
text-align: left;
font-size: 0.875rem;
}
- .transaction-row {
- padding: 0.5rem;
+ .row {
+ padding: 0.5rem 0;
border-bottom: 1px solid #f3f4f6;
- transition: all 0.2s;
}
- .transaction-row:hover {
+ .row:hover {
background: #f9fafb;
}
- .transaction-row:last-child {
+ .row:last-child {
border-bottom: none;
}
- .transaction-category {
+ .badge {
display: inline-block;
padding: 0.25rem 0.75rem;
+ background: #667eea;
+ color: white;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 600;
@@ -203,662 +169,242 @@
.amount {
font-weight: 600;
color: #1f2937;
- font-size: 1rem;
}
- .search-box {
+ .search {
padding: 0.75rem;
border: 1px solid #e0e0e0;
border-radius: 8px;
width: 100%;
- max-width: 500px;
font-size: 0.875rem;
}
- .search-box:focus {
+ .search:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 3px rgba(102, 126, 234, 0.2);
}
- .last-updated {
- font-size: 0.875rem;
- color: #6b7280;
- text-align: right;
- margin-top: 0.5rem;
+ .loading {
+ text-align: center;
+ padding: 2rem;
+ color: white;
+ }
+
+ .spinner {
+ border: 4px solid rgba(255, 255, 255, 0.3);
+ border-radius: 50%;
+ border-top: 4px solid white;
+ width: 40px;
+ height: 40px;
+ animation: spin 1s linear infinite;
+ margin: 0 auto 1rem;
+ }
+
+ @keyframes spin {
+ 0% { transform: rotate(0deg); }
+ 100% { transform: rotate(360deg); }
+ }
+
+ .error {
+ background: #fee2e2;
+ color: #dc2626;
+ padding: 1rem;
+ border-radius: 8px;
+ text-align: center;
+ margin: 1rem 0;
}
-
+
Dashboard Financeiro
Grupo Inova - Squad Financeiro
-
Ultima atualizacao: carregando...
+
Atualizacao: Carregando...
-
-
-
Total de Hoteis
-
...
-
-
-
-
Total Transacoes
-
...
-
-
-
Hotel com Maior Gasto
-
...
-
+
-
-
-
-
+
+
+
+
+
Total de Hoteis
+
...
+
+
+
+
Total Transacoes
+
...
+
+
+
Hotel com Maior Gasto
+
...
+
+
-
-
- Digite para buscar em TODOS os hoteis. Clique em "Mostrar Transacoes" no hotel para filtrar.
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- | Descricao |
- Categoria |
- Valor |
- Fornecedor |
- Data |
-
-
-
-
-
- | GAZIN |
- Compra de equipamentos de informática |
- R$ 3337.96 |
- GAZIN |
- 2026-02-09 |
-
-
-
- | SALARIO THAYNARA COBRIU AS FERIAS DA GERENTE |
- Salário |
- R$ 2500.0 |
- THAYNARA CRISTINE SANTOS DE OLIVEIRA |
- 2026-02-09 |
-
-
-
- | SALÁRIO RECEPCIOCISTA |
- Salário |
- R$ 2093.45 |
- VALERIA DE ANDRADE FERREIRA |
- 2026-02-09 |
-
-
-
- | SALÁRIO RECEPCIOCISTA |
- Salário |
- R$ 2001.5 |
- DANIELA SILVA DE LIRA |
- 2026-02-09 |
-
-
-
- | SALÁRIO CAMAREIRA |
- Salário |
- R$ 1885.13 |
- monica de sousa matos |
- 2026-02-09 |
-
-
-
- | SALÁRIO CAMAREIRA |
- Salário |
- R$ 1842.72 |
- YOHANA JOSEFINA PEREZ PEINADO |
- 2026-02-09 |
-
-
-
- | SALÁRIO CAMAREIRA |
- Salário |
- R$ 1728.87 |
- SANDRA RODRIGUES DOS SANTOS |
- 2026-02-09 |
-
-
-
- | SALÁRIO CAMAREIRA |
- Salário |
- R$ 1673.46 |
- PAMELA PEREIRA DE ARAUJO |
- 2026-02-09 |
-
-
-
- | SALÁRIO CAMAREIRA |
- Salário |
- R$ 1672.26 |
- MIKAELLY FREITAS SILVA |
- 2026-02-09 |
-
-
-
- | SALÁRIO CAMAREIRA |
- Salário |
- R$ 1652.38 |
- TATIANA R. DE VASCINCELOS |
- 2026-02-09 |
-
-
-
- | SERVIÇO TRAPORTE DE ROUPA |
- Lavanderia |
- R$ 1200.0 |
- SERVIÇO ENTREGA DE ROUPA LAVANDERIA |
- 2026-02-09 |
-
-
-
- | slr adm |
- Salários Administrativo (Back office) |
- R$ 966.23 |
- OUTROS |
- 2026-02-09 |
-
-
-
- | SALARIO LAVADOR |
- Salário |
- R$ 588.0 |
- REGINALDO RIBEIRO LIMA |
- 2026-02-09 |
-
-
-
- | devolução cliente |
- Devoluções de clientes |
- R$ 180.0 |
- DEVOLUÇOES DE CLENTES |
- 2026-02-09 |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | Descricao |
- Categoria |
- Valor |
- Fornecedor |
- Data |
-
-
-
-
-
- | SALARIO IARA |
- Salário |
- R$ 2400.0 |
- Iara Dourado |
- 2026-02-09 |
-
-
-
- | VALOR DIVIDIDO COM HOTEL AL ( FRIGOBAR E AR CONDICIONADO ) |
- Investimentos gerais |
- R$ 963.4 |
- HOTEL PRIME AL |
- 2026-02-09 |
-
-
-
- | FRUTAS P/ SEMANA |
- Supermercado / Atacarejo |
- R$ 100.0 |
- SACOLÃO FABIANA |
- 2026-02-09 |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | Descricao |
- Categoria |
- Valor |
- Fornecedor |
- Data |
-
-
-
-
-
- | Rescisão |
- Rescisões |
- R$ 1531.39 |
- LORRAYNE OLIVEIRA |
- 2026-02-09 |
-
-
-
- | Salário Matheus REF JAN/26 |
- Salário |
- R$ 730.03 |
- Matheus Marques Aires |
- 2026-02-09 |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | Descricao |
- Categoria |
- Valor |
- Fornecedor |
- Data |
-
-
-
-
-
- | ZEAN CAMERAS |
- Mão de obra terceirizada |
- R$ 765.0 |
- ZEAN MANUTENÇÃO |
- 2026-02-09 |
-
-
-
- | SALARIO |
- Salário |
- R$ 500.0 |
- GUSTAVO CONTABILIDADE |
- 2026-02-09 |
-
-
-
- | SALARIO |
- Salário |
- R$ 244.44 |
- ISMAEL FINANCEIRO |
- 2026-02-09 |
-
-
-
- | SALARIO PAULO COMPRAS |
- Salário |
- R$ 214.29 |
- PAULO COMPRAS |
- 2026-02-09 |
-
-
-
- | TELEFONE FINANCEIRO |
- Telefone + internet |
- R$ 7.5 |
- TELEFONE E INTERNET |
- 2026-02-09 |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | Descricao |
- Categoria |
- Valor |
- Fornecedor |
- Data |
-
-
-
-
-
- | BATEDEIRA,TORRADEIRA,PANELA DE PRESSÃO |
- Compra de Equipamentos |
- R$ 327.97 |
- CARREFOUR |
- 2026-02-09 |
-
-
-
- | (CARTÃO LILIAN) 46,97 LT COMBUSTIVÉL |
- Combustível |
- R$ 326.25 |
- Cartão Lilian Venc 10 |
- 2026-02-09 |
-
-
-
- | COMPRA DE ESPUMANTESALTON,PAPEL A4 |
- Compra de Equipamentos |
- R$ 255.3 |
- CARREFOUR |
- 2026-02-09 |
-
-
-
- | TARIFA STONE DIA 09/02 |
- Tarifas bancárias |
- R$ 7.86 |
- None |
- 2026-02-09 |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | Descricao |
- Categoria |
- Valor |
- Fornecedor |
- Data |
-
-
-
-
-
- | THAIS COODENAÇAO |
- Mão de obra terceirizada |
- R$ 500.0 |
- THAIS STEFANY |
- 2026-02-09 |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | Descricao |
- Categoria |
- Valor |
- Fornecedor |
- Data |
-
-
-
-
-
- | PRESTOBARBA |
- Supermercado / Atacarejo |
- R$ 59.0 |
- RUMÃO |
- 2026-02-09 |
-
-
-
- | CARNE ALMOÇO |
- Supermercado / Atacarejo |
- R$ 17.67 |
- SUPER CARNES |
- 2026-02-09 |
-
-
-
- | VT - EDSON |
- Transporte Pessoal Manutenção |
- R$ 10.0 |
- EDSON |
- 2026-02-09 |
-
-
-
-
-
-
-
-
-
-