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->target_date = $dto->targetDate->format('Y-m-d');
|
||||||
$model->save();
|
$model->save();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ final readonly class RescheduleScheduleDto
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public int $scheduleId,
|
public int $scheduleId,
|
||||||
public User $user,
|
public User $user,
|
||||||
public DateTimeImmutable $startDate,
|
|
||||||
public DateTimeImmutable $targetDate,
|
public DateTimeImmutable $targetDate,
|
||||||
public array $assignments,
|
public array $assignments,
|
||||||
) {}
|
) {}
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ class RescheduleSchedule
|
||||||
new RescheduleScheduleDto(
|
new RescheduleScheduleDto(
|
||||||
scheduleId: $schedule->getId(),
|
scheduleId: $schedule->getId(),
|
||||||
user: $request->user,
|
user: $request->user,
|
||||||
startDate: $startDate,
|
|
||||||
targetDate: $targetDate,
|
targetDate: $targetDate,
|
||||||
assignments: $assignmentDtos,
|
assignments: $assignmentDtos,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ class FakeScheduleRepository implements ScheduleRepository
|
||||||
user: $schedule->getUser(),
|
user: $schedule->getUser(),
|
||||||
setName: $schedule->getSetName(),
|
setName: $schedule->getSetName(),
|
||||||
elementKind: $schedule->getElementKind(),
|
elementKind: $schedule->getElementKind(),
|
||||||
startDate: $dto->startDate,
|
startDate: $schedule->getStartDate(),
|
||||||
targetDate: $dto->targetDate,
|
targetDate: $dto->targetDate,
|
||||||
assignments: $assignments,
|
assignments: $assignments,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue