Pensano-dev / aura-mobile-app

5 stars 0 forks source link

Pj/feat/cafe controller with location #42

Closed pablisch closed 5 months ago

pablisch commented 5 months ago

Provisional controller function to use userLocation to identify suitable cafes.

Additionally,

To be done later, in another ticket... NO opening hours data has been added to seeds. Cafes should be selected ONLY when they are open. NOTE: This should really happen in the query and not by filtering the returned data.

pablisch commented 5 months ago

I am not intending to add seed data for opening hours at this time. I was going to hold off this PR until user location was available but there is nothing to stop any requests from the frontend using a dummy location param as the current postman requests do. If being tested, please use any of the postman requests in the shared workspace that include location.

If this PR seems premature, please say. Personally, I feel the visibility is more helpful than keeping it hidden and it provides a clear onward path for the frontend location work to be carried out.

kikilondon commented 5 months ago

@pablisch Hi, I have pulled the last version with the Read.me file, and it works. but there is still the facilityComponent error on this branch. Screenshot 2024-03-02 at 14 38 15

siqbal181 commented 5 months ago

Member

@kikilondon @pablisch This is due to a change in naming from the FacilityComponent --> Facility. It will be resolved once merged into main I think.. I just changed the names in FacilitySelectorScreen file to reference the Facility component.. That or once my PR is merged into main then this one will have conflicts to resolve.. and it can just opt to keep changes from my PR?

thoughts?

pablisch commented 5 months ago

Thanks for the feedback and questions, Sidra. Main has been pulled into this branch so there should be no remaining issues there. I added notes to the README regarding the sections you were asking about and more. Please ask about anything missing or just ask about anything. That was a really good reminder.

The Endpoint may only be tested in the test environment as the database holds different data currently. In the backend, run npm run start:test.

There are now six Postman requests in the shared workspace relating to this endpoint, all in the cafe routes folder. Each should return respectively:

pablisch commented 5 months ago

This is so cool Pablo!

FYI the last postman request needs adjusting to remove the location (so it shows the error as expected)

Thanks, Sidra! I forgot to press SAVE in postman!