Cannot make an appointment

#1 · closed · 4 comments

View on GitHub ↗

codecraftedbydan

Sorry, no such barber/service available. When I want to make an appointment the MakeAnAppointment method is called. var salonService = await this.salonServicesService.GetByIdAsync<SalonServiceSimpleViewModel>(salonId, serviceId); salonService is null. Even though I have a service that is available in my database. Any help would be much appreciated.

Comments

marinakolova

Hi, Thank you for the interest in this project. Plese, note that this is a student project, made for learning purposes and I am currently not maintaining it. But I will try to help you debug your implementation of it. SalonServices is a mapping table between Salons and Servicies. The SalonService model has SalonId, ServiceId and bool Available. Making an appointment is not possible for service which does not exist for the specific salon or which is set to Available=false for the specific salon. The buttons which lead to the MakeAnAppointment page are not available for unexisting or unavailable combination of salon and service. Of course, hidden buttons are not the only validation for assuring this. Therefore, the error page for UnavailableService (the one saying "Sorry, no such salon/service available."), is seen when the method you are refering to returns null OR when the Available prop of the returned salonService is set to false. Please, check the specific combination of salon and service in your database in the mapping table SalonServices. All seeded SalonServices are initially with Available=true. When adding a service from the Admin area, it is added with Available=true for all salons from the category. The role SalonManager can change that for a specific salon (controls which services are available for each salon). Please, check the way you have added the service to your database and if you have mapped it to the salon and set it to Available=true. Hope theese explanations would help you debug your implementation of the code. If not, I suggest running the project with the included data seeders and take a look at the database again. Good luck.

codecraftedbydan

Hi I managed to fix the issue, I had simply miss spelt something lol. For the forgot password, I’m guessing it uses sendgrid ? Do you have any steps to get this to work ? Would I need to deploy it to like an azure function for it to send emails ? Many thanks, Dan On 15 Feb 2022, 22:05 +0000, marinakolova/BeautyBooking ***@***.***>, wrote: > > help

marinakolova

Hi, Dan, Mailing service is not implemented/working, sorry. You can check BeautyBooking.Services.Messaging - it was part of the template I was using for starting the project - mentioned in the README.

codecraftedbydan

Okay no problem, thanks for the quick reply ! Dan On 15 Feb 2022, 22:16 +0000, Marina Kolova ***@***.***>, wrote: > Hi, Dan, > Mailing service is not implemented/working, sorry. > You can check BeautyBooking.Services.Messaging - it was part of the template I was using for starting the project - mentioned in the README. > — > Reply to this email directly, view it on GitHub, or unsubscribe. > You are receiving this because you authored the thread.Message ID: ***@***.***>