Skip to content
Snippets Groups Projects
Commit acd22cfe authored by Giildo's avatar Giildo
Browse files

:construction: Update the timeline end if its is on going

parent 6f90a190
Branches
Tags
No related merge requests found
......@@ -96,9 +96,11 @@ export const useTimeline = () => {
let end = rest.limits.end
if (state.timelineIsOnGoing.value) {
const endIsOnGoing = new Day().add(rest.screenDivisionNb / 2, rest.divisionType)
if (new Day(end).isBefore(new Day().add(rest.screenDivisionNb / 2, rest.divisionType))) {
const endIsOnGoing = new Day()
const diff = Math.round(new Day(end).diff(endIsOnGoing, rest.divisionType) / rest.diffDivision)
if (diff < 0) {
end = endIsOnGoing.toISOString()
rest.divisionNb += 1 + Math.abs(diff)
}
}
......
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