feat: actualización dashboard.html
This commit is contained in:
Binary file not shown.
@@ -142,6 +142,21 @@ def colonias_por_cp(
|
|||||||
"encontrado": len(colonias) > 0
|
"encontrado": len(colonias) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@app.get("/admin/rutas/estado")
|
||||||
|
def admin_estado_rutas(db: Session = Depends(get_db)):
|
||||||
|
resultado = []
|
||||||
|
for ruta in simulator.RUTAS:
|
||||||
|
eta = simulator.get_eta(ruta["routeId"], db)
|
||||||
|
resultado.append({
|
||||||
|
"route_id": ruta["routeId"],
|
||||||
|
"name": ruta["name"],
|
||||||
|
"evento": eta["evento"] if eta else "DESCONOCIDO",
|
||||||
|
"current_position": eta.get("current_position", 0) if eta else 0,
|
||||||
|
"ventana_inicio": eta["ventana_inicio"] if eta else "--",
|
||||||
|
"ventana_fin": eta["ventana_fin"] if eta else "--",
|
||||||
|
})
|
||||||
|
return resultado
|
||||||
|
|
||||||
@app.post("/reportes")
|
@app.post("/reportes")
|
||||||
def crear_reporte(
|
def crear_reporte(
|
||||||
domicilio_id: int,
|
domicilio_id: int,
|
||||||
|
|||||||
Reference in New Issue
Block a user