sonar qube
This commit is contained in:
@@ -61,7 +61,7 @@ export default defineStore('acctMgmtStore', {
|
|||||||
setCurrentViewingUser(username: string) {
|
setCurrentViewingUser(username: string) {
|
||||||
const userFind:User|undefined = this.allUserAccoutList.find(user => user.username === username);
|
const userFind:User|undefined = this.allUserAccoutList.find(user => user.username === username);
|
||||||
console.log('userFind', userFind);
|
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.
|
* We have this method because we want to handle create new modal case.
|
||||||
|
|||||||
@@ -25,13 +25,6 @@ export default defineStore('conformanceInputStore', {
|
|||||||
getters: {
|
getters: {
|
||||||
},
|
},
|
||||||
actions: {
|
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.
|
* 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.
|
* We arrange in this way because backend needs us to communicate in this way.
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export default defineStore('pageAdminStore', {
|
|||||||
this.activePageComputedByRoute = mapPageNameToCapitalUnifiedName(
|
this.activePageComputedByRoute = mapPageNameToCapitalUnifiedName(
|
||||||
routeMatched[routeMatched.length - 1].name);
|
routeMatched[routeMatched.length - 1].name);
|
||||||
}
|
}
|
||||||
// console.log('this.activePageComputedByRoute', this.activePageComputedByRoute);
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Set Active Page; the page which the user is currently visiting
|
* Set Active Page; the page which the user is currently visiting
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ import {
|
|||||||
MODAL_ACCT_EDIT,
|
MODAL_ACCT_EDIT,
|
||||||
MODAL_ACCT_INFO,
|
MODAL_ACCT_INFO,
|
||||||
MODAL_DELETE,
|
MODAL_DELETE,
|
||||||
accountList,
|
|
||||||
ONCE_RENDER_NUM_OF_DATA,
|
ONCE_RENDER_NUM_OF_DATA,
|
||||||
} from "@/constants/constants.js";
|
} from "@/constants/constants.js";
|
||||||
import iconDeleteGray from '@/assets/icon-delete-gray.svg';
|
import iconDeleteGray from '@/assets/icon-delete-gray.svg';
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
v-model="inputPwd" :readonly="!isEditable" @dblclick="onInputDoubleClick"/>
|
v-model="inputPwd" :readonly="!isEditable" @dblclick="onInputDoubleClick"/>
|
||||||
<img v-if="isPwdEyeOn" src='@/assets/icon-eye-open.svg' class="absolute right-[8px] cursor-pointer"
|
<img v-if="isPwdEyeOn" src='@/assets/icon-eye-open.svg' class="absolute right-[8px] cursor-pointer"
|
||||||
@click="togglePwdEyeBtn"/>
|
@click="togglePwdEyeBtn"/>
|
||||||
<img v-else src='@/assets/icon-eye-hide.svg' class="absolute right-[8px] cursor-pointer" @click="togglePwdEyeBtn"/>
|
<img v-else src='@/assets/icon-eye-hide.svg' class="absolute right-[8px] cursor-pointer" @click="togglePwdEyeBtn" alt="eye"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!isSSO" id="confirm_pwd_row" class="input-row w-full grid grid-cols-2 grid-cols-[122px_1fr] gap-x-4
|
<div v-show="!isSSO" id="confirm_pwd_row" class="input-row w-full grid grid-cols-2 grid-cols-[122px_1fr] gap-x-4
|
||||||
@@ -84,8 +84,8 @@
|
|||||||
'text-[#FF3366]': !isPwdMatched,
|
'text-[#FF3366]': !isPwdMatched,
|
||||||
}"/>
|
}"/>
|
||||||
<img v-if="isPwdConfirmEyeOn" src='@/assets/icon-eye-open.svg' class="absolute right-[8px] cursor-pointer"
|
<img v-if="isPwdConfirmEyeOn" src='@/assets/icon-eye-open.svg' class="absolute right-[8px] cursor-pointer"
|
||||||
@click="togglePwdConfirmEyeBtn"/>
|
@click="togglePwdConfirmEyeBtn" alt="eye"/>
|
||||||
<img v-else src='@/assets/icon-eye-hide.svg' class="absolute right-[8px] cursor-pointer" @click="togglePwdConfirmEyeBtn"/>
|
<img v-else src='@/assets/icon-eye-hide.svg' class="absolute right-[8px] cursor-pointer" @click="togglePwdConfirmEyeBtn" alt="eye"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="dummy-grid h-[24px]"></div> <!-- 透過 dummy-grid 來撐起高度-->
|
<div class="dummy-grid h-[24px]"></div> <!-- 透過 dummy-grid 來撐起高度-->
|
||||||
<div v-show="!isPwdMatched" class="error-msg-section flex justify-start">
|
<div v-show="!isPwdMatched" class="error-msg-section flex justify-start">
|
||||||
@@ -152,7 +152,6 @@ export default defineComponent({
|
|||||||
setup() {
|
setup() {
|
||||||
const acctMgmtStore = useAcctMgmtStore();
|
const acctMgmtStore = useAcctMgmtStore();
|
||||||
const modalStore = useModalStore();
|
const modalStore = useModalStore();
|
||||||
const loginStore = useLoginStore();
|
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
@@ -169,7 +168,6 @@ export default defineComponent({
|
|||||||
const whichCurrentModal = computed(() => modalStore.whichModal);
|
const whichCurrentModal = computed(() => modalStore.whichModal);
|
||||||
|
|
||||||
const isSSO = computed(() => acctMgmtStore.currentViewingUser.is_sso);
|
const isSSO = computed(() => acctMgmtStore.currentViewingUser.is_sso);
|
||||||
const isAdmin = computed(() => acctMgmtStore.currentViewingUser.is_admin);
|
|
||||||
const username = computed(() => acctMgmtStore.currentViewingUser.username);
|
const username = computed(() => acctMgmtStore.currentViewingUser.username);
|
||||||
const name = computed(() => acctMgmtStore.currentViewingUser.name);
|
const name = computed(() => acctMgmtStore.currentViewingUser.name);
|
||||||
|
|
||||||
@@ -255,7 +253,6 @@ export default defineComponent({
|
|||||||
password: inputPwd.value,
|
password: inputPwd.value,
|
||||||
name: inputName.value === undefined ? '' : inputName.value,
|
name: inputName.value === undefined ? '' : inputName.value,
|
||||||
is_active: true,
|
is_active: true,
|
||||||
// is_active: isSetActivedChecked.value, //TODO: 待確認需求規格
|
|
||||||
});
|
});
|
||||||
await toast.success(i18next.t("AcctMgmt.MsgAccountEdited"));
|
await toast.success(i18next.t("AcctMgmt.MsgAccountEdited"));
|
||||||
isEditable.value = false;
|
isEditable.value = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user