Skip to content

Commit

Permalink
re-render email list on btn click (bcgov#2843)
Browse files Browse the repository at this point in the history
Signed-off-by: Shaanjot Gill <[email protected]>
  • Loading branch information
shaangill025 authored May 29, 2024
1 parent 281ff67 commit 13b1a53
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions auth-web/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 auth-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth-web",
"version": "2.6.17",
"version": "2.6.18",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
Expand Down
2 changes: 2 additions & 0 deletions auth-web/src/views/auth/staff/SafeEmailView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default defineComponent({
// Call the service method to delete the email from the server
try {
await StaffService.deleteSafeEmail(email)
await getSafeEmails()
} catch (error) {
// eslint-disable-next-line no-console
console.error(`Unable to delete the email, ${error}`)
Expand All @@ -67,6 +68,7 @@ export default defineComponent({
return {
deleteEmail,
getSafeEmails,
safeEmails
}
}
Expand Down
5 changes: 4 additions & 1 deletion auth-web/src/views/auth/staff/StaffDashboardView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
</v-row>
</v-form>
</v-container>
<SafeEmailView />
<SafeEmailView ref="safeEmailView" />
</template>
</BaseVExpansionPanel>

Expand Down Expand Up @@ -342,6 +342,7 @@ export default defineComponent({
setup (props, { root }) {
const searchBusinessForm: Ref<HTMLFormElement> = ref(null)
const emailToAdd = ref(null)
const safeEmailViewRef = ref(null)
const businessStore = useBusinessStore()
const orgStore = useOrgStore()
const userStore = useUserStore()
Expand Down Expand Up @@ -430,6 +431,7 @@ export default defineComponent({
email: [emailToAdd.value]
}
await StaffService.addSafeEmail(safeListEmailsRequestBody)
await safeEmailViewRef.value.getSafeEmails()
} catch (error) {
// eslint-disable-next-line no-console
console.error(`Unable to add the email, ${error}`)
Expand All @@ -441,6 +443,7 @@ export default defineComponent({
formatBusinessIdentifier,
goToInvoluntaryDissolution,
goToManageBusiness,
safeEmailViewRef,
isDevOrTest,
isFormValid,
search,
Expand Down

0 comments on commit 13b1a53

Please sign in to comment.