Initial commit - dashboard leads
This commit is contained in:
24
backend/ver_leyenda.py
Normal file
24
backend/ver_leyenda.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# ver_leyenda.py - Muestra en pantalla el mini-apartado LEYENDA (tabla campanias),
|
||||
# igual que se ve en el dashboard. Solo lectura.
|
||||
# Ejecutar en backend/: python ver_leyenda.py
|
||||
from data_manager_v2 import DataManager
|
||||
|
||||
dm = DataManager()
|
||||
filas = dm.listar_campanias()
|
||||
|
||||
print(f"\n=== LEYENDA (tabla campanias) — {len(filas)} filas ===\n")
|
||||
h = f"{'id':>4} {'FRASE DE BUSQUEDA':38} {'CARGO':16} {'COD':6} {'SEDE':10} {'DIA':14} {'ORIGEN':13} {'INICIO':11} {'FIN':11}"
|
||||
print(h)
|
||||
print("-"*len(h))
|
||||
for f in filas:
|
||||
print(f"{str(f.get('id','')):>4} "
|
||||
f"{str(f.get('frase_busqueda',''))[:38]:38} "
|
||||
f"{str(f.get('cargo',''))[:16]:16} "
|
||||
f"{str(f.get('codigo','')):6} "
|
||||
f"{str(f.get('sede',''))[:10]:10} "
|
||||
f"{str(f.get('dia',''))[:14]:14} "
|
||||
f"{str(f.get('origen',''))[:13]:13} "
|
||||
f"{str(f.get('fecha_inicio','')):11} "
|
||||
f"{str(f.get('fecha_fin','')):11}")
|
||||
print("-"*len(h))
|
||||
print(f"Total: {len(filas)} campanias")
|
||||
Reference in New Issue
Block a user