Update templates/dashboard.html
Browse files- templates/dashboard.html +51 -201
templates/dashboard.html
CHANGED
|
@@ -60,24 +60,28 @@
|
|
| 60 |
<div class="leaderboard">
|
| 61 |
<h2>Vendor Leaderboard</h2>
|
| 62 |
<p>Top performing subcontractors this month</p>
|
| 63 |
-
|
| 64 |
-
<
|
| 65 |
-
<th>Rank</th>
|
| 66 |
-
<th>Vendor</th>
|
| 67 |
-
<th>Score</th>
|
| 68 |
-
<th>Trend</th>
|
| 69 |
-
<th>Status</th>
|
| 70 |
-
</tr>
|
| 71 |
-
{% for idx, log in top_logs %}
|
| 72 |
<tr>
|
| 73 |
-
<
|
| 74 |
-
<
|
| 75 |
-
<
|
| 76 |
-
<
|
| 77 |
-
<
|
| 78 |
</tr>
|
| 79 |
-
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
</div>
|
| 82 |
|
| 83 |
<!-- Performance Alerts -->
|
|
@@ -101,186 +105,24 @@
|
|
| 101 |
<div class="top-performers">
|
| 102 |
<h2>Top Performing Vendors</h2>
|
| 103 |
<p>Vendors with the highest performance scores this month</p>
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
<
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
{% endfor %}
|
| 115 |
-
</div>
|
| 116 |
-
</div>
|
| 117 |
-
|
| 118 |
-
<!-- Reports & Certifications -->
|
| 119 |
-
<div class="reports">
|
| 120 |
-
<h2>Reports & Certifications</h2>
|
| 121 |
-
<p>Generate and manage vendor performance reports</p>
|
| 122 |
-
<div class="reports-section">
|
| 123 |
-
<div>
|
| 124 |
-
<h3>Generate Vendor Report</h3>
|
| 125 |
-
<div style="margin-bottom: 10px;">
|
| 126 |
-
<label>Select Vendor</label><br>
|
| 127 |
-
<select style="width: 100%; padding: 8px; margin-top: 5px;">
|
| 128 |
-
<option>Choose a vendor</option>
|
| 129 |
-
{% for log in vendor_logs %}
|
| 130 |
-
<option>{{ log.vendorLogName }}</option>
|
| 131 |
-
{% endfor %}
|
| 132 |
-
</select>
|
| 133 |
-
</div>
|
| 134 |
-
<div style="margin-bottom: 10px;">
|
| 135 |
-
<label>Report Month</label><br>
|
| 136 |
-
<input type="text" value="May, 2025" readonly style="width: 100%; padding: 8px; margin-top: 5px;">
|
| 137 |
-
</div>
|
| 138 |
-
<div style="margin-bottom: 10px;">
|
| 139 |
-
<label>Include in Report</label><br>
|
| 140 |
-
<label class="checkbox-label"><input type="checkbox" checked> Quality Metrics</label>
|
| 141 |
-
<label class="checkbox-label"><input type="checkbox" checked> Timeliness</label>
|
| 142 |
-
<label class="checkbox-label"><input type="checkbox" checked> Safety Record</label>
|
| 143 |
-
<label class="checkbox-label"><input type="checkbox" checked> Communication</label>
|
| 144 |
-
<label class="checkbox-label"><input type="checkbox" checked> Incidents</label>
|
| 145 |
-
<label class="checkbox-label"><input type="checkbox" checked> Recommendations</label>
|
| 146 |
-
</div>
|
| 147 |
-
<button class="btn">Generate Report</button>
|
| 148 |
-
</div>
|
| 149 |
-
<div>
|
| 150 |
-
<h3>Recent Reports</h3>
|
| 151 |
-
{% for log in sorted_logs[:5] %}
|
| 152 |
-
<div style="margin-bottom: 10px;">
|
| 153 |
-
📄 {{ log.vendorLogName }} - Monthly Performance
|
| 154 |
-
<span style="float: right;">
|
| 155 |
-
<small>5/1/2025</small>
|
| 156 |
-
<a href="#" style="margin-left: 10px;">⬇</a>
|
| 157 |
-
</span>
|
| 158 |
</div>
|
| 159 |
{% endfor %}
|
| 160 |
-
<small>Last report generated: 3 hours ago</small>
|
| 161 |
-
<br>
|
| 162 |
-
<a href="#" style="color: #1976d2;">View All Reports</a>
|
| 163 |
</div>
|
| 164 |
-
</div>
|
| 165 |
-
</div>
|
| 166 |
-
</div>
|
| 167 |
-
</body>
|
| 168 |
-
</html><html>
|
| 169 |
-
<head>
|
| 170 |
-
<title>Subcontractor Performance Score App</title>
|
| 171 |
-
<style>
|
| 172 |
-
body { font-family: Arial, sans-serif; margin: 20px; background-color: #f5f7fa; }
|
| 173 |
-
h1, h2 { color: #333; }
|
| 174 |
-
.container { max-width: 1200px; margin: 0 auto; }
|
| 175 |
-
.summary-cards { display: flex; gap: 20px; margin-bottom: 20px; }
|
| 176 |
-
.card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); flex: 1; text-align: center; }
|
| 177 |
-
.card h3 { margin: 0 0 10px; color: #555; }
|
| 178 |
-
.card p { margin: 0; font-size: 24px; color: #333; }
|
| 179 |
-
.leaderboard, .alerts, .top-performers, .reports { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-bottom: 20px; }
|
| 180 |
-
table { width: 100%; border-collapse: collapse; }
|
| 181 |
-
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #ddd; }
|
| 182 |
-
th { background-color: #f2f2f2; }
|
| 183 |
-
.status-good { background: #e6f4ea; color: #2e7d32; padding: 5px 10px; border-radius: 12px; display: inline-block; }
|
| 184 |
-
.status-alert { background: #fff3e0; color: #ef6c00; padding: 5px 10px; border-radius: 12px; display: inline-block; }
|
| 185 |
-
.trend-up { color: green; }
|
| 186 |
-
.trend-down { color: red; }
|
| 187 |
-
.trend-flat { color: gray; }
|
| 188 |
-
.score-circle { display: inline-block; width: 40px; height: 40px; line-height: 40px; text-align: center; border-radius: 50%; background: #e0e0e0; margin-right: 5px; }
|
| 189 |
-
.reports-section { display: flex; gap: 20px; }
|
| 190 |
-
.reports-section > div { flex: 1; }
|
| 191 |
-
.checkbox-label { margin-right: 20px; }
|
| 192 |
-
.btn { background: #1976d2; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; }
|
| 193 |
-
.btn:hover { background: #1565c0; }
|
| 194 |
-
</style>
|
| 195 |
-
</head>
|
| 196 |
-
<body>
|
| 197 |
-
<div class="container">
|
| 198 |
-
<h1>Vendor Performance Dashboard</h1>
|
| 199 |
-
<p>Monitor and manage subcontractor performance across projects</p>
|
| 200 |
-
|
| 201 |
-
<!-- Summary Cards -->
|
| 202 |
-
<div class="summary-cards">
|
| 203 |
-
<div class="card">
|
| 204 |
-
<h3>Total Vendors</h3>
|
| 205 |
-
<p>{{ total_vendors }}</p>
|
| 206 |
-
<small>+2 in last month</small>
|
| 207 |
-
</div>
|
| 208 |
-
<div class="card">
|
| 209 |
-
<h3>Performance Alerts</h3>
|
| 210 |
-
<p>{{ performance_alerts }}</p>
|
| 211 |
-
<small>{{ percent_alerts }}% of vendors</small>
|
| 212 |
-
</div>
|
| 213 |
-
<div class="card">
|
| 214 |
-
<h3>Top Performers</h3>
|
| 215 |
-
<p>{{ top_performers }}</p>
|
| 216 |
-
<small>{{ percent_top }}% of vendors</small>
|
| 217 |
-
</div>
|
| 218 |
-
<div class="card">
|
| 219 |
-
<h3>Improving Vendors</h3>
|
| 220 |
-
<p>{{ improving_vendors }}</p>
|
| 221 |
-
<small>{{ percent_improving }}% of vendors</small>
|
| 222 |
-
</div>
|
| 223 |
-
</div>
|
| 224 |
-
|
| 225 |
-
<!-- Leaderboard -->
|
| 226 |
-
<div class="leaderboard">
|
| 227 |
-
<h2>Vendor Leaderboard</h2>
|
| 228 |
-
<p>Top performing subcontractors this month</p>
|
| 229 |
-
<table>
|
| 230 |
-
<tr>
|
| 231 |
-
<th>Rank</th>
|
| 232 |
-
<th>Vendor</th>
|
| 233 |
-
<th>Score</th>
|
| 234 |
-
<th>Trend</th>
|
| 235 |
-
<th>Status</th>
|
| 236 |
-
</tr>
|
| 237 |
-
{% for idx, log in top_logs %}
|
| 238 |
-
<tr>
|
| 239 |
-
<td>#{{ idx }}</td>
|
| 240 |
-
<td>{{ log.vendorLogName }}</td>
|
| 241 |
-
<td>{{ log.scores.finalScore }}</td>
|
| 242 |
-
<td class="{{ log.trend }}">{{ log.trend_symbol }}</td>
|
| 243 |
-
<td><span class="{{ log.status_class }}">{{ log.status_text }}</span></td>
|
| 244 |
-
</tr>
|
| 245 |
-
{% endfor %}
|
| 246 |
-
</table>
|
| 247 |
-
</div>
|
| 248 |
-
|
| 249 |
-
<!-- Performance Alerts -->
|
| 250 |
-
<div class="alerts">
|
| 251 |
-
<h2>Performance Alerts</h2>
|
| 252 |
-
<p>Vendors requiring attention</p>
|
| 253 |
-
{% if alert_logs %}
|
| 254 |
-
{% for log in alert_logs %}
|
| 255 |
-
<div style="margin-bottom: 10px;">
|
| 256 |
-
<span style="color: #ef6c00;">⚠️ {{ log.vendorLogName }}</span> - Overall: {{ log.scores.finalScore }}
|
| 257 |
-
<br>Quality: {{ log.scores.qualityScore }} | Timeliness: {{ log.scores.timelinessScore }}
|
| 258 |
-
<a href="#" style="margin-left: 10px; color: #1976d2;">Review</a>
|
| 259 |
-
</div>
|
| 260 |
-
{% endfor %}
|
| 261 |
{% else %}
|
| 262 |
-
<p>No
|
| 263 |
{% endif %}
|
| 264 |
</div>
|
| 265 |
|
| 266 |
-
<!-- Top Performing Vendors -->
|
| 267 |
-
<div class="top-performers">
|
| 268 |
-
<h2>Top Performing Vendors</h2>
|
| 269 |
-
<p>Vendors with the highest performance scores this month</p>
|
| 270 |
-
<div style="display: flex; gap: 20px; flex-wrap: wrap;">
|
| 271 |
-
{% for log in top_performing_logs %}
|
| 272 |
-
<div style="flex: 1; min-width: 200px;">
|
| 273 |
-
<p>{{ log.vendorLogName }}<br><small>Last updated: 5/1/2025</small></p>
|
| 274 |
-
<span class="score-circle" style="background: #e0e0e0;">{{ log.scores.finalScore }}</span> Overall
|
| 275 |
-
<span class="score-circle" style="background: #e0e0e0;">{{ log.scores.qualityScore }}</span> Quality
|
| 276 |
-
<span class="score-circle" style="background: #e0e0e0;">{{ log.scores.timelinessScore }}</span> Time
|
| 277 |
-
<span class="score-circle" style="background: #e0e0e0;">{{ log.scores.safetyScore }}</span> Safety
|
| 278 |
-
<span class="score-circle" style="background: #e0e0e0;">{{ log.scores.communicationScore }}</span> Comm
|
| 279 |
-
</div>
|
| 280 |
-
{% endfor %}
|
| 281 |
-
</div>
|
| 282 |
-
</div>
|
| 283 |
-
|
| 284 |
<!-- Reports & Certifications -->
|
| 285 |
<div class="reports">
|
| 286 |
<h2>Reports & Certifications</h2>
|
|
@@ -292,9 +134,13 @@
|
|
| 292 |
<label>Select Vendor</label><br>
|
| 293 |
<select style="width: 100%; padding: 8px; margin-top: 5px;">
|
| 294 |
<option>Choose a vendor</option>
|
| 295 |
-
{%
|
| 296 |
-
|
| 297 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
</select>
|
| 299 |
</div>
|
| 300 |
<div style="margin-bottom: 10px;">
|
|
@@ -314,15 +160,19 @@
|
|
| 314 |
</div>
|
| 315 |
<div>
|
| 316 |
<h3>Recent Reports</h3>
|
| 317 |
-
{%
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
<
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 326 |
<small>Last report generated: 3 hours ago</small>
|
| 327 |
<br>
|
| 328 |
<a href="#" style="color: #1976d2;">View All Reports</a>
|
|
|
|
| 60 |
<div class="leaderboard">
|
| 61 |
<h2>Vendor Leaderboard</h2>
|
| 62 |
<p>Top performing subcontractors this month</p>
|
| 63 |
+
{% if top_logs %}
|
| 64 |
+
<table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
<tr>
|
| 66 |
+
<th>Rank</th>
|
| 67 |
+
<th>Vendor</th>
|
| 68 |
+
<th>Score</th>
|
| 69 |
+
<th>Trend</th>
|
| 70 |
+
<th>Status</th>
|
| 71 |
</tr>
|
| 72 |
+
{% for log in top_logs %}
|
| 73 |
+
<tr>
|
| 74 |
+
<td>#{{ log.idx }}</td>
|
| 75 |
+
<td>{{ log.vendorLogName }}</td>
|
| 76 |
+
<td>{{ log.scores.finalScore }}</td>
|
| 77 |
+
<td class="{{ log.trend }}">{{ log.trend_symbol }}</td>
|
| 78 |
+
<td><span class="{{ log.status_class }}">{{ log.status_text }}</span></td>
|
| 79 |
+
</tr>
|
| 80 |
+
{% endfor %}
|
| 81 |
+
</table>
|
| 82 |
+
{% else %}
|
| 83 |
+
<p>No leaderboard data available.</p>
|
| 84 |
+
{% endif %}
|
| 85 |
</div>
|
| 86 |
|
| 87 |
<!-- Performance Alerts -->
|
|
|
|
| 105 |
<div class="top-performers">
|
| 106 |
<h2>Top Performing Vendors</h2>
|
| 107 |
<p>Vendors with the highest performance scores this month</p>
|
| 108 |
+
{% if top_performing_logs %}
|
| 109 |
+
<div style="display: flex; gap: 20px; flex-wrap: wrap;">
|
| 110 |
+
{% for log in top_performing_logs %}
|
| 111 |
+
<div style="flex: 1; min-width: 200px;">
|
| 112 |
+
<p>{{ log.vendorLogName }}<br><small>Last updated: 5/1/2025</small></p>
|
| 113 |
+
<span class="score-circle" style="background: #e0e0e0;">{{ log.scores.finalScore }}</span> Overall
|
| 114 |
+
<span class="score-circle" style="background: #e0e0e0;">{{ log.scores.qualityScore }}</span> Quality
|
| 115 |
+
<span class="score-circle" style="background: #e0e0e0;">{{ log.scores.timelinessScore }}</span> Time
|
| 116 |
+
<span class="score-circle" style="background: #e0e0e0;">{{ log.scores.safetyScore }}</span> Safety
|
| 117 |
+
<span class="score-circle" style="background: #e0e0e0;">{{ log.scores.communicationScore }}</span> Comm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
</div>
|
| 119 |
{% endfor %}
|
|
|
|
|
|
|
|
|
|
| 120 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
{% else %}
|
| 122 |
+
<p>No top performing vendors available.</p>
|
| 123 |
{% endif %}
|
| 124 |
</div>
|
| 125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
<!-- Reports & Certifications -->
|
| 127 |
<div class="reports">
|
| 128 |
<h2>Reports & Certifications</h2>
|
|
|
|
| 134 |
<label>Select Vendor</label><br>
|
| 135 |
<select style="width: 100%; padding: 8px; margin-top: 5px;">
|
| 136 |
<option>Choose a vendor</option>
|
| 137 |
+
{% if vendor_logs %}
|
| 138 |
+
{% for log in vendor_logs %}
|
| 139 |
+
<option>{{ log.vendorLogName }}</option>
|
| 140 |
+
{% endfor %}
|
| 141 |
+
{% else %}
|
| 142 |
+
<option>No vendors available</option>
|
| 143 |
+
{% endif %}
|
| 144 |
</select>
|
| 145 |
</div>
|
| 146 |
<div style="margin-bottom: 10px;">
|
|
|
|
| 160 |
</div>
|
| 161 |
<div>
|
| 162 |
<h3>Recent Reports</h3>
|
| 163 |
+
{% if sorted_logs %}
|
| 164 |
+
{% for log in sorted_logs[:5] %}
|
| 165 |
+
<div style="margin-bottom: 10px;">
|
| 166 |
+
📄 {{ log.vendorLogName }} - Monthly Performance
|
| 167 |
+
<span style="float: right;">
|
| 168 |
+
<small>5/1/2025</small>
|
| 169 |
+
<a href="#" style="margin-left: 10px;">⬇</a>
|
| 170 |
+
</span>
|
| 171 |
+
</div>
|
| 172 |
+
{% endfor %}
|
| 173 |
+
{% else %}
|
| 174 |
+
<p>No recent reports available.</p>
|
| 175 |
+
{% endif %}
|
| 176 |
<small>Last report generated: 3 hours ago</small>
|
| 177 |
<br>
|
| 178 |
<a href="#" style="color: #1976d2;">View All Reports</a>
|