Commit 8052bdbc authored by Wietse Kuipers's avatar Wietse Kuipers
Browse files

Fix multi-day events being rendered wrong

parent aaa23233
image: kkarczmarczyk/node-yarn:latest
stages:
- build
- test
cache:
......@@ -12,13 +11,8 @@ cache:
- .yarn
yarn install:
stage: build
stage: test
script:
- yarn config set cache-folder .yarn
- yarn install
jest:
stage: test
script:
- rm -rf .yarn
- yarn lint
......@@ -56,22 +56,22 @@ const eventListToSections = (eventList) => {
title: `${eventList[i].title} (dag 1/${daySpan})`,
end: null,
});
// Add end day
addEventToSection(sections, end, {
...eventList[i],
title: `${eventList[i].title} (dag ${daySpan}/${daySpan})`,
start: null,
});
// Add all intermediate days
for (let j = 2; j < daySpan; j += 1) {
addEventToSection(sections, start.add(j - 1, 'days'), {
addEventToSection(sections, start.add(1, 'days'), {
...eventList[i],
start: null,
end: null,
title: `${eventList[i].title} (dag ${j}/${daySpan})`,
});
}
// Add end day
addEventToSection(sections, end, {
...eventList[i],
title: `${eventList[i].title} (dag ${daySpan}/${daySpan})`,
start: null,
});
}
}
......
......@@ -11,7 +11,6 @@ export const colors = {
textColour: '#313131',
darkGrey: '#373737',
dividerGrey: 'rgba(0, 0, 0, 0.12)',
background: '#FAFAFA',
transparent: 'transparent',
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment