Skip to content

Commit

Permalink
final test after local env validation (bcgov#2847)
Browse files Browse the repository at this point in the history
Signed-off-by: Shaanjot Gill <[email protected]>
  • Loading branch information
shaangill025 authored May 31, 2024
1 parent bd1e71c commit b526dbc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 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.19",
"version": "2.6.20",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
Expand Down
19 changes: 13 additions & 6 deletions auth-web/src/views/auth/staff/SafeEmailView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,20 @@ import StaffService from '@/services/staff.services'
export default defineComponent({
name: 'SafeEmailView',
setup () {
const getSafeEmails = async () => {
const response = await StaffService.getSafeEmails()
if (response?.data && response.status === 200) {
return response.data
const safeEmails = ref<SafeEmail[]>()
async function getSafeEmails () {
// Call to get the email list from the server
try {
const response = await StaffService.getSafeEmails()
if (response?.data && response.status === 200) {
safeEmails.value = response.data
}
} catch (error) {
// eslint-disable-next-line no-console
console.error(`Unable to get the email list, ${error}`)
}
}
const safeEmails = ref<SafeEmail[]>()
async function deleteEmail (email: string) {
// Call the service method to delete the email from the server
Expand All @@ -63,7 +70,7 @@ export default defineComponent({
}
onMounted(async () => {
safeEmails.value = await getSafeEmails()
await getSafeEmails()
})
return {
Expand Down
6 changes: 3 additions & 3 deletions auth-web/src/views/auth/staff/StaffDashboardView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ export default defineComponent({
setup (props, { root }) {
const searchBusinessForm: Ref<HTMLFormElement> = ref(null)
const emailToAdd = ref(null)
const safeEmailViewRef = ref(null)
const safeEmailView = ref(null)
const businessStore = useBusinessStore()
const orgStore = useOrgStore()
const userStore = useUserStore()
Expand Down Expand Up @@ -431,7 +431,7 @@ export default defineComponent({
email: [emailToAdd.value]
}
await StaffService.addSafeEmail(safeListEmailsRequestBody)
await safeEmailViewRef.value.getSafeEmails()
await safeEmailView.value.getSafeEmails()
} catch (error) {
// eslint-disable-next-line no-console
console.error(`Unable to add the email, ${error}`)
Expand All @@ -443,8 +443,8 @@ export default defineComponent({
formatBusinessIdentifier,
goToInvoluntaryDissolution,
goToManageBusiness,
safeEmailViewRef,
isDevOrTest,
safeEmailView,
isFormValid,
search,
searchBusinessForm,
Expand Down

0 comments on commit b526dbc

Please sign in to comment.