Rename allUserAccoutList to allUserAccountList (fix typo)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 17:43:12 +08:00
parent fe4738b04c
commit ba7c1c7cd0
3 changed files with 23 additions and 23 deletions

View File

@@ -39,7 +39,7 @@ interface EditDetail {
export const useAcctMgmtStore = defineStore('acctMgmtStore', {
persist: true,
state: () => ({
allUserAccoutList: [] as User[],
allUserAccountList: [] as User[],
isAcctMenuOpen: false,
currentViewingUser: {
username: '',
@@ -74,7 +74,7 @@ export const useAcctMgmtStore = defineStore('acctMgmtStore', {
* @param {string} username
*/
setCurrentViewingUser(username: string) {
const userFind = this.allUserAccoutList.find(user => user.username === username);
const userFind = this.allUserAccountList.find(user => user.username === username);
this.currentViewingUser = userFind;
},
/**
@@ -101,7 +101,7 @@ export const useAcctMgmtStore = defineStore('acctMgmtStore', {
try {
const response = await apiClient.get(apiGetUserList);
const customizedResponseData = await this.customizeAllUserList(response.data);
this.allUserAccoutList = await this.moveCurrentLoginUserToFirstRow(customizedResponseData);
this.allUserAccountList = await this.moveCurrentLoginUserToFirstRow(customizedResponseData);
} catch (error) {
apiError(error, 'Failed to get all users.');
}
@@ -278,7 +278,7 @@ export const useAcctMgmtStore = defineStore('acctMgmtStore', {
* @param {boolean} isDeleteHovered
*/
changeIsDeleteHoveredByUser(username: string, isDeleteHovered: boolean) {
const userToChange = this.allUserAccoutList.find(user => user.username === username);
const userToChange = this.allUserAccountList.find(user => user.username === username);
if (userToChange) {
userToChange.isDeleteHovered = isDeleteHovered;
}
@@ -289,7 +289,7 @@ export const useAcctMgmtStore = defineStore('acctMgmtStore', {
* @param {boolean} isRowHovered
*/
changeIsRowHoveredByUser(username: string, isRowHovered: boolean) {
const userToChange = this.allUserAccoutList.find(user => user.username === username);
const userToChange = this.allUserAccountList.find(user => user.username === username);
if (userToChange) {
userToChange.isRowHovered = isRowHovered;
}
@@ -300,7 +300,7 @@ export const useAcctMgmtStore = defineStore('acctMgmtStore', {
* @param {boolean} isEditHovered
*/
changeIsEditHoveredByUser(username: string, isEditHovered: boolean) {
const userToChange = this.allUserAccoutList.find(user => user.username === username);
const userToChange = this.allUserAccountList.find(user => user.username === username);
if (userToChange) {
userToChange.isEditHovered = isEditHovered;
}
@@ -311,7 +311,7 @@ export const useAcctMgmtStore = defineStore('acctMgmtStore', {
* @param {boolean} isEditHovered
*/
changeIsDetailHoveredByUser(username: string, isDetailHovered: boolean) {
const userToChange = this.allUserAccoutList.find(user => user.username === username);
const userToChange = this.allUserAccountList.find(user => user.username === username);
if (userToChange) {
userToChange.isDetailHovered = isDetailHovered;
}
@@ -332,9 +332,9 @@ export const useAcctMgmtStore = defineStore('acctMgmtStore', {
* @param {object} userDataToReplace
*/
updateSingleAccountPiniaState(userDataToReplace: User) {
const userIndex = this.allUserAccoutList.findIndex(user => user.username === userDataToReplace.username);
const userIndex = this.allUserAccountList.findIndex(user => user.username === userDataToReplace.username);
if (userIndex !== -1) {
this.allUserAccoutList[userIndex] = { ...this.allUserAccoutList[userIndex], ...userDataToReplace };
this.allUserAccountList[userIndex] = { ...this.allUserAccountList[userIndex], ...userDataToReplace };
}
}
},