Skip to content

Commit 69a63b5

Browse files
Merge pull request #1948 from OneCommunityGlobal/Diya_Fix_Reply+WeeklyHours
Diya 🔥 (multiple): ReplyTo on BS assignment & WeeklyHours Display
2 parents 8bd2171 + e7a4f08 commit 69a63b5

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/helpers/reporthelper.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,17 @@ const reporthelper = function () {
170170
result.totalSeconds = [0, 0, 0, 0];
171171

172172
if (!result.timeEntries || result.timeEntries.length === 0) return;
173-
173+
const isSingleWeekRequest = startWeekIndex === endWeekIndex;
174174
result.timeEntries.forEach((entry) => {
175-
const index =
176-
startWeekIndex === endWeekIndex ? 0 : absoluteDifferenceInWeeks(entry.dateOfWork, pstEnd);
175+
let index;
176+
177+
if (isSingleWeekRequest) index = startWeekIndex;
178+
else {
179+
index =
180+
startWeekIndex === endWeekIndex
181+
? 0
182+
: absoluteDifferenceInWeeks(entry.dateOfWork, pstEnd);
183+
}
177184

178185
if (index >= 0 && index < 4) {
179186
result.totalSeconds[index] =

src/helpers/userHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ const userHelper = function () {
13411341
),
13421342
null,
13431343
combinedCCList,
1344-
DEFAULT_REPLY_TO[0],
1344+
emailAddress,
13451345
combinedBCCList,
13461346
{ type: 'blue_square_assignment' },
13471347
);

0 commit comments

Comments
 (0)