feat: add holiday management endpoints and jalaali-js dependency

- Added a new endpoint to list holidays for a specific doctor.
- Added a new endpoint to delete a holiday, with access control for doctors and admins.
- Implemented a repository method to retrieve all holidays for a doctor.
- Added jalaali-js library to handle date conversions.
This commit is contained in:
hamed
2026-06-10 17:41:04 +03:30
parent a5876b9324
commit d489702751
6 changed files with 775 additions and 20 deletions
@@ -19,6 +19,17 @@ class HolidayRepository extends ServiceEntityRepository
return $this->findOneBy(['uuid' => $uuid]);
}
/** @return Holiday[] */
public function findAllByDoctor(Doctor $doctor): array
{
return $this->createQueryBuilder('h')
->where('h.doctor = :doctor')
->setParameter('doctor', $doctor)
->orderBy('h.startDate', 'DESC')
->getQuery()
->getResult();
}
/** @return Holiday[] */
public function findActiveByDoctor(Doctor $doctor, int $from, int $to): array
{