Update templates/dashboard.html
Browse files- templates/dashboard.html +61 -179
templates/dashboard.html
CHANGED
|
@@ -1,184 +1,66 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
.status-good { background: #e6f4ea; color: #2e7d32; padding: 5px 10px; border-radius: 12px; display: inline-block; }
|
| 18 |
-
.status-alert { background: #fff3e0; color: #ef6c00; padding: 5px 10px; border-radius: 12px; display: inline-block; }
|
| 19 |
-
.trend-up { color: green; }
|
| 20 |
-
.trend-down { color: red; }
|
| 21 |
-
.trend-flat { color: gray; }
|
| 22 |
-
.score-circle { display: inline-block; width: 40px; height: 40px; line-height: 40px; text-align: center; border-radius: 50%; background: #e0e0e0; margin-right: 5px; }
|
| 23 |
-
.reports-section { display: flex; gap: 20px; }
|
| 24 |
-
.reports-section > div { flex: 1; }
|
| 25 |
-
.checkbox-label { margin-right: 20px; }
|
| 26 |
-
.btn { background: #1976d2; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; }
|
| 27 |
-
.btn:hover { background: #1565c0; }
|
| 28 |
-
</style>
|
| 29 |
-
</head>
|
| 30 |
-
<body>
|
| 31 |
-
<div class="container">
|
| 32 |
-
<h1>Vendor Performance Dashboard</h1>
|
| 33 |
-
<p>Monitor and manage subcontractor performance across projects</p>
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
<p>No leaderboard data available.</p>
|
| 84 |
-
{% endif %}
|
| 85 |
-
</div>
|
| 86 |
-
|
| 87 |
-
<!-- Performance Alerts -->
|
| 88 |
-
<div class="alerts">
|
| 89 |
-
<h2>Performance Alerts</h2>
|
| 90 |
-
<p>Vendors requiring attention</p>
|
| 91 |
-
{% if alert_logs %}
|
| 92 |
-
{% for log in alert_logs %}
|
| 93 |
-
<div style="margin-bottom: 10px;">
|
| 94 |
-
<span style="color: #ef6c00;">⚠️ {{ log.vendorLogName }}</span> - Overall: {{ log.scores.finalScore }}
|
| 95 |
-
<br>Quality: {{ log.scores.qualityScore }} | Timeliness: {{ log.scores.timelinessScore }}
|
| 96 |
-
<a href="#" style="margin-left: 10px; color: #1976d2;">Review</a>
|
| 97 |
-
</div>
|
| 98 |
-
{% endfor %}
|
| 99 |
-
{% else %}
|
| 100 |
-
<p>No vendors require attention at this time.</p>
|
| 101 |
-
{% endif %}
|
| 102 |
-
</div>
|
| 103 |
-
|
| 104 |
-
<!-- Top Performing Vendors -->
|
| 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>
|
| 129 |
-
<p>Generate and manage vendor performance reports</p>
|
| 130 |
-
<div class="reports-section">
|
| 131 |
-
<div>
|
| 132 |
-
<h3>Generate Vendor Report</h3>
|
| 133 |
-
<div style="margin-bottom: 10px;">
|
| 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;">
|
| 147 |
-
<label>Report Month</label><br>
|
| 148 |
-
<input type="text" value="May, 2025" readonly style="width: 100%; padding: 8px; margin-top: 5px;">
|
| 149 |
-
</div>
|
| 150 |
-
<div style="margin-bottom: 10px;">
|
| 151 |
-
<label>Include in Report</label><br>
|
| 152 |
-
<label class="checkbox-label"><input type="checkbox" checked> Quality Metrics</label>
|
| 153 |
-
<label class="checkbox-label"><input type="checkbox" checked> Timeliness</label>
|
| 154 |
-
<label class="checkbox-label"><input type="checkbox" checked> Safety Record</label>
|
| 155 |
-
<label class="checkbox-label"><input type="checkbox" checked> Communication</label>
|
| 156 |
-
<label class="checkbox-label"><input type="checkbox" checked> Incidents</label>
|
| 157 |
-
<label class="checkbox-label"><input type="checkbox" checked> Recommendations</label>
|
| 158 |
-
</div>
|
| 159 |
-
<button class="btn">Generate Report</button>
|
| 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>
|
| 179 |
-
</div>
|
| 180 |
-
</div>
|
| 181 |
-
</div>
|
| 182 |
-
</div>
|
| 183 |
-
</body>
|
| 184 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>Hugging Face Scoring Output</title>
|
| 5 |
+
<style>
|
| 6 |
+
body { font-family: Arial, sans-serif; margin: 20px; }
|
| 7 |
+
h1, h2 { color: #333; }
|
| 8 |
+
table { width: 100%; border-collapse: collapse; margin: 20px 0; }
|
| 9 |
+
th, td { padding: 12px; border: 1px solid #ddd; text-align: left; }
|
| 10 |
+
th { background-color: #f2f2f2; }
|
| 11 |
+
a { color: #1976d2; text-decoration: none; }
|
| 12 |
+
a:hover { text-decoration: underline; }
|
| 13 |
+
</style>
|
| 14 |
+
</head>
|
| 15 |
+
<body>
|
| 16 |
+
<h1>Hugging Face Scoring Output</h1>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
<h2>Vendor Logs</h2>
|
| 19 |
+
<table>
|
| 20 |
+
<tr>
|
| 21 |
+
<th>Vendor Log ID</th>
|
| 22 |
+
<th>Vendor Name</th>
|
| 23 |
+
<th>Work Completion %</th>
|
| 24 |
+
<th>Quality %</th>
|
| 25 |
+
<th>Incident Severity</th>
|
| 26 |
+
<th>Communication Count</th>
|
| 27 |
+
<th>Delay Days</th>
|
| 28 |
+
</tr>
|
| 29 |
+
{% for log in vendor_logs %}
|
| 30 |
+
<tr>
|
| 31 |
+
<td>{{ log.Vendor_Log_ID__c }}</td>
|
| 32 |
+
<td>{{ log.Vendor__r.Vendor_Name__c }}</td>
|
| 33 |
+
<td>{{ log.Work_Completion_Percentage__c }}</td>
|
| 34 |
+
<td>{{ log.Quality_Percentage__c }}</td>
|
| 35 |
+
<td>{{ log.Incident_Severity__c }}</td>
|
| 36 |
+
<td>{{ log.Communication_Count__c }}</td>
|
| 37 |
+
<td>{{ log.Delay_Days__c }}</td>
|
| 38 |
+
</tr>
|
| 39 |
+
{% endfor %}
|
| 40 |
+
</table>
|
| 41 |
|
| 42 |
+
<h2>Subcontractor Performance Scores</h2>
|
| 43 |
+
<table>
|
| 44 |
+
<tr>
|
| 45 |
+
<th>Vendor Log ID</th>
|
| 46 |
+
<th>Vendor Name</th>
|
| 47 |
+
<th>Quality Score</th>
|
| 48 |
+
<th>Timeliness Score</th>
|
| 49 |
+
<th>Safety Score</th>
|
| 50 |
+
<th>Communication Score</th>
|
| 51 |
+
<th>PDF Link</th>
|
| 52 |
+
</tr>
|
| 53 |
+
{% for score in subcontractor_scores %}
|
| 54 |
+
<tr>
|
| 55 |
+
<td>{{ score.Vendor_Log_ID__c }}</td>
|
| 56 |
+
<td>{{ score.Vendor_Name__c }}</td>
|
| 57 |
+
<td>{{ score.scores.qualityScore }}</td>
|
| 58 |
+
<td>{{ score.scores.timelinessScore }}</td>
|
| 59 |
+
<td>{{ score.scores.safetyScore }}</td>
|
| 60 |
+
<td>{{ score.scores.communicationScore }}</td>
|
| 61 |
+
<td><a href="{{ score.pdf_link }}" download>Download PDF</a></td>
|
| 62 |
+
</tr>
|
| 63 |
+
{% endfor %}
|
| 64 |
+
</table>
|
| 65 |
+
</body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
</html>
|