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:
@@ -22,42 +22,13 @@
|
||||
<h2>Historial de transacciones</h2>
|
||||
</div>
|
||||
<div class="body-box-content">
|
||||
<table class="max-center-table-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID de Cuenta</th>
|
||||
<th>Usuario</th> <!-- Columna para el nombre de la cuenta -->
|
||||
<th>Personaje</th>
|
||||
<th>IP</th>
|
||||
<th>Email</th>
|
||||
<th>Producto</th>
|
||||
<th>Monto</th>
|
||||
<th>Fecha</th>
|
||||
<th>Modo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if transactions %}
|
||||
{% for transaction in transactions %}
|
||||
<tr>
|
||||
<td>{{ transaction.account_id }}</td> <!-- ID de la cuenta -->
|
||||
<td>{{ transaction.username }}</td> <!-- Nombre de la cuenta -->
|
||||
<td>{{ transaction.character_name }}</td>
|
||||
<td>{{ transaction.acore_ip }}</td> <!-- IP de acore_auth -->
|
||||
<td>{{ transaction.email }}</td> <!-- Email -->
|
||||
<td>{{ transaction.product_name }}</td>
|
||||
<td>{{ transaction.amount }} €</td>
|
||||
<td>{{ transaction.timestamp|date:"d-m-Y H:i:s" }}</td>
|
||||
<td>{{ transaction.mode }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="9"><span>No hay movimientos</span></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% load django_vite %}
|
||||
<!-- Isla React (Vite): tabla del historial de transacciones. -->
|
||||
<div id="history-table-app"
|
||||
data-columns='[{"key":"account_id","label":"ID de Cuenta"},{"key":"username","label":"Usuario"},{"key":"character_name","label":"Personaje"},{"key":"acore_ip","label":"IP"},{"key":"email","label":"Email"},{"key":"product_name","label":"Producto"},{"key":"amount","label":"Monto"},{"key":"timestamp","label":"Fecha"},{"key":"mode","label":"Modo"}]'
|
||||
data-empty-text="No hay movimientos"></div>
|
||||
{{ transactions_data|json_script:"history-table-data" }}
|
||||
{% vite_asset 'src/entries/history_table.tsx' %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user