fix: auto-populate prescription content and lab content from pre-selected defaults

This commit is contained in:
SajjadMahmoody
2026-04-18 13:45:07 +03:30
parent bbb727cffe
commit 4abd856bf9
7 changed files with 147 additions and 22 deletions
@@ -108,7 +108,7 @@ protected function getHeaderActions(): array
if (! empty($arguments['delete'])) {
$existingAppointment = $record->surgeryAppointment;
SurgeryAppointment::where('patient_id', $record->id)->delete();
$existingAppointment?->delete();
$record->unsetRelation('surgeryAppointment');
if ($existingAppointment) {