WildAid / o-fish-web

Web application for the Officer's Fishery Information Sharing Hub (O-FISH). The web app allows agencies to gain insights from the aggregated information gathered during a routine vessel inspection (submitted via the web app).
Apache License 2.0
31 stars 41 forks source link

Search results for a vessel should go directly to that vessel #353

Closed Sheeri closed 3 years ago

Sheeri commented 3 years ago

Describe the bug Search results for a vessel currently get redirected to the "Vessels" page for the search item, not the actual record clicked.

To Reproduce Steps to reproduce the behavior:

  1. Log in

  2. Make sure "All" is set in the search bar: Screen Shot 2020-10-28 at 4 10 55 PM

  3. Put in a search term that will match at least one vessel

  4. Click on the vessel that shows up in the results, e.g. here I searched for "boat" and will click on "My Boat": Screen Shot 2020-10-28 at 4 12 01 PM

  5. The page that shows up is the vessel search page, not the individual boarding record. e.g. this is the page that shows up (it has a url of /#/vessels/null): Screen Shot 2020-10-28 at 4 12 29 PM

When it should be this (with a URL of https://wildaidsandbox-mxgfy.mongodbstitch.com/#/vessels/view/{"vessel.permitNumber":"12345","vessel.name":"My Boat"}):

Screen Shot 2020-10-28 at 4 13 30 PM

Expected behavior Instead of redirecting to the vessels page, the search should redirect to the appropriate vessels/view page.

lenmorld commented 3 years ago

Hi @Sheeri can I take this one? I was looking at https://github.com/WildAid/o-fish-web/issues/63 so I've been familiar around these parts anyways

but since it's a good first issue, maybe it's better to leave it open for others who are new to the repo I'll let you decide :)

Sheeri commented 3 years ago

Hi @lenmorld - I'm SO GLAD you are still working on O-FISH! Now that hacktoberfest is over, I don't foresee a ton of new people randomly finding us :D I've assigned it to you