Update templates/index.html
Browse files- templates/index.html +80 -22
templates/index.html
CHANGED
|
@@ -1,27 +1,85 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html>
|
| 3 |
<head>
|
| 4 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
</head>
|
| 6 |
<body>
|
| 7 |
-
<
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
</body>
|
| 27 |
-
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>AI Estimator Dashboard</title>
|
| 7 |
+
<style>
|
| 8 |
+
body {
|
| 9 |
+
font-family: Arial, sans-serif;
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 20px;
|
| 12 |
+
background-color: #f4f4f4;
|
| 13 |
+
}
|
| 14 |
+
.container {
|
| 15 |
+
max-width: 800px;
|
| 16 |
+
margin: auto;
|
| 17 |
+
}
|
| 18 |
+
.forecast-card {
|
| 19 |
+
background: white;
|
| 20 |
+
border-radius: 8px;
|
| 21 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
| 22 |
+
padding: 20px;
|
| 23 |
+
margin-bottom: 20px;
|
| 24 |
+
}
|
| 25 |
+
.forecast-card h3 {
|
| 26 |
+
margin: 0 0 10px;
|
| 27 |
+
color: #333;
|
| 28 |
+
}
|
| 29 |
+
.forecast-card p {
|
| 30 |
+
margin: 5px 0;
|
| 31 |
+
}
|
| 32 |
+
.alert {
|
| 33 |
+
color: red;
|
| 34 |
+
font-weight: bold;
|
| 35 |
+
}
|
| 36 |
+
.download-btn {
|
| 37 |
+
display: inline-block;
|
| 38 |
+
padding: 10px 20px;
|
| 39 |
+
background-color: #007bff;
|
| 40 |
+
color: white;
|
| 41 |
+
text-decoration: none;
|
| 42 |
+
border-radius: 4px;
|
| 43 |
+
margin-top: 10px;
|
| 44 |
+
}
|
| 45 |
+
.download-btn:hover {
|
| 46 |
+
background-color: #0056b3;
|
| 47 |
+
}
|
| 48 |
+
@media (max-width: 600px) {
|
| 49 |
+
.forecast-card {
|
| 50 |
+
padding: 15px;
|
| 51 |
+
}
|
| 52 |
+
.download-btn {
|
| 53 |
+
width: 100%;
|
| 54 |
+
text-align: center;
|
| 55 |
+
}
|
| 56 |
+
}
|
| 57 |
+
</style>
|
| 58 |
</head>
|
| 59 |
<body>
|
| 60 |
+
<div class="container">
|
| 61 |
+
<h1>Daily Resource Forecast</h1>
|
| 62 |
+
{% if forecasts %}
|
| 63 |
+
{% for forecast in forecasts %}
|
| 64 |
+
<div class="forecast-card">
|
| 65 |
+
<h3>Project: {{ forecast.project_id }}</h3>
|
| 66 |
+
<p><strong>Date:</strong> {{ forecast.date }}</p>
|
| 67 |
+
<p><strong>Task Type:</strong> {{ forecast.task_type }}</p>
|
| 68 |
+
<p><strong>Materials:</strong>
|
| 69 |
+
Cement: {{ forecast.forecast.material_cement }} tons,
|
| 70 |
+
Steel: {{ forecast.forecast.material_steel }} tons
|
| 71 |
+
</p>
|
| 72 |
+
<p><strong>Labour:</strong> {{ forecast.forecast.labour_count }} workers</p>
|
| 73 |
+
<p><strong>Confidence:</strong> {{ forecast.forecast.confidence * 100 }}%</p>
|
| 74 |
+
{% if forecast.alert_flag %}
|
| 75 |
+
<p class="alert">⚠️ Resource Alert: High material demand</p>
|
| 76 |
+
{% endif %}
|
| 77 |
+
<a href="{{ forecast.pdf_link }}" class="downloadFix button">Download PDF</a>
|
| 78 |
+
</div>
|
| 79 |
+
{% endfor %}
|
| 80 |
+
{% else %}
|
| 81 |
+
<p>No forecasts available.</p>
|
| 82 |
+
{% endif %}
|
| 83 |
+
</div>
|
| 84 |
</body>
|
| 85 |
+
</html>
|