Skip to content

Commit 68e2a80

Browse files
authored
Merge pull request #2764 from objectcomputing/feature-2759/server-side-markdown
Alter formatting of comp section
2 parents e920319 + 31cf775 commit 68e2a80

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

web-ui/src/pages/MeritReportPage.jsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,13 +418,17 @@ const MeritReportPage = () => {
418418
const compTotal = prepareCompensationHistory(data, (comp) => !!comp.totalComp);
419419

420420
let text = markdown.headers.h2("Compensation History");
421+
text += markdown.headers.h3("Base Compensation (annual or hourly)");
421422
text += markdown.lists.ul(compBase,
422423
(comp) => formatDate(dateFromArray(comp.startDate)) + " - " +
423-
"$" + parseFloat(comp.amount).toFixed(2) + " (base)");
424-
text += "\n";
424+
"$" + parseFloat(comp.amount).toFixed(2));
425+
text += markdown.headers.h3("Total Compensation")
425426
text += markdown.lists.ul(compTotal,
426-
(comp) => dateFromArray(comp.startDate).getFullYear() + " - " +
427-
comp.totalComp + " (total comp)");
427+
(comp) => {
428+
var date = dateFromArray(comp.startDate);
429+
date = date.getMonth() === 0 && date.getDate() === 1 ? date.getFullYear() : formatDate(date);
430+
return date + " - " + comp.totalComp;
431+
});
428432
return text;
429433
};
430434

0 commit comments

Comments
 (0)