I realized I was not displaying the result of the statistics until the user reloads the page. So I decided to implement that as soon as the rating is confirmed.
DEMO
CHANGES
filterAndRank.js
I was previously using the objectId and the place_id as interchangeable. However, I realized that by doing that, my algorithm was not detecting new ratings to claimedRestaurants. In that sense, I decided to change it all to objectId when it comes to get metrics on an experience,
routes/adventure.js
I also included the objectId for the merged objects to be that one that is in Back4app, I decided to catch those experiences with less than 5 preferences here, as well as include an objectId for the restaurants from GoogleAPI: the place_id
ExperienceInfo.jsx
The biggest change in here corresponds to calculateNewMeanReviews, where I basically, according to the existing and submitting review values, I calculate what the new mean for the feedback will be so that by submitting it, it will update it.
Hi everyone!
I realized I was not displaying the result of the statistics until the user reloads the page. So I decided to implement that as soon as the rating is confirmed.
DEMO
CHANGES
filterAndRank.js
I was previously using the objectId and the place_id as interchangeable. However, I realized that by doing that, my algorithm was not detecting new ratings to claimedRestaurants. In that sense, I decided to change it all to objectId when it comes to get metrics on an experience,
routes/adventure.js
I also included the objectId for the merged objects to be that one that is in Back4app, I decided to catch those experiences with less than 5 preferences here, as well as include an objectId for the restaurants from GoogleAPI: the place_id
ExperienceInfo.jsx
The biggest change in here corresponds to calculateNewMeanReviews, where I basically, according to the existing and submitting review values, I calculate what the new mean for the feedback will be so that by submitting it, it will update it.