code-for-chapel-hill / NC-COVID-Support

Community support site, supporting COVID-19 business opening hours, Food Banks, School Meals, Farms and Social Services.
https://nccovidsupport.org
GNU General Public License v3.0
16 stars 39 forks source link

Issue 262 #284

Open jasonajones73 opened 4 years ago

jasonajones73 commented 4 years ago

Issue 262

What was done

This pull request does not completely close the issue but it should serve as a starting point. I got rid of axios and I am just using a fetch call now. I have a working fetch call to the REST API endpoint https://nccovid.vizioz.com/api/v1/resource/settings. The call is initiated on the created lifecycle hook for the SearchFilters.vue component. The categories response is stored in the components data object as cmsCategories.

To solve the CORS issue I mentioned before, I am proxying the request through https://cors-anywhere.herokuapp.com/. You should be able to see that in the fetch call.

What was not done

I did not integrate the response into the selection box because it seems like the response does not include everything that is currently in the constants.js object that is currently being imported to populate the selection box. Specifically, it is the code item in the categories and subcategories that is missing (For example: code: 'restaurant'). This is causing an issue with the needOptionGroups computed value.

readingdancer commented 4 years ago

Thanks @jasonajones73 - Sorry for the delay, I will try and take a look at this at some time this week :)

readingdancer commented 3 years ago

Hi @jasonajones73 - Really sorry I didn't get to properly look at this back in September, homeschooling of my children and hectic life in general took over my life and I dropped the ball on the NC COVID site. I am looking to try and finish what we started with the Umbraco implementation, so I will try and take a look at your PR this week. I have just automatically updated your branch to reflect other updates.