Release 2.0.27 (#4107)

This commit is contained in:
Kevin Papst
2023-07-04 17:01:29 +02:00
committed by GitHub
parent 6a99ad41ca
commit 651f812da8
62 changed files with 506 additions and 427 deletions

View File

@@ -19,6 +19,8 @@ use Doctrine\ORM\EntityRepository;
*/
class WorkingTimeRepository extends EntityRepository
{
private bool $pendingUpdate = false;
public function deleteWorkingTime(WorkingTime $workingTime): void
{
$entityManager = $this->getEntityManager();
@@ -35,12 +37,15 @@ class WorkingTimeRepository extends EntityRepository
public function scheduleWorkingTimeUpdate(WorkingTime $workingTime): void
{
$this->pendingUpdate = true;
$this->getEntityManager()->persist($workingTime);
}
public function persistScheduledWorkingTimes(): void
{
$this->getEntityManager()->flush();
if ($this->pendingUpdate) {
$this->getEntityManager()->flush();
}
}
/**