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:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user