Fase 3 (islas): historiales de seguridad y transacciones en React/TSX

Tabla genérica reutilizable HistoryTable (columnas por data-columns, filas por
json_script) + entry history_table:
- security_history: intentos de conexión (username/status/ip/fecha). Se elimina la
  caja "actividad" duplicada. Las vistas pasan login_attempts_data serializable.
- trans_history: historial de transacciones (StripeLog) con transactions_data.

Datos embebidos con json_script (sin endpoint extra). Verificado: check OK, ambas
plantillas renderizan la isla con datos.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-12 21:52:20 +00:00
parent cefa30dabc
commit 230d401c75
7 changed files with 107 additions and 82 deletions
+19 -1
View File
@@ -86,8 +86,26 @@ def trans_history_view(request):
else:
transactions = []
transactions_data = [
{
'account_id': t.account_id,
'username': t.username,
'character_name': t.character_name,
'acore_ip': t.acore_ip,
'email': t.email,
'product_name': t.product_name,
'amount': f"{t.amount}",
'timestamp': t.timestamp.strftime('%d-%m-%Y %H:%M:%S') if t.timestamp else '',
'mode': t.mode,
}
for t in transactions
]
# Renderizamos la vista con el historial de transacciones
return render(request, 'account/trans_history.html', {'transactions': transactions})
return render(request, 'account/trans_history.html', {
'transactions': transactions,
'transactions_data': transactions_data,
})
def trade_points_view(request):
"""
Vista para la página de intercambio de puntos.