Skip to content

Commit

Permalink
Merge pull request #69 from miles-no/downloadbtn
Browse files Browse the repository at this point in the history
download2
  • Loading branch information
wigsnes authored Jan 17, 2024
2 parents 2b40016 + 919f4f0 commit 640ebc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kabinizer-front-end/src/pages/selectPeriods/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const getWeeklyPeriods = (periods: Period[], draws: Draw[]) => {
if (GetWeeksNum(startDate) === GetWeeksNum(endDate)) {
const weekDates = `${startDate.getDate()}-${endDate.getDate()}`;
acc.push({
id: cur.drawId,
id: cur.id,
start: startDate.getDay() - 1, // 0 is monday
end: (endDate.getDay() + 6) % 7, // 6 is sunday
week: GetWeeksNum(startDate),
Expand All @@ -36,7 +36,7 @@ const getWeeklyPeriods = (periods: Period[], draws: Draw[]) => {
// We have a period that breaks a week
acc.push(
{
id: "a" + cur.drawId,
id: cur.id,
start: startDate.getDay() - 1,
end: 6,
week: GetWeeksNum(startDate),
Expand All @@ -48,7 +48,7 @@ const getWeeklyPeriods = (periods: Period[], draws: Draw[]) => {
draws.find((draw) => draw.id === cur.drawId)?.isSpecial ?? false,
},
{
id: "b" + cur.drawId,
id: cur.id,
start: 0,
end: (endDate.getDay() + 6) % 7,
week: GetWeeksNum(endDate),
Expand Down

0 comments on commit 640ebc1

Please sign in to comment.