@page "/patient/doctors" @attribute [Authorize(Roles = UserRoles.Patient)] @layout PatientLayout @inject IPatientManagementService PatientManagementService

Meet Our Doctors

@if (doctors is null) {

Loading doctors...

} else if (doctors.Count == 0) {

No doctors are available at the moment.

} else {
@foreach (var doctor in doctors) {
Doctor Image
@doctor.Name

@doctor.Email

}
@if (selectedDoctor != null) { } } @code { private List doctors; private Doctor selectedDoctor; protected override async Task OnInitializedAsync() { doctors = await PatientManagementService.GetAllDoctorsAsync(); } private void ToggleOverlay(Doctor doctor) { selectedDoctor = doctor; } private string FormatDescription(string description) { // This is now handled directly in the modal body with MarkupString return description?.Replace(Environment.NewLine, "
") ?? string.Empty; } }