From 3c81356fa25cea59640874d326e2f90bee3dbaa8 Mon Sep 17 00:00:00 2001 From: Cindy Chang Date: Mon, 22 Jul 2024 13:58:23 +0800 Subject: [PATCH] sonar qube --- src/stores/acctMgmt.ts | 2 +- src/stores/conformanceInput.js | 7 ------- src/stores/pageAdmin.js | 1 - .../AccountManagement/AccountAdmin/AccountAdmin.vue | 1 - src/views/AccountManagement/ModalAccountEditCreate.vue | 9 +++------ 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/stores/acctMgmt.ts b/src/stores/acctMgmt.ts index 77ca21b..718ffb1 100644 --- a/src/stores/acctMgmt.ts +++ b/src/stores/acctMgmt.ts @@ -61,7 +61,7 @@ export default defineStore('acctMgmtStore', { setCurrentViewingUser(username: string) { const userFind:User|undefined = this.allUserAccoutList.find(user => user.username === username); console.log('userFind', userFind); - this.currentViewingUser = userFind ? userFind : { username: '', detail: {} }; + this.currentViewingUser = userFind || { username: '', detail: {} }; }, /** * We have this method because we want to handle create new modal case. diff --git a/src/stores/conformanceInput.js b/src/stores/conformanceInput.js index 0670ef9..3b23e3a 100644 --- a/src/stores/conformanceInput.js +++ b/src/stores/conformanceInput.js @@ -25,13 +25,6 @@ export default defineStore('conformanceInputStore', { getters: { }, actions: { - /** UNUSED - * Set input activity radio data - * @param {object} actRadioData - */ - setActivityRadioStartEndData(actRadioData) { - this.activityRadioData = actRadioData; - }, /** * Sets the activity radio global state for either the start ('From') or end ('To') of a task. * We arrange in this way because backend needs us to communicate in this way. diff --git a/src/stores/pageAdmin.js b/src/stores/pageAdmin.js index c1ca4bd..2dfee7e 100644 --- a/src/stores/pageAdmin.js +++ b/src/stores/pageAdmin.js @@ -26,7 +26,6 @@ export default defineStore('pageAdminStore', { this.activePageComputedByRoute = mapPageNameToCapitalUnifiedName( routeMatched[routeMatched.length - 1].name); } - // console.log('this.activePageComputedByRoute', this.activePageComputedByRoute); }, /** * Set Active Page; the page which the user is currently visiting diff --git a/src/views/AccountManagement/AccountAdmin/AccountAdmin.vue b/src/views/AccountManagement/AccountAdmin/AccountAdmin.vue index cd0d607..2c4fafc 100644 --- a/src/views/AccountManagement/AccountAdmin/AccountAdmin.vue +++ b/src/views/AccountManagement/AccountAdmin/AccountAdmin.vue @@ -120,7 +120,6 @@ import { MODAL_ACCT_EDIT, MODAL_ACCT_INFO, MODAL_DELETE, - accountList, ONCE_RENDER_NUM_OF_DATA, } from "@/constants/constants.js"; import iconDeleteGray from '@/assets/icon-delete-gray.svg'; diff --git a/src/views/AccountManagement/ModalAccountEditCreate.vue b/src/views/AccountManagement/ModalAccountEditCreate.vue index 0d94643..75e0339 100644 --- a/src/views/AccountManagement/ModalAccountEditCreate.vue +++ b/src/views/AccountManagement/ModalAccountEditCreate.vue @@ -58,7 +58,7 @@ v-model="inputPwd" :readonly="!isEditable" @dblclick="onInputDoubleClick"/> - + eye
- + @click="togglePwdConfirmEyeBtn" alt="eye"/> + eye
@@ -152,7 +152,6 @@ export default defineComponent({ setup() { const acctMgmtStore = useAcctMgmtStore(); const modalStore = useModalStore(); - const loginStore = useLoginStore(); const router = useRouter(); const toast = useToast(); @@ -169,7 +168,6 @@ export default defineComponent({ const whichCurrentModal = computed(() => modalStore.whichModal); const isSSO = computed(() => acctMgmtStore.currentViewingUser.is_sso); - const isAdmin = computed(() => acctMgmtStore.currentViewingUser.is_admin); const username = computed(() => acctMgmtStore.currentViewingUser.username); const name = computed(() => acctMgmtStore.currentViewingUser.name); @@ -255,7 +253,6 @@ export default defineComponent({ password: inputPwd.value, name: inputName.value === undefined ? '' : inputName.value, is_active: true, - // is_active: isSetActivedChecked.value, //TODO: 待確認需求規格 }); await toast.success(i18next.t("AcctMgmt.MsgAccountEdited")); isEditable.value = false;