lokesh341 commited on
Commit
4f80726
·
verified ·
1 Parent(s): 76604ee

Update templates/dashboard.html

Browse files
Files changed (1) hide show
  1. templates/dashboard.html +61 -179
templates/dashboard.html CHANGED
@@ -1,184 +1,66 @@
1
  <!DOCTYPE html>
2
  <html>
3
- <head>
4
- <title>Subcontractor Performance Score App</title>
5
- <style>
6
- body { font-family: Arial, sans-serif; margin: 20px; background-color: #f5f7fa; }
7
- h1, h2 { color: #333; }
8
- .container { max-width: 1200px; margin: 0 auto; }
9
- .summary-cards { display: flex; gap: 20px; margin-bottom: 20px; }
10
- .card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); flex: 1; text-align: center; }
11
- .card h3 { margin: 0 0 10px; color: #555; }
12
- .card p { margin: 0; font-size: 24px; color: #333; }
13
- .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; }
14
- table { width: 100%; border-collapse: collapse; }
15
- th, td { padding: 12px; text-align: left; border-bottom: 1px solid #ddd; }
16
- th { background-color: #f2f2f2; }
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
- <!-- Summary Cards -->
36
- <div class="summary-cards">
37
- <div class="card">
38
- <h3>Total Vendors</h3>
39
- <p>{{ total_vendors }}</p>
40
- <small>+2 in last month</small>
41
- </div>
42
- <div class="card">
43
- <h3>Performance Alerts</h3>
44
- <p>{{ performance_alerts }}</p>
45
- <small>{{ percent_alerts }}% of vendors</small>
46
- </div>
47
- <div class="card">
48
- <h3>Top Performers</h3>
49
- <p>{{ top_performers }}</p>
50
- <small>{{ percent_top }}% of vendors</small>
51
- </div>
52
- <div class="card">
53
- <h3>Improving Vendors</h3>
54
- <p>{{ improving_vendors }}</p>
55
- <small>{{ percent_improving }}% of vendors</small>
56
- </div>
57
- </div>
58
 
59
- <!-- Leaderboard -->
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 -->
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>