Dashboard Page - Appointments:

- create separate dashboard components for doctor and patient
- add appointments to dashboard components
- add code to backend for appointments retrieval
This commit is contained in:
ElenitaMLG
2024-04-30 12:48:19 +03:00
parent 1ff7f51aa6
commit 7e38d60802
17 changed files with 665 additions and 30 deletions
@@ -38,4 +38,20 @@ public class AppointmentsController : BaseApiController
var response = await handler.HandleDeleteAppointment(dto).ConfigureAwait(false);
return StatusCode(response.StatusCode, response);
}
[HttpGet("patient/{id:guid}")]
public async Task<ActionResult<BaseResponse>> GetAppointmentsByPatient(Guid id)
{
var handler = new AppointmentManagementHandler(_appointmentsMongoDbService, _patientRepository, _doctorRepository);
var response = await handler.HandleGetAppointmentsByPatientId(id);
return StatusCode(response.StatusCode, response);
}
[HttpGet("doctor/{id:guid}")]
public async Task<ActionResult<BaseResponse>> GetAppointmentsByDoctor(Guid id)
{
var handler = new AppointmentManagementHandler(_appointmentsMongoDbService, _patientRepository, _doctorRepository);
var response = await handler.HandleGetAppointmentsByDoctorId(id);
return StatusCode(response.StatusCode, response);
}
}