Em-Ant / fcc-options-app

Options Inc. web app development
Other
12 stars 7 forks source link

Map doesn't load after deleting a consumer that is on a vehicle #13

Closed andrealonzo closed 8 years ago

andrealonzo commented 8 years ago

http://screencast.com/t/qOLMZG3vNda

andrealonzo commented 8 years ago

Fixed with 4d03569d33e28e1fc16f434945a6372921af2567

Some notes: Consumer delete would fail because vehicles were not loaded, so I had to lazy load vehicles on the consumer page. Maybe it should be better to load vehicles on app startup?

Currently using a loop to get the consumer's parent vehicle. Should replace with your consumerVehiclesMap or add vehicleId to the consumer...or leave as is...

Em-Ant commented 8 years ago

Thanks for solving this. Yes, we could have a consumerVehicleMap in the vehicle reducer. The reducers are 'lazy-loading-ready' but we can load data from everywhere we want.