bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 59 forks source link

Auth Web: if user didn't navigate to business via MBR, business profile page fails to load #23887

Open severinbeauvais opened 3 weeks ago

severinbeauvais commented 3 weeks ago

There are numerous, valid ways that a user can get to a business without navigating to it from the My Business Registry page. In this case, I started with a NR, incorporated a business, and then navigated from the bootstrap dashboard to the entity dashboard (using the provided button). The following steps also reproduce this:

  1. login to Test as BCREG0020
  2. go to https://test.business.bcregistry.gov.bc.ca/BC1144676
  3. observe that the Phone value (top right) is "Not Available"
  4. hover over the value and click the Change button
image.png
  1. observe that the business profile page doesn't load (spins forever)
  2. press F12, go to Application tab, and look at the Session Storage for test.account.bcregistry.gov.bc.ca
  3. observe that there is no BUSINESS_ID variable
image.png
  1. now try going to this account's MBR first: https://test.account.bcregistry.gov.bc.ca/account/1994/business
  2. click Manage Business for BC1144676
  3. repeat steps 3-7 but now the BUSINESS_ID is set in session storage and the business profile page loads

I don't know the best way to fix this. Maybe the business profile page should show an error if business id doesn't exist? Maybe Filings UI should pass (as URL query parameter) the account id?

OlgaPotiagalova commented 1 week ago

The symptom is in Filing UI, and the route cause is in Auth code. Coordinate with the SBC Connect team how to fix it.