mark-szabo / carwash

A demo app running in production demonstrating Microsoft Hungary's digital transformation.
https://aka.ms/carwash
MIT License
23 stars 9 forks source link

Dropoff Locations are Hardcoded #71

Open BalintFarkas opened 5 years ago

BalintFarkas commented 5 years ago

Building and floor choices are hardcoded into the chatbot instead of being populated dynamically.

Please see PromptForBuildingStepAsync() and PromptForFloorStepAsync() within ConfirmDropoffDialog.cs.

return await step.PromptAsync( BuildingPromptName, new PromptOptions { Prompt = MessageFactory.Text("In which building did you park the car?"), Choices = new List<Choice> { new Choice("M"), new Choice("S1"), new Choice("GS"), new Choice("HX") }, }, cancellationToken);

var floors = new List<string>(); switch (state.Building) { case "M": floors = new List<string> { "-1", "-2", "-2.5", "-3", "-3.5", "outdoor" }; break; case "S1": floors = new List<string> { "-1", "-2", "-3" }; break; case "GS": floors = new List<string> { "-1", "outdoor" }; break; case "HX": floors = new List<string> { "-3" }; break; }

mark-szabo commented 5 years ago

Thanks! 👍 Same for PWA frontend. Should pull details from the .well-known endpoint at startup and store it in a singleton.