bcgov / namerequest

Public Front End for the Name Request System
1 stars 42 forks source link

18201 Fix error after pressing Incorporate now #749

Closed eve-git closed 9 months ago

eve-git commented 9 months ago

Issue #: bcgov/entity#18201

Description of changes: An account id is required to go further incorp. If user back to NR page without logged in, the error occurred since no account id retrieved. If account id === 0, just simply go back to NR with out error.

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

severinbeauvais commented 9 months ago

Eve, please assign yourself to this PR (so that the check can run), and then enter "gcbrun" to create the preview site where reviewers (and you) can test it. Thanks.

eve-git commented 9 months ago

/gcbrun

bcregistry-sre commented 9 months ago

Temporary Url for review: https://namerequest-dev--pr-749-1sj098ao.web.app

eve-git commented 9 months ago

@JazzarKarim Do you think adding a condition as account.id != 0 before invoking this.incorporateNow is good @ https://github.com/bcgov/namerequest/blob/main/src/App.vue#L272

severinbeauvais commented 9 months ago

@JazzarKarim Do you think adding a condition as account.id != 0 before invoking this.incorporateNow is good @ https://github.com/bcgov/namerequest/blob/18201/src/App.vue#L272

Why not use the isAuthenticated getter? It's better for code to NOT know about details (such as account object) and instead to call helpers/getters for that -- it encapsulates the complexity into one place only.

eve-git commented 9 months ago

/gcbrun

bcregistry-sre commented 9 months ago

Temporary Url for review: https://namerequest-dev--pr-749-1sj098ao.web.app