Skip to content

Commit

Permalink
22084 Clear data before reload (bcgov#677)
Browse files Browse the repository at this point in the history
- app version = 7.3.9
- clear existing tasks/filings before fetching new data
- added missing await in retry method

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>
  • Loading branch information
severinbeauvais and Severin Beauvais authored Jul 2, 2024
1 parent 405a982 commit c47b63a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-filings-ui",
"version": "7.3.8",
"version": "7.3.9",
"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
Expand Down
11 changes: 8 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,12 @@ export default class App extends Mixins(
/** Called when component is created. */
created (): void {
// listen for reload data events
this.$root.$on('reloadData', () => this.fetchData())
this.$root.$on('reloadData', async () => {
// clear Todo List / Filing History List before fetching new data
this.setTasks([])
this.setFilings([])
await this.fetchData()
})
}
/** Called when component is mounted. */
Expand Down Expand Up @@ -856,7 +861,7 @@ export default class App extends Mixins(
}
/** Handles Retry click event from dialogs. */
onClickRetry (hard = false): void {
async onClickRetry (hard = false): Promise<void> {
if (hard) {
// clear session variables and hard-reload the page
// to force new login and try again
Expand All @@ -868,7 +873,7 @@ export default class App extends Mixins(
this.businessAuthErrorDialog = false
this.nameRequestAuthErrorDialog = false
this.nameRequestInvalidDialog = false
this.fetchData()
await this.fetchData()
}
}
Expand Down

0 comments on commit c47b63a

Please sign in to comment.