feat: add clinic doctor invitation feature

- Implemented ClinicInvitationController to handle doctor invitations.
- Created ClinicDoctorInvitation entity and repository for managing invitations.
- Added ClinicInvitationService for business logic related to invitations.
- Introduced endpoints for inviting, listing, resending, changing status, and deleting invitations.
- Updated security configuration to allow public access to invitation endpoints.
- Added migration for clinic_doctor_invitations table.
- Enhanced DoctorRepository with a method to find doctors by mobile number.
- Updated ClinicDetailPage to include invitation management UI.
This commit is contained in:
hamed
2026-06-10 22:13:39 +03:30
parent 9ef94043c8
commit af0ae51987
9 changed files with 747 additions and 34 deletions
@@ -25,6 +25,17 @@ class DoctorRepository extends ServiceEntityRepository
return $this->findOneBy(['user' => $user]);
}
public function findOneByMobile(string $mobile): ?Doctor
{
return $this->createQueryBuilder('d')
->join('d.user', 'u')
->where('u.mobileNumber = :mobile')
->setParameter('mobile', $mobile)
->setMaxResults(1)
->getQuery()
->getOneOrNullResult();
}
public function findWithFilters(array $filters): array
{
$page = max(1, (int) ($filters['page'] ?? 1));