Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24458 - no expansion panel for pending correction filing in the todo section #110

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

patrickpeinanw
Copy link
Collaborator

@patrickpeinanw patrickpeinanw commented Dec 11, 2024

*Issue:*bcgov/entity#24458

Description of changes:
When there is a pending correction in the todo section, no expansion panel should be displayed and there should be no 'view detail' button.

It is hard to reproduce because a correction filing is added to the filing history right after the filing is submitted.
Cypress test is used to mock this scenario. See screenshot below:
pending correction

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namex license (Apache 2.0).

@patrickpeinanw patrickpeinanw changed the title 24458 - no expansion panel for pending correction filing in the todo … 24458 - no expansion panel for pending correction filing in the todo section Dec 11, 2024
@patrickpeinanw patrickpeinanw self-assigned this Dec 11, 2024
@patrickpeinanw
Copy link
Collaborator Author

/gcbrun

@bcregistry-sre
Copy link
Collaborator

Temporary Url for review: https://business-dashboard-dev--pr-110-5hxdkgcd.web.app

Comment on lines 183 to 187
// if it is a draft correction filing
todoItem.expansionContent = TodoExpansionContentE.DRAFT_CORRECTION
} else if (todoItem.name === FilingTypes.CORRECTION) {
// if it is a correction filing (non-draft)
todoItem.expansionContent = TodoExpansionContentE.CORRECTION
// if it is a non-draft correction filing (pending filing), no expansion panel in this case
} else if (
Copy link
Collaborator Author

@patrickpeinanw patrickpeinanw Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this addExpansionContent function determines what expansion panel to be rendered for the todo item. It covers the logic in https://github.com/bcgov/business-filings-ui/blob/f9747e4b20d50da231dcd8a45d1feb45ffa5a498/src/components/Dashboard/TodoList.vue#L589-L691

In Filing UI TodoList.vue L623-L634, there is a template for a correction todo item that is not draft. However, this expansion panel is never rendered in the Filing UI. In TodoList.vue of Filing UI, the 'View Detail' button is controlled by showDetailsBtnRed() (L929) and showDetailsBtnBlue() (L900).

@severinbeauvais when you have a chance, can you take a look at the corresponding code in Filing UI and confirm if we want to show the expansion panel for such case?

Copy link
Collaborator

@severinbeauvais severinbeauvais Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code block you reference in TodoList.vue is legacy: prior to handling corrections via a regular filing (in Edit UI) and the corresponding back end code, we supported only limited corrections as "local filings" (in Filings UI) that only accepted a detail comment, and Ops Team would need to manually make the detailed changes in the db. This code block handled the case of a correction filing not in draft, ie, staff "filed" it and now Ops Team has to action it (and then change this correction task to a correction ledger item).

Ideally, someone would test the various states of a current correction filing (draft, pending, paid, etc) and ensure that it displays correctly in the dashboard.

(Note that a regular user cannot action a correction task; only staff can. I didn't test that in the new dashboard.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@severinbeauvais We have this business in TEST (https://test.business-dashboard.bcregistry.gov.bc.ca/BC1051272) that has a pending correction filing in Todo. You can see it has the 'View Details' button which is not supposed to appear since there is no expansion panel in this case. -- this ticket is to solve this issue.

Do you know a way to create a pending correction just like what we see in the TEST example?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re:
image

There is no way to create a new pending Correction in the To Do list using current flows. This is a left-over filing from a couple of years ago, before we fully implemented correction filing processing.

I suppose you could create such a filing manually in the Legal db. (Eg, start from a normal correction task and update its state.)

Again, there shouldn't be any Correction tasks in this state since a couple of years ago. It would be wise to confirm this in the Prod Lear db (but I don't have access to it).

Given this, I guess your code change is "safe" but won't be used, which is ok.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since correction filing processing is now implemented, these old pending corrections should be deleted from all dbs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@severinbeauvais Thanks for your clarification.

@patrickpeinanw
Copy link
Collaborator Author

/gcbrun

@bcregistry-sre
Copy link
Collaborator

Temporary Url for review: https://business-dashboard-dev--pr-110-eurm1gxn.web.app

@patrickpeinanw patrickpeinanw marked this pull request as ready for review January 6, 2025 17:34
@patrickpeinanw patrickpeinanw requested a review from hfekete January 6, 2025 17:36
Copy link
Collaborator

@hfekete hfekete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job for using cypress tests to create situations that are hard to achieve.

@patrickpeinanw patrickpeinanw merged commit a1e464a into bcgov:main Jan 6, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants