Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek committed May 7, 2024
1 parent bf415d6 commit 45d0b27
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions client/utils/planning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1369,18 +1369,16 @@ function defaultCoverageValues(
}

if (eventItem && appConfig.long_event_duration_threshold > -1) {
const duration = moment.duration({
from: eventItem?.dates?.start,
to: eventItem?.dates?.end
});

if (appConfig.long_event_duration_threshold === 0) {
newCoverage.planning.scheduled = moment(eventItem?.dates?.end || moment());
} else {
const duration = moment.duration({
from: eventItem?.dates?.start,
to: eventItem?.dates?.end
});

if (duration.hours() > appConfig.long_event_duration_threshold) {
delete newCoverage.planning.scheduled;
delete newCoverage.planning._scheduledTime;
}
} else if (duration.hours() > appConfig.long_event_duration_threshold) {
delete newCoverage.planning.scheduled;
delete newCoverage.planning._scheduledTime;
}
}

Expand Down

0 comments on commit 45d0b27

Please sign in to comment.