crex424 / EasyAppointmentManager

A website to keep track and manage appointments of varying types such as Dentist, Doctor, and Neurologist appointments.
1 stars 1 forks source link

Help on troubleshooting CustomerAppointment class #91

Open TungKimProgrammer opened 1 year ago

TungKimProgrammer commented 1 year ago

Hi @crex424, I am working on the CustomerAppointment of issue #84.

My idea: In the Create view (for employees), when users create a new appointment for a patient: choose a patient, choose a doctor and all available TimeSlots of chosen Doctor will be displayed in the dropdown list.

So far, I have been able to display customers and doctors. But my code for displaying the TimeSlotsByDoctorId is not working. Would you please step in, troubleshoot, and work with me to figure this out?

The branch is: tk-issue#84-create-customerappointment-class-and-controller

Thank you very much!

crex424 commented 1 year ago

@TungKimProgrammer I will take a look at it, and see I can find anything.

crex424 commented 1 year ago

@TungKimProgrammer I had a look and I do not currently know what is causing the issue. I had 2 theories of where the problem is located. I think it may be something wrong with either the class, specifically the connection to the timeslots class, or on the create page with the for loop to display all the timeslot options. Beyond that I do not know how to fix them. I believe it may be a good idea to reach out to Joe in the hopes that he can steer us in the right direction.

TungKimProgrammer commented 1 year ago

Another theory might be that when we select a doctor, the browser does not refresh itself to retrieve data with chosen DoctorId.

I received some tips from Joe:

Blazor can be used to update pages dynamically by calling methods in your controller https://learn.microsoft.com/en-us/aspnet/core/blazor/call-web-api?view=aspnetcore-7.0&pivots=webassembly

Although a more simple approach would probably be to use AJAX since it is JavaScript. If you search for AJAX and ASP.NET Core you may be able to find some good articles. For example, this one shows full CRUD functionality https://www.c-sharpcorner.com/article/ajax-in-net-core/

crex424 commented 1 year ago

Thats sounds like a very possible source of our issue.

crex424 commented 1 year ago

@TungKimProgrammer Do you still need me to work on this issue, or do you think we have found the source of the bug. If we have found the source of the bug; do you want me to fix the issue, or do you want me to move on to work on other requirements for the project?

TungKimProgrammer commented 1 year ago

@crex424 I am still working on this but have not figured it out. Could you create another branch and merge this branch to the new one so we could work on this issue separately and we won't get conflicts?