preserve schedule start date
This commit is contained in:
parent
bcbc2e6ba3
commit
d9d9869a49
4 changed files with 1 additions and 4 deletions
|
|
@ -52,7 +52,6 @@ class EloquentScheduleRepository implements ScheduleRepository
|
|||
);
|
||||
}
|
||||
|
||||
$model->start_date = $dto->startDate->format('Y-m-d');
|
||||
$model->target_date = $dto->targetDate->format('Y-m-d');
|
||||
$model->save();
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ final readonly class RescheduleScheduleDto
|
|||
public function __construct(
|
||||
public int $scheduleId,
|
||||
public User $user,
|
||||
public DateTimeImmutable $startDate,
|
||||
public DateTimeImmutable $targetDate,
|
||||
public array $assignments,
|
||||
) {}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ class RescheduleSchedule
|
|||
new RescheduleScheduleDto(
|
||||
scheduleId: $schedule->getId(),
|
||||
user: $request->user,
|
||||
startDate: $startDate,
|
||||
targetDate: $targetDate,
|
||||
assignments: $assignmentDtos,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ class FakeScheduleRepository implements ScheduleRepository
|
|||
user: $schedule->getUser(),
|
||||
setName: $schedule->getSetName(),
|
||||
elementKind: $schedule->getElementKind(),
|
||||
startDate: $dto->startDate,
|
||||
startDate: $schedule->getStartDate(),
|
||||
targetDate: $dto->targetDate,
|
||||
assignments: $assignments,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue