lokesh341 commited on
Commit
64c90a4
·
verified ·
1 Parent(s): 9c1061e

Update templates/dashboard.html

Browse files
Files changed (1) hide show
  1. templates/dashboard.html +0 -248
templates/dashboard.html CHANGED
@@ -1,5 +1,4 @@
1
  <!DOCTYPE html>
2
- <html><!DOCTYPE html>
3
  <html>
4
  <head>
5
  <title>Subcontractor Performance Score App</title>
@@ -182,251 +181,4 @@
182
  </div>
183
  </div>
184
  </body>
185
- </html><!DOCTYPE html>
186
- <html>
187
- <head>
188
- <title>Subcontractor Performance Score App</title>
189
- <style>
190
- body { font-family: Arial, sans-serif; margin: 20px; background-color: #f5f7fa; }
191
- h1, h2 { color: #333; }
192
- .container { max-width: 1200px; margin: 0 auto; }
193
- .summary-cards { display: flex; gap: 20px; margin-bottom: 20px; }
194
- .card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); flex: 1; text-align: center; }
195
- .card h3 { margin: 0 0 10px; color: #555; }
196
- .card p { margin: 0; font-size: 24px; color: #333; }
197
- .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; }
198
- table { width: 100%; border-collapse: collapse; }
199
- th, td { padding: 12px; text-align: left; border-bottom: 1px solid #ddd; }
200
- th { background-color: #f2f2f2; }
201
- .status-good { background: #e6f4ea; color: #2e7d32; padding: 5px 10px; border-radius: 12px; display: inline-block; }
202
- .status-alert { background: #fff3e0; color: #ef6c00; padding: 5px 10px; border-radius: 12px; display: inline-block; }
203
- .trend-up { color: green; }
204
- .trend-down { color: red; }
205
- .trend-flat { color: gray; }
206
- .score-circle { display: inline-block; width: 40px; height: 40px; line-height: 40px; text-align: center; border-radius: 50%; background: #e0e0e0; margin-right: 5px; }
207
- .reports-section { display: flex; gap: 20px; }
208
- .reports-section > div { flex: 1; }
209
- .checkbox-label { margin-right: 20px; }
210
- .btn { background: #1976d2; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; }
211
- .btn:hover { background: #1565c0; }
212
- </style>
213
- </head>
214
- <body>
215
- <div class="container">
216
- <h1>Vendor Performance Dashboard</h1>
217
- <p>Monitor and manage subcontractor performance across projects</p>
218
-
219
- <!-- Summary Cards -->
220
- <div class="summary-cards">
221
- <div class="card">
222
- <h3>Total Vendors</h3>
223
- <p>{{ total_vendors }}</p>
224
- <small>+2 in last month</small>
225
- </div>
226
- <div class="card">
227
- <h3>Performance Alerts</h3>
228
- <p>{{ performance_alerts }}</p>
229
- <small>{{ percent_alerts }}% of vendors</small>
230
- </div>
231
- <div class="card">
232
- <h3>Top Performers</h3>
233
- <p>{{ top_performers }}</p>
234
- <small>{{ percent_top }}% of vendors</small>
235
- </div>
236
- <div class="card">
237
- <h3>Improving Vendors</h3>
238
- <p>{{ improving_vendors }}</p>
239
- <small>{{ percent_improving }}% of vendors</small>
240
- </div>
241
- </div>
242
-
243
- <!-- Leaderboard -->
244
- <div class="leaderboard">
245
- <h2>Vendor Leaderboard</h2>
246
- <p>Top performing subcontractors this month</p>
247
- {% if top_logs %}
248
- <table>
249
- <tr>
250
- <th>Rank</th>
251
- <th>Vendor</th>
252
- <th>Score</th>
253
- <th>Trend</th>
254
- <th>Status</th>
255
- </tr>
256
- {% for log in top_logs %}
257
- <tr>
258
- <td>#{{ log.idx }}</td>
259
- <td>{{ log.vendorLogName }}</td>
260
- <td>{{ log.scores.finalScore }}</td>
261
- <td class="{{ log.trend }}">{{ log.trend_symbol }}</td>
262
- <td><span class="{{ log.status_class }}">{{ log.status_text }}</span></td>
263
- </tr>
264
- {% endfor %}
265
- </table>
266
- {% else %}
267
- <p>No leaderboard data available.</p>
268
- {% endif %}
269
- </div>
270
-
271
- <!-- Performance Alerts -->
272
- <div class="alerts">
273
- <h2>Performance Alerts</h2>
274
- <p>Vendors requiring attention</p>
275
- {% if alert_logs %}
276
- {% for log in alert_logs %}
277
- <div style="margin-bottom: 10px;">
278
- <span style="color: #ef6c00;">⚠️ {{ log.vendorLogName }}</span> - Overall: {{ log.scores.finalScore }}
279
- <br>Quality: {{ log.scores.qualityScore }} | Timeliness: {{ log.scores.timelinessScore }}
280
- <a href="#" style="margin-left: 10px; color: #1976d2;">Review</a>
281
- </div>
282
- {% endfor %}
283
- {% else %}
284
- <p>No vendors require attention at this time.</p>
285
- {% endif %}
286
- </div>
287
-
288
- <!-- Top Performing Vendors -->
289
- <div class="top-performers">
290
- <h2>Top Performing Vendors</h2>
291
- <p>Vendors with the highest performance scores this month</p>
292
- {% if top_performing_logs %}
293
- <div style="display: flex; gap: 20px; flex-wrap: wrap;">
294
- {% for log in top_performing_logs %}
295
- <div style="flex: 1; min-width: 200px;">
296
- <p>{{ log.vendorLogName }}<br><small>Last updated: 5/1/2025</small></p>
297
- <span class="score-circle" style="background: #e0e0e0;">{{ log.scores.finalScore }}</span> Overall
298
- <span class="score-circle" style="background: #e0e0e0;">{{ log.scores.qualityScore }}</span> Quality
299
- <span class="score-circle" style="background: #e0e0e0;">{{ log.scores.timelinessScore }}</span> Time
300
- <span class="score-circle" style="background: #e0e0e0;">{{ log.scores.safetyScore }}</span> Safety
301
- <span class="score-circle" style="background: #e0e0e0;">{{ log.scores.communicationScore }}</span> Comm
302
- </div>
303
- {% endfor %}
304
- </div>
305
- {% else %}
306
- <p>No top performing vendors available.</p>
307
- {% endif %}
308
- </div>
309
-
310
- <!-- Reports & Certifications -->
311
- <div class="reports">
312
- <h2>Reports & Certifications</h2>
313
- <p>Generate and manage vendor performance reports</p>
314
- <div class="reports-section">
315
- <div>
316
- <h3>Generate Vendor Report</h3>
317
- <div style="margin-bottom: 10px;">
318
- <label>Select Vendor</label><br>
319
- <select style="width: 100%; padding: 8px; margin-top: 5px;">
320
- <option>Choose a vendor</option>
321
- {% if vendor_logs %}
322
- {% for log in vendor_logs %}
323
- <option>{{ log.vendorLogName }}</option>
324
- {% endfor %}
325
- {% else %}
326
- <option>No vendors available</option>
327
- {% endif %}
328
- </select>
329
- </div>
330
- <div style="margin-bottom: 10px;">
331
- <label>Report Month</label><br>
332
- <input type="text" value="May, 2025" readonly style="width: 100%; padding: 8px; margin-top: 5px;">
333
- </div>
334
- <div style="margin-bottom: 10px;">
335
- <label>Include in Report</label><br>
336
- <label class="checkbox-label"><input type="checkbox" checked> Quality Metrics</label>
337
- <label class="checkbox-label"><input type="checkbox" checked> Timeliness</label>
338
- <label class="checkbox-label"><input type="checkbox" checked> Safety Record</label>
339
- <label class="checkbox-label"><input type="checkbox" checked> Communication</label>
340
- <label class="checkbox-label"><input type="checkbox" checked> Incidents</label>
341
- <label class="checkbox-label"><input type="checkbox" checked> Recommendations</label>
342
- </div>
343
- <button class="btn">Generate Report</button>
344
- </div>
345
- <div>
346
- <h3>Recent Reports</h3>
347
- {% if sorted_logs %}
348
- {% for log in sorted_logs[:5] %}
349
- <div style="margin-bottom: 10px;">
350
- 📄 {{ log.vendorLogName }} - Monthly Performance
351
- <span style="float: right;">
352
- <small>5/1/2025</small>
353
- <a href="#" style="margin-left: 10px;">⬇</a>
354
- </span>
355
- </div>
356
- {% endfor %}
357
- {% else %}
358
- <p>No recent reports available.</p>
359
- {% endif %}
360
- <small>Last report generated: 3 hours ago</small>
361
- <br>
362
- <a href="#" style="color: #1976d2;">View All Reports</a>
363
- </div>
364
- </div>
365
- </div>
366
- </div>
367
- </body>
368
- </html>
369
- <head>
370
- <title>Hugging Face Scoring Output</title>
371
- <style>
372
- body { font-family: Arial, sans-serif; margin: 20px; }
373
- h1, h2 { color: #333; }
374
- table { width: 100%; border-collapse: collapse; margin: 20px 0; }
375
- th, td { padding: 12px; border: 1px solid #ddd; text-align: left; }
376
- th { background-color: #f2f2f2; }
377
- a { color: #1976d2; text-decoration: none; }
378
- a:hover { text-decoration: underline; }
379
- </style>
380
- </head>
381
- <body>
382
- <h1>Hugging Face Scoring Output</h1>
383
-
384
- <h2>Vendor Logs</h2>
385
- <table>
386
- <tr>
387
- <th>Vendor Log ID</th>
388
- <th>Vendor Name</th>
389
- <th>Work Completion %</th>
390
- <th>Quality %</th>
391
- <th>Incident Severity</th>
392
- <th>Communication Count</th>
393
- <th>Delay Days</th>
394
- </tr>
395
- {% for log in vendor_logs %}
396
- <tr>
397
- <td>{{ log.Vendor_Log_ID__c or 'N/A' }}</td>
398
- <td>{{ log.Vendor__r.Vendor_Name__c or 'N/A' }}</td>
399
- <td>{{ log.Work_Completion_Percentage__c if log.Work_Completion_Percentage__c is not none else 'N/A' }}</td>
400
- <td>{{ log.Quality_Percentage__c if log.Quality_Percentage__c is not none else 'N/A' }}</td>
401
- <td>{{ log.Incident_Severity__c or 'None' }}</td>
402
- <td>{{ log.Communication_Count__c if log.Communication_Count__c is not none else '0' }}</td>
403
- <td>{{ log.Delay_Days__c if log.Delay_Days__c is not none else '0' }}</td>
404
- </tr>
405
- {% endfor %}
406
- </table>
407
-
408
- <h2>Subcontractor Performance Scores</h2>
409
- <table>
410
- <tr>
411
- <th>Vendor Log ID</th>
412
- <th>Vendor Name</th>
413
- <th>Quality Score</th>
414
- <th>Timeliness Score</th>
415
- <th>Safety Score</th>
416
- <th>Communication Score</th>
417
- <th>PDF Link</th>
418
- </tr>
419
- {% for score in subcontractor_scores %}
420
- <tr>
421
- <td>{{ score.Vendor_Log_ID__c or 'N/A' }}</td>
422
- <td>{{ score.Vendor_Name__c or 'N/A' }}</td>
423
- <td>{{ score.scores.qualityScore }}</td>
424
- <td>{{ score.scores.timelinessScore }}</td>
425
- <td>{{ score.scores.safetyScore }}</td>
426
- <td>{{ score.scores.communicationScore }}</td>
427
- <td><a href="{{ score.pdf_link }}" download>Download PDF</a></td>
428
- </tr>
429
- {% endfor %}
430
- </table>
431
- </body>
432
  </html>
 
1
  <!DOCTYPE html>
 
2
  <html>
3
  <head>
4
  <title>Subcontractor Performance Score App</title>
 
181
  </div>
182
  </div>
183
  </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  </html>