feat: remove obsolete date range override
This commit is contained in:
1 parent
86c5d23181
commit
127ced4378
42 files changed
+152
-353
No files matched your search
@@ -246,9 +246,8 @@ class Disposition implements BlameableEntityInterface, TimestampableEntityInterf
|
||||
}
|
||||
|
||||
$assignment = $this->getAssignment();
|
||||
$assignmentPeriod = $assignment->getEffectivePeriod();
|
||||
$dueDateFrom = $this->getCreatedAt()->modify(sprintf('+%d days', $deadlineDays));
|
||||
$dueDateTo = $assignmentPeriod->end->modify('-1 day');
|
||||
$dueDateTo = $assignment->getDestination()->getDateTo()->modify('-1 day');
|
||||
|
||||
// A short-notice assignment can end before the normal $deadlineDays window would even
|
||||
// start. Left uncapped, dueDateFrom >= dueDateTo makes isStarted() and isEnded() equal
|
||||
@@ -297,9 +296,8 @@ class Disposition implements BlameableEntityInterface, TimestampableEntityInterf
|
||||
}
|
||||
|
||||
$assignment = $this->getAssignment();
|
||||
$assignmentPeriod = $assignment->getEffectivePeriod();
|
||||
$dueDateFrom = $assignmentPeriod->getEndDate();
|
||||
$dueDateTo = $dueDateFrom->addDays($deadlineDays);
|
||||
$dueDateFrom = $assignment->getDestination()->getDateTo();
|
||||
$dueDateTo = $dueDateFrom->modify(sprintf('+%d days', $deadlineDays));
|
||||
|
||||
$period = CarbonPeriodImmutable::create($dueDateFrom, $dueDateTo);
|
||||
|
||||
|
||||
Reference in new issue
Block a user