bcgov / entity

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

Frontend Freezing/Unfreezing an Entity - Entity changes only #13348

Closed zac-broitman closed 1 year ago

zac-broitman commented 1 year ago

Acceptance Criteria

Scenario 1: Freezing an entity

Scenario 2: Unfreezing an entity

Scenario 3: Client viewing their entity while frozen

Dependencies? What is the impact of this dependency? (If so, link dependency in the ticket, make it visible in a team´s backlog)

Validation Rules? (If yes, list here)

Design https://preview.uxpin.com/d180f4fe21101c1545a8d8df2e8c57be318618e9#/pages/152797132/simulate/sitemap


Link to DoR for a US/ Feature https://github.com/bcgov/entity/blob/master/.github/ISSUE_TEMPLATE/DoR%20-%20Relationships.md https://github.com/bcgov/entity/blob/master/.github/ISSUE_TEMPLATE/DoR%20-%20Entity.md

Link to the DoD for a US/ Feature https://github.com/bcgov/entity/blob/master/.github/ISSUE_TEMPLATE/DoD%20-%20Relationships.md https://github.com/bcgov/entity/blob/master/.github/ISSUE_TEMPLATE/DoD%20-%20Entity.md

seeker25 commented 1 year ago

https://app.zenhub.com/workspace/o/bcgov/entity/issues/12358

@zac-broitman related ticket -^

zac-broitman commented 1 year ago

Questions remaining are: since this being treated as a filing, why are we not showing it in the ledger? If we are committed to not showing it in the ledger, then we are then committing to having "hidden" filings? Are there different rules for how these are shown based on if the user is a client or staff?

zac-broitman commented 1 year ago

Julie Harding has confirmed that there are not any other filings she is aware of which would act like this, where it would be hidden and not shown on the ledger. Really this isn't a "filing" in but we are just treating it as such technically in the system.

From the design ticket it appears there will be just one warning banner about this that will be shown to both client and staff users. Staff will be able to communicate the reason for the freezing via the existing comments feature on the staff view of the entity dashboard.

zac-broitman commented 1 year ago

We will not be treating this a filing, this will be treated as an immediate change to the entity (similar to a folio change). Treating this as a filing would introduce the concept of "hidden filings" which is a messy idea that will lead to confusion. For historical tracking, staff are able to to leave comments using the existing comments functionality when freezing/unfreezing.

severinbeauvais commented 1 year ago

A proper architecture needs to be implemented to handle all possible alerts. (The current alerts are a special case only and need to be refactored into the new architecture). This architecture ticket needs to be implemented first or at the same time: https://app.zenhub.com/workspaces/entities-team-space-6143567664fb320019b81f39/issues/bcgov/entity/13881

seeker25 commented 1 year ago

@ethantspitt could you take a look at this in DEV? You'll need to login as staff and navigate to a business.

seeker25 commented 1 year ago

Example here:

https://dev.bcregistry.ca/business/FM1017072

image

Image updated by SB to show disabled Business Addresses and Proprietor Change buttons.

ethantspitt commented 1 year ago

image.png

ethantspitt commented 1 year ago

checked in dev, noted some wording change above

severinbeauvais commented 1 year ago

image.png

The "Detail" is common code (for other staff notations). Do you want it changed for all?

ethantspitt commented 1 year ago

yes, thanks Sev,

PCC199 commented 1 year ago

@kialj876 Would it be possible for you to make the changes please.

kialj876 commented 1 year ago

sure yeah 👍

kialj876 commented 1 year ago

wording change in review ^

PCC199 commented 1 year ago

@ethantspitt Could you take a quick look and move the ticket along please Ethan?

ethantspitt commented 1 year ago

Verified in Dev, ready for QA

ethantspitt commented 1 year ago

Observation: When a business is frozen, its status is still showing active on the business registry dashboard. Not sure if this will be handled by another ticket? (on the UXpin, it shows a warning icon with message)

image

zac-broitman commented 1 year ago

I believe it remains as "Active" as freezed is not really a business status in the same way Active or Historical are. It shows as Active in the business summary too.

Additionally, can someone update me when this is deployed to TEST?

ethantspitt commented 1 year ago

@zac-broitman I was referring to the UXpin provided, it shows 'active' with an additional warning icon: image

zac-broitman commented 1 year ago

Ah I see, I don't think there is another ticket for that

seeker25 commented 1 year ago

@zac-broitman is it possible these conditions can happen all at once? EG. Dissolved / Liquidation / not in good standing / frozen?

Are there more possibilities for the future? or are we just implementing 4?

Our datamodel only has entity.STATUS in sbc-auth

@ethantspitt

Could we change the STATUS to 'Frozen' instead of Active and avoid having the tooltip if a business can only be in one bad state at a time?

severinbeauvais commented 1 year ago

I believe Auth learns of business changes via the queue system. Maybe the necessary data is passed along already, just not recorded on Auth side?

seeker25 commented 1 year ago

There's still only a single field for status.. when it could be multiple values? If there are multiple statuses that need to be stored there would require a datamodel change to handle these statuses.

Doing it via queue would require an entirely new queue project in SBC-AUTH, as it's not possible to watch multiple queues at once in a single project.

This one watches NRs (specific queue it watches:
namerequest.state / namerequest-worker ) : https://github.com/bcgov/sbc-auth/blob/main/queue_services/business-events-listener/src/business_events_listener/worker.py

This one watches for events from payment reconciliation:

https://github.com/bcgov/sbc-auth/blob/main/queue_services/events-listener/src/events_listener/worker.py

severinbeauvais commented 1 year ago

I could be wrong about the queue. Maybe it's an API to API call.

The business' status is either Active or Historical. Whether it's frozen is a sub-type, which is presently being discussing with Thor/Argus/Vysakh. It may currently be a flag in the business object.

seeker25 commented 1 year ago

When the dashboard loads a true business (not an NR) it only calls affiliations (which includes the entity from sbc-auth)

At least in this case..

image

seeker25 commented 1 year ago

Sub-type sounds good Severin.. we could do that, but it would require data model changes. Which I think should be in another ticket - because it isn't a trivial task.

severinbeauvais commented 1 year ago

Yes, but those affiliations (which isn't a good name for what this data really is) are updated somehow when the business becomes historical, for example.

seeker25 commented 1 year ago

Probably some sort of PATCH on the entity to status.. let me look.. Yup confirmed it's in the PATCH to entity

severinbeauvais commented 1 year ago

Maybe we should just chat about this. If only we had a reliable chat service...

In seriousness, I'm not the one driving the subtype change. I'm only listening in. Here's the RFC that might change this: https://github.com/bcgov/entity/pull/14968

seeker25 commented 1 year ago

Thank you Severin! I think we should.

seeker25 commented 1 year ago

Auth / Business Dashboard - related changes here: https://github.com/bcgov/entity/issues/15134 https://github.com/bcgov/entity/issues/15135

seeker25 commented 1 year ago

@AshnaMehta please confirm on TEST, so we can close this one out. Thank you.

AshnaMehta commented 1 year ago

@seeker25 few changes please:

  1. the "add details" sections needs to be mandatory image.png
  2. Staff filing menu to have update "Administer Freeze" to "Freeze Business" and "Administer unfreeze" to "Unfreeze Business" image.png
  3. The header for the modal updated to "Freeze Business" or "Unfreeze Business" for each respective flow. image.png
seeker25 commented 1 year ago

Closing, @AshnaMehta I've made the changes you've requested. Only functional change is the required detail box which already existed for other filings.