diff --git a/src/stores/acctMgmt.js b/src/stores/acctMgmt.js index 407a0b4..c82ae20 100644 --- a/src/stores/acctMgmt.js +++ b/src/stores/acctMgmt.js @@ -6,7 +6,8 @@ export default defineStore('acctMgmtStore', { allUserAccoutList: [], isAcctMenuOpen: false, currentViewingUser: { - detail: null, + username: "", + detail: {}, }, response: { deleteAccount: null, @@ -58,7 +59,6 @@ export default defineStore('acctMgmtStore', { const response = await this.$axios.get(apiGetUserList); const customizedResponseData = await this.customizeAllUserList(response.data); this.allUserAccoutList = customizedResponseData; - console.log('getAllUserAccounts success'); } catch(error) { apiError(error, 'Failed to get all users.'); } @@ -110,7 +110,6 @@ export default defineStore('acctMgmtStore', { } } catch(error) { - console.log('error', error, error.status, error.code); apiError(error, 'Failed to delete the account.'); return false; }; @@ -124,7 +123,10 @@ export default defineStore('acctMgmtStore', { try{ const response = await this.$axios.get(apiUserDetail); - this.currentViewingUser.detail = response.data; + this.currentViewingUser = { + ...this.currentViewingUser, + detail: response.data, + } if(response.status === 200) { return true; } diff --git a/src/views/AccountManagement/AccountAdmin/index.vue b/src/views/AccountManagement/AccountAdmin/index.vue index c0ad7e4..4417d42 100644 --- a/src/views/AccountManagement/AccountAdmin/index.vue +++ b/src/views/AccountManagement/AccountAdmin/index.vue @@ -16,7 +16,7 @@