feat: add RichTextEditor component for rich text editing in articles
feat: create SanitizeBlogBodiesCommand to clean existing blog bodies according to current HTML sanitization policies test: add AppointmentTreatmentSessionLinkTest to ensure appointment booking functionality works correctly with treatment session links
This commit is contained in:
@@ -149,7 +149,7 @@ class DoctorClaimService
|
||||
|
||||
private function finalize(Doctor $doctor, User $target, DoctorClaimRequest $claim, ?string $nationalCode): void
|
||||
{
|
||||
$surrogate = $this->em->wrapInTransaction(function () use ($doctor, $target, $claim, $nationalCode): ?User {
|
||||
$surrogate = $this->em->wrapInTransaction(function () use ($doctor, $target, $claim, $nationalCode): User {
|
||||
$locked = $this->em->find(Doctor::class, $doctor->getId(), LockMode::PESSIMISTIC_WRITE);
|
||||
|
||||
if ($locked->getOwnerStatus() !== 'pending_transfer') {
|
||||
@@ -170,8 +170,7 @@ class DoctorClaimService
|
||||
});
|
||||
|
||||
// حذف امن جانشین — پس از flush انتقال، تا شمارش پزشکانِ متصل قطعی باشد
|
||||
if ($surrogate !== null
|
||||
&& $surrogate->getId() !== $target->getId()
|
||||
if ($surrogate->getId() !== $target->getId()
|
||||
&& $surrogate->hasRole(DoctorImportService::ROLE_UNCLAIMED_DOCTOR)
|
||||
&& $this->em->getRepository(Doctor::class)->count(['user' => $surrogate]) === 0) {
|
||||
$this->em->remove($surrogate);
|
||||
|
||||
Reference in New Issue
Block a user