Feature: [calendar] Add button to generate document immediatly after saving the calendar

This commit is contained in:
2022-10-21 10:40:51 +02:00
parent 55095ee6ac
commit 2c5fa82380
5 changed files with 30 additions and 12 deletions

View File

@@ -611,7 +611,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface
public function setEndDate(DateTimeImmutable $endDate): self
{
if ($this->endDate->getTimestamp() !== $endDate->getTimestamp()) {
if (null === $this->endDate || $this->endDate->getTimestamp() !== $endDate->getTimestamp()) {
$this->increaseaDatetimeVersion();
}
@@ -662,7 +662,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface
public function setStartDate(DateTimeImmutable $startDate): self
{
if ($this->startDate->getTimestamp() !== $startDate->getTimestamp()) {
if (null === $this->startDate || $this->startDate->getTimestamp() !== $startDate->getTimestamp()) {
$this->increaseaDatetimeVersion();
}