Skip to content

Commit 78b7dc3

Browse files
committed
ADD - hackatime prj names review visible
1 parent 23cabab commit 78b7dc3

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

client/src/components/AdminReviewPage.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,15 @@
369369
font-size: 0.85rem;
370370
}
371371

372+
.admin-review-hours-grid-hackatime-names {
373+
grid-column: 1 / -1;
374+
}
375+
376+
.admin-review-hours-grid-hackatime-names strong {
377+
line-height: 1.45;
378+
overflow-wrap: anywhere;
379+
}
380+
372381
.admin-review-hours-input {
373382
padding: 0.5rem;
374383
}

client/src/components/AdminReviewPage.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ function combinedLoggedHours(project) {
6464
return Number(project.combinedHours ?? journal + hackatime);
6565
}
6666

67+
function formatHackatimeProjectNames(names) {
68+
const list = (Array.isArray(names) ? names : []).map((name) => String(name).trim()).filter(Boolean);
69+
return list.length ? list.join(", ") : "—";
70+
}
71+
6772
/** True when "new hours to approve" is above the logged/pending caps shown on the review page. */
6873
function approvalNeedsExceedAck(project, requestedNewHours) {
6974
if (!project || !Number.isFinite(requestedNewHours)) return false;
@@ -537,6 +542,10 @@ function AdminReviewDetail({ projectId }) {
537542
<span>Hackatime hours</span>
538543
<strong>{formatHours(project.hackatimeHours)} h</strong>
539544
</div>
545+
<div className="admin-review-hours-grid-hackatime-names">
546+
<span>Hackatime projects</span>
547+
<strong>{formatHackatimeProjectNames(project.hackatimeNames)}</strong>
548+
</div>
540549
<div>
541550
<span>Combined total</span>
542551
<strong>{formatHours((Number(project.journalHours || 0) + Number(project.hackatimeHours || 0)).toFixed(2))} h</strong>

0 commit comments

Comments
 (0)