-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathperformance.html
More file actions
383 lines (363 loc) · 17.7 KB
/
performance.html
File metadata and controls
383 lines (363 loc) · 17.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Performance — Simpatico HR</title>
<link rel="stylesheet" href="hr-modules.css">
<style>
.review-card {
background: var(--hr-bg-card); border: 1px solid var(--hr-border);
border-radius: var(--hr-radius-lg); padding: 20px;
transition: var(--hr-transition); cursor: pointer;
}
.review-card:hover { border-color: var(--hr-border-light); }
.review-card .rc-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.review-card .emp-row { display:flex; align-items:center; gap:10px; }
.score-display {
font-family: var(--hr-font-display); font-size: 28px; font-weight: 800;
color: var(--hr-primary); line-height: 1;
}
.score-display small { font-size:14px; color:var(--hr-text-muted); font-weight:400; }
.goal-item {
display:flex; align-items:center; gap:12px; padding:10px 0;
border-bottom: 1px solid rgba(30,45,69,.4);
}
.goal-item:last-child { border-bottom:none; }
.goal-status-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.rating-stars { display:flex; gap:4px; }
.rating-star {
width:28px; height:28px; cursor:pointer; color:var(--hr-border);
transition: color .15s;
}
.rating-star.filled { color:#f59e0b; }
.rating-star:hover, .rating-star:hover ~ .rating-star { color:var(--hr-border); }
.rating-stars:hover .rating-star { color:#f59e0b; }
.rating-stars .rating-star:hover ~ .rating-star { color:var(--hr-border); }
</style>
<script>
if (window.self !== window.top) {
document.addEventListener("DOMContentLoaded", function() {
var shell = document.querySelector(".hr-shell");
if (shell) { shell.style.gridTemplateColumns = "1fr"; shell.style.gridTemplateRows = "1fr"; }
var topbar = document.querySelector(".hr-topbar");
if (topbar) topbar.style.display = "none";
var sidebar = document.querySelector(".hr-sidebar");
if (sidebar) sidebar.style.display = "none";
var main = document.querySelector(".hr-main");
if (main) { main.style.gridColumn = "1"; main.style.padding = "20px"; }
});
}
</script></head>
<body class="hr-module">
<div class="hr-shell">
<header class="hr-topbar">
<a href="/dashboard/hr.html" class="hr-topbar-brand">
<img src="favicon-96x96.png" style="width:24px;height:24px;margin-right:10px;border-radius:4px">Simpatico<span>HR</span>
</a>
<div class="hr-topbar-right">
<div class="hr-avatar" id="user-avatar">U</div>
</div>
</header>
<nav class="hr-sidebar">
<div class="hr-nav-section">Core HR</div>
<a class="hr-nav-item" href="/employees.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/></svg>
Employees
</a>
<a class="hr-nav-item" href="/onboarding.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/></svg>
Onboarding
</a>
<a class="hr-nav-item" href="/training.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>
Training
</a>
<a class="hr-nav-item active" href="/performance.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/></svg>
Performance
</a>
<div class="hr-nav-section" style="margin-top:8px">Operations</div>
<a class="hr-nav-item" href="/hr-ops.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="3" width="20" height="14" rx="2"/></svg>
HR Ops
</a>
<a class="hr-nav-item" href="/payroll.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="1" x2="12" y2="23"/><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></svg>
Payroll
</a>
<div class="hr-nav-section" style="margin-top:8px">Intelligence</div>
<a class="hr-nav-item" href="/analytics.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="20" x2="18" y2="10"/><line x1="12" y1="20" x2="12" y2="4"/><line x1="6" y1="20" x2="6" y2="14"/></svg>
Analytics
</a>
<a class="hr-nav-item" href="/ai-assistant.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/></svg>
AI Assistant
</a>
<div class="hr-nav-section" style="margin-top:8px">Automation</div>
<a class="hr-nav-item" href="/hr-automation.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>
HR Rules
</a>
<a class="hr-nav-item" href="/ats-automation.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 8v4l3 3"/></svg>
ATS Engine
</a>
</nav>
<main class="hr-main">
<div class="hr-page-header">
<div class="hr-page-title">Performance Management
<small>Reviews, goals, and growth tracking</small>
</div>
<div class="hr-page-actions">
<button class="hr-btn hr-btn-secondary" onclick="openGoalsModal()">Manage Goals</button>
<button class="hr-btn hr-btn-primary" onclick="openReviewCycleModal()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width:15px;height:15px"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
Start Review Cycle
</button>
</div>
</div>
<!-- Stats -->
<div class="hr-stats-grid">
<div class="hr-stat-card" style="--card-accent:#00c4ff">
<div class="label">Active Cycles</div>
<div class="value" id="stat-cycles"></div>
<div class="trend neutral">Review periods open</div>
<div class="icon" style="--icon-bg:rgba(0,196,255,.1)"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/></svg></div>
</div>
<div class="hr-stat-card" style="--card-accent:#10b981">
<div class="label">Avg Score</div>
<div class="value" id="stat-avg-score"></div>
<div class="trend up" id="stat-avg-sub">This cycle</div>
<div class="icon" style="--icon-bg:rgba(16,185,129,.1)"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg></div>
</div>
<div class="hr-stat-card" style="--card-accent:#f59e0b">
<div class="label">Pending Reviews</div>
<div class="value" id="stat-pending"></div>
<div class="trend down">Awaiting submission</div>
<div class="icon" style="--icon-bg:rgba(245,158,11,.1)"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg></div>
</div>
<div class="hr-stat-card" style="--card-accent:#a78bfa">
<div class="label">Goals Achieved</div>
<div class="value" id="stat-goals"><span style="font-size:18px">%</span></div>
<div class="trend up">Q completion rate</div>
<div class="icon" style="--icon-bg:rgba(167,139,250,.1)"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="8 12 11 15 16 9"/></svg></div>
</div>
</div>
<div class="hr-tabs" id="perf-tabs">
<button class="hr-tab active" onclick="switchPerfTab(this,'tab-reviews')">Reviews</button>
<button class="hr-tab" onclick="switchPerfTab(this,'tab-checkins')">Check-ins</button>
<button class="hr-tab" onclick="switchPerfTab(this,'tab-kudos')">Peer Kudos</button>
<button class="hr-tab" onclick="switchPerfTab(this,'tab-goals')">Goals</button>
<button class="hr-tab" onclick="switchPerfTab(this,'tab-trends')">Trends</button>
<button class="hr-tab" onclick="switchPerfTab(this,'tab-nine-box')">9-Box Grid</button>
</div>
<!-- Reviews Tab -->
<div id="tab-reviews">
<div style="display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap">
<div class="hr-search">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
<input type="text" placeholder="Search reviews" id="review-search" oninput="filterReviews()">
</div>
<select class="hr-select" id="cycle-filter" onchange="filterReviews()" style="width:auto;min-width:160px">
<option value="">All Cycles</option>
</select>
<select class="hr-select" id="review-status-filter" onchange="filterReviews()" style="width:auto;min-width:140px">
<option value="">All Statuses</option>
<option value="draft">Draft</option>
<option value="submitted">Submitted</option>
<option value="completed">Completed</option>
</select>
</div>
<div id="reviews-list" style="display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:16px"></div>
</div>
<!-- Goals Tab -->
<div id="tab-goals" style="display:none">
<div style="display:flex;justify-content:flex-end;margin-bottom:16px">
<button class="hr-btn hr-btn-primary hr-btn-sm" onclick="openAddGoalModal()">Add Goal</button>
</div>
<div class="hr-table-wrap">
<table class="hr-table">
<thead><tr>
<th>Employee</th><th>Goal</th><th>Period</th><th>Progress</th><th>Status</th><th>Actions</th>
</tr></thead>
<tbody id="goals-tbody"></tbody>
</table>
</div>
</div>
<!-- Check-ins Tab -->
<div id="tab-checkins" style="display:none">
<div style="display:flex;justify-content:flex-end;margin-bottom:16px">
<button class="hr-btn hr-btn-primary hr-btn-sm" onclick="openCheckinModal()">Record Check-in</button>
</div>
<div id="checkins-list" style="display:flex;flex-direction:column;gap:12px;"></div>
</div>
<!-- Kudos Tab -->
<div id="tab-kudos" style="display:none">
<div style="display:flex;justify-content:flex-end;margin-bottom:16px">
<button class="hr-btn hr-btn-primary hr-btn-sm" onclick="openKudosModal()">Give High Five ✋</button>
</div>
<div id="kudos-list" style="display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:16px"></div>
</div>
<!-- 9-Box Grid -->
<div id="tab-nine-box" style="display:none">
<p style="color:var(--hr-text-secondary);margin-bottom:20px;font-size:14px">Performance vs Potential matrix — drag employees to reposition</p>
<div id="nine-box-grid" style="display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,140px);gap:2px;max-width:700px"></div>
</div>
<!-- Trends Tab -->
<div id="tab-trends" style="display:none">
<div class="hr-card" style="margin-bottom:20px;">
<div class="hr-card-head"><h3>Company Performance Score Trend (Cycle over Cycle)</h3></div>
<div style="position:relative;height:350px;width:100%;">
<canvas id="score-trend-chart"></canvas>
</div>
</div>
</div>
</main>
</div>
<!-- Review Cycle Modal -->
<div class="hr-modal-overlay" id="review-cycle-modal">
<div class="hr-modal">
<div class="hr-modal-head">
<h2>Start Review Cycle</h2>
<button class="hr-modal-close" onclick="closeModal('review-cycle-modal')">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
</button>
</div>
<div class="hr-form-group">
<label class="hr-label">Cycle Name *</label>
<input class="hr-input" id="cycle-name" placeholder="e.g. Q2 2026 Performance Review">
</div>
<div class="hr-grid-2">
<div class="hr-form-group">
<label class="hr-label">Start Date</label>
<input class="hr-input" type="date" id="cycle-start">
</div>
<div class="hr-form-group">
<label class="hr-label">End Date</label>
<input class="hr-input" type="date" id="cycle-end">
</div>
</div>
<div class="hr-form-group">
<label class="hr-label">Review Type</label>
<select class="hr-select" id="cycle-type">
<option value="annual">Annual</option>
<option value="mid_year">Mid-Year</option>
<option value="quarterly">Quarterly</option>
<option value="probation">Probation</option>
<option value="360">360</option>
</select>
</div>
<div class="hr-form-group">
<label class="hr-label">Scope</label>
<select class="hr-select" id="cycle-scope">
<option value="all">All Employees</option>
<option value="department">By Department</option>
<option value="individual">Individual</option>
</select>
</div>
<div style="display:flex;justify-content:flex-end;gap:10px;margin-top:8px">
<button class="hr-btn hr-btn-ghost" onclick="closeModal('review-cycle-modal')">Cancel</button>
<button class="hr-btn hr-btn-primary" onclick="createReviewCycle()">Launch Cycle</button>
</div>
</div>
</div>
<!-- Add Goal Modal -->
<div class="hr-modal-overlay" id="add-goal-modal">
<div class="hr-modal">
<div class="hr-modal-head">
<h2>Add Goal</h2>
<button class="hr-modal-close" onclick="closeModal('add-goal-modal')">×</button>
</div>
<div class="hr-form-group">
<label class="hr-label">Goal Title</label>
<input type="text" class="hr-input" id="goal-title" placeholder="e.g. Increase sales by 10%">
</div>
<div style="display:flex;justify-content:flex-end;gap:10px">
<button class="hr-btn hr-btn-ghost" onclick="closeModal('add-goal-modal')">Cancel</button>
<button class="hr-btn hr-btn-primary" onclick="saveGoal()">Save Goal</button>
</div>
</div>
</div>
<!-- Update Goal Modal -->
<div class="hr-modal-overlay" id="update-goal-modal">
<div class="hr-modal">
<div class="hr-modal-head">
<h2>Update Progress</h2>
<button class="hr-modal-close" onclick="closeModal('update-goal-modal')">×</button>
</div>
<div class="hr-form-group">
<label class="hr-label">Progress (%)</label>
<input type="number" class="hr-input" id="goal-progress" placeholder="0 - 100">
</div>
<div style="display:flex;justify-content:flex-end;gap:10px">
<button class="hr-btn hr-btn-ghost" onclick="closeModal('update-goal-modal')">Cancel</button>
<button class="hr-btn hr-btn-primary" onclick="saveGoalProgress()">Update</button>
</div>
</div>
</div>
<!-- Check-in Modal -->
<div class="hr-modal-overlay" id="checkin-modal">
<div class="hr-modal">
<div class="hr-modal-head">
<h2>Record Weekly Check-in</h2>
<button class="hr-modal-close" onclick="closeModal('checkin-modal')">×</button>
</div>
<div class="hr-form-group">
<label class="hr-label">Employee</label>
<select class="hr-select" id="checkin-employee"></select>
</div>
<div class="hr-form-group">
<label class="hr-label">What went well this week?</label>
<textarea class="hr-input" id="checkin-well" rows="3"></textarea>
</div>
<div class="hr-form-group">
<label class="hr-label">Any blockers or support needed?</label>
<textarea class="hr-input" id="checkin-blockers" rows="3"></textarea>
</div>
<div style="display:flex;justify-content:flex-end;gap:10px;margin-top:8px">
<button class="hr-btn hr-btn-ghost" onclick="closeModal('checkin-modal')">Cancel</button>
<button class="hr-btn hr-btn-primary" onclick="saveCheckin()">Save Check-in</button>
</div>
</div>
</div>
<!-- Kudos Modal -->
<div class="hr-modal-overlay" id="kudos-modal">
<div class="hr-modal">
<div class="hr-modal-head">
<h2>Give a High Five ✋</h2>
<button class="hr-modal-close" onclick="closeModal('kudos-modal')">×</button>
</div>
<div class="hr-form-group">
<label class="hr-label">Who gets the Kudos?</label>
<select class="hr-select" id="kudos-employee"></select>
</div>
<div class="hr-form-group">
<label class="hr-label">Category</label>
<select class="hr-select" id="kudos-category">
<option value="Teamwork">Teamwork</option>
<option value="Innovation">Innovation</option>
<option value="Extra Mile">Going the Extra Mile</option>
<option value="Leadership">Leadership</option>
</select>
</div>
<div class="hr-form-group">
<label class="hr-label">Message</label>
<textarea class="hr-input" id="kudos-message" rows="3" placeholder="e.g. Thanks for crushing that presentation!"></textarea>
</div>
<div style="display:flex;justify-content:flex-end;gap:10px;margin-top:8px">
<button class="hr-btn hr-btn-ghost" onclick="closeModal('kudos-modal')">Cancel</button>
<button class="hr-btn hr-btn-primary" onclick="saveKudos()">Send Kudos</button>
</div>
</div>
</div>
<div class="hr-toast-container" id="toasts"></div>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script src="/js/hr-config.js"></script>
<script src="/js/shared-utils.js"></script>
<script src="/js/supabase-client.js"></script>
<script src="/js/performance.js"></script>
</body>
</html>