This PR implements hyperlinking on the health filterable table. When users are searching for specific supplies and find an organization that could fit their needs, they are able to click on the organization and access the /org/<int:org_id> page displaying their name, address, phone number, languages spoken, and supplies & services accessible.
The following files were modified as a result of this PR.
base.html: include "org_id" in url_for(request.endpoint) so that language functionality is maintained when a page is generated dynamically for a specific organization
main.py: modifying the db query inside def health_search() so that an organization's unique id can be passed into the table for linkage and def org(org_id) to take organization's unique id for db querying and org page populating dynamically
organization.html: dynamically populate based on parameters passed by org(org_id)
health_search.html: to hyperlink org page
vttc_info.html: deleting residual extra language button
Accepting this PR closes #199.
Non-obvious technical information
I commented out (instead of erasing) the previous implementation of def org() that was in main.py just to be sure nothing should be retained, as the previous implementation of def org() was meant to function both as the unauthenticated user's view of any organization and an authenticated user to view what their own organization's page looks like.
However, if the url is directly navigated to (for instance, https://127.0.0.1:5000/org/5 without pressing anything in the health table), it is still viewable: we can use this for a seamless implementation.
Translations are still necessary to add to the json for the organization.html page and generally for the health_search.html page
Checklist before requesting a review
[x] pre-commit run --all-files (run before pushing)
[x] pytest if applicable
[x] Link issue
[x] Update relevant documentation if applicable: doc strings, readme, poetry.
Describe your changes
This PR implements hyperlinking on the health filterable table. When users are searching for specific supplies and find an organization that could fit their needs, they are able to click on the organization and access the
/org/<int:org_id>
page displaying their name, address, phone number, languages spoken, and supplies & services accessible.The following files were modified as a result of this PR.
url_for(request.endpoint)
so that language functionality is maintained when a page is generated dynamically for a specific organizationdef health_search()
so that an organization's unique id can be passed into the table for linkage anddef org(org_id)
to take organization's unique id for db querying and org page populating dynamicallyorg(org_id)
Accepting this PR closes #199.
Non-obvious technical information
I commented out (instead of erasing) the previous implementation of
def org()
that was in main.py just to be sure nothing should be retained, as the previous implementation ofdef org()
was meant to function both as the unauthenticated user's view of any organization and an authenticated user to view what their own organization's page looks like.However, if the url is directly navigated to (for instance,
https://127.0.0.1:5000/org/5
without pressing anything in the health table), it is still viewable: we can use this for a seamless implementation.Translations are still necessary to add to the json for the organization.html page and generally for the health_search.html page
Checklist before requesting a review