WIP My Account.

This commit is contained in:
Cindy Chang
2024-08-27 14:25:20 +08:00
parent 49b8233909
commit 56096a01de
4 changed files with 49 additions and 19 deletions

View File

@@ -61,8 +61,8 @@ export default defineStore('acctMgmtStore', {
* @param {string} username
*/
setCurrentViewingUser(username: string) {
const userFind: User | undefined = this.allUserAccoutList.find(user => user.username === username);
this.currentViewingUser = userFind || { username: '', detail: {} };
const userFind = this.allUserAccoutList.find(user => user.username === username);
this.currentViewingUser = userFind;
},
/**
* We have this method because we want to handle create new modal case.