feat: add past slot validation to appointment controllers and update SlotCard component
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user