Skip to content

Commit

Permalink
Merge pull request #940 from OneCommunityGlobal/development
Browse files Browse the repository at this point in the history
Backend Release to Main [1.72]
  • Loading branch information
one-community authored May 6, 2024
2 parents 04c98fa + 471882e commit 36b3d8c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/helpers/userHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,15 @@ const userHelper = function () {
// bold description for 'not submitting a weekly summary' and logged hrs
let emailDescription = requestForTimeOffEmailBody;
if (!requestForTimeOffEmailBody && infringement.description) {
emailDescription = infringement.description.replace(
/(not submitting a weekly summary)/gi,
'<b>$1</b>',
);
emailDescription = emailDescription.replace(/(\d+\.\d{2})\s*hours/i, '<b>$1 hours</b>');
if (infringement.description.includes('not submitting a weekly summary')) {
emailDescription = infringement.description.replace(
/(not submitting a weekly summary)/gi,
'<b>$1</b>',
);
emailDescription = emailDescription.replace(/(\d+\.\d{2})\s*hours/i, '<b>$1 hours</b>');
} else {
emailDescription = `<b>${infringement.description}<b>`;
}
}
// add administrative content
const text = `Dear <b>${firstName} ${lastName}</b>,
Expand Down Expand Up @@ -1030,6 +1034,9 @@ const userHelper = function () {
lastName,
element,
totalInfringements,
undefined,
undefined,
undefined,
administrativeContent,
),
null,
Expand Down

0 comments on commit 36b3d8c

Please sign in to comment.