feat: add past slot validation to appointment controllers and update SlotCard component

This commit is contained in:
hamed
2026-06-11 20:00:02 +03:30
parent c1df5b73e7
commit c05ac7ca51
3 changed files with 27 additions and 0 deletions
@@ -45,6 +45,10 @@ class MyAppointmentsController extends BaseController
return $this->error('VALIDATION', 'همه فیلدها الزامی است', 422);
}
if ($slotStart < time()) {
return $this->error('SLOT_PAST', 'زمان این اسلات گذشته است', 422);
}
$doctor = $this->doctorRepo->findByUuid($doctorUuid);
if (!$doctor) return $this->error('DOCTOR_NOT_FOUND', 'پزشک یافت نشد', 404);