| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- {% extends "base.html" %}
- {% block content %}
- <div class="row">
- <div class="col-12">
- <div class="d-flex justify-content-between align-items-center mb-4">
- <h2>Simulaciones Guardadas</h2>
- <a href="{{ url_for('main.index') }}" class="btn btn-secondary">Volver al Inicio</a>
- </div>
-
- {% if proyectos %}
- <div class="table-responsive">
- <table class="table table-striped table-hover">
- <thead>
- <tr>
- <th>Fecha</th>
- <th>Cliente</th>
- <th>Ciudad</th>
- <th>Casa</th>
- <th>Panel</th>
- <th>Cantidad</th>
- <th>Energía (kWh/mes)</th>
- <th>Ahorro ($/mes)</th>
- </tr>
- </thead>
- <tbody>
- {% for proyecto in proyectos %}
- <tr>
- <td>{{ proyecto.fecha_simulacion.strftime('%Y-%m-%d %H:%M') }}</td>
- <td>{{ proyecto.nombre_cliente }}</td>
- <td>{{ proyecto.ciudad.nombre_ciudad }}</td>
- <td>{{ proyecto.casa.nombre if proyecto.casa else 'N/A' }}</td>
- <td>{{ proyecto.panel.marca }} {{ proyecto.panel.modelo }}</td>
- <td>{{ proyecto.cantidad_paneles }}</td>
- <td>{{ "%.2f"|format(proyecto.energia_estimada_mensual) }}</td>
- <td>{{ "%.2f"|format(proyecto.ahorro_estimado) if proyecto.ahorro_estimado else '-' }}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- {% else %}
- <div class="alert alert-info">
- No hay simulaciones guardadas todavía.
- </div>
- {% endif %}
- </div>
- </div>
- {% endblock %}
|