Skip to content

Commit

Permalink
taro hotfix for week plan
Browse files Browse the repository at this point in the history
  • Loading branch information
Belissimo-T committed Jun 12, 2024
1 parent 90c1bf1 commit accf569
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/src/components/Weekplan/Day.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,13 @@
// TODO: after block refactor
let tmp_out = Array.from({length: block_count}, (v, i) => [[], [], []]); // [[blocks], [top halfs], [bottom halfs]]
for(const lesson of lessons) {
let tmp_out_index = Math.floor((lesson.periods[0] + 1) / 2)-1;
if (tmp_out_index < 0) {
continue;
}
tmp_out[
Math.floor((lesson.periods[0] + 1) / 2)-1
tmp_out_index
][
lesson.periods.length > 1 ? 0 : (lesson.periods[0] % 2 == 0 ? 2 : 1)
].push(lesson);
Expand Down

0 comments on commit accf569

Please sign in to comment.