From 31cf77529e585ffb215fdacf8f170f5d7ad5cc3b Mon Sep 17 00:00:00 2001 From: Michael Kimberlin Date: Wed, 13 Nov 2024 12:31:38 -0600 Subject: [PATCH] Alter formatting of comp section --- web-ui/src/pages/MeritReportPage.jsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web-ui/src/pages/MeritReportPage.jsx b/web-ui/src/pages/MeritReportPage.jsx index 8e11bc944d..e6d7b2da8c 100644 --- a/web-ui/src/pages/MeritReportPage.jsx +++ b/web-ui/src/pages/MeritReportPage.jsx @@ -418,13 +418,17 @@ const MeritReportPage = () => { const compTotal = prepareCompensationHistory(data, (comp) => !!comp.totalComp); let text = markdown.headers.h2("Compensation History"); + text += markdown.headers.h3("Base Compensation (annual or hourly)"); text += markdown.lists.ul(compBase, (comp) => formatDate(dateFromArray(comp.startDate)) + " - " + - "$" + parseFloat(comp.amount).toFixed(2) + " (base)"); - text += "\n"; + "$" + parseFloat(comp.amount).toFixed(2)); + text += markdown.headers.h3("Total Compensation") text += markdown.lists.ul(compTotal, - (comp) => dateFromArray(comp.startDate).getFullYear() + " - " + - comp.totalComp + " (total comp)"); + (comp) => { + var date = dateFromArray(comp.startDate); + date = date.getMonth() === 0 && date.getDate() === 1 ? date.getFullYear() : formatDate(date); + return date + " - " + comp.totalComp; + }); return text; };