diff --git a/src/components/user/UserList.vue b/src/components/user/UserList.vue index afa2185..c1ae02e 100644 --- a/src/components/user/UserList.vue +++ b/src/components/user/UserList.vue @@ -30,12 +30,14 @@ import { onMounted, ref, nextTick, computed, watch } from 'vue'; import { useUserStore } from '@s/userList'; import { useProjectStore } from '@s/useProjectStore'; import $api from '@api'; +import { useToastStore } from "@s/toastStore"; const emit = defineEmits(['user-list-update']); const userStore = useUserStore(); const userList = ref([]); const baseUrl = $api.defaults.baseURL.replace(/api\/$/, ''); const userProjectPeriods = ref([]); +const toastStore = useToastStore(); const props = defineProps({ projctSeq: { @@ -45,6 +47,10 @@ const props = defineProps({ showOnlyActive: { type: Boolean, default: false + }, + role: { + type:String, + required:false } }); @@ -139,8 +145,16 @@ const isUserDisabled = (user) => { // showOnlyActive가 true일 때는 toggleDisable 함수가 실행되지 않음 const toggleDisable = async (index) => { if (props.showOnlyActive) return; - const user = displayedUserList.value[index]; + + // 본인 계정이면 비활성화 방지 + if (props.role === 'vote') { + if(user.MEMBERSEQ === userStore.userInfo.id) { + toastStore.onToast('본인은 비활성화할 수 없습니다.', 'e'); + return; + } + } + if (user) { const newParticipationStatus = props.projctSeq ? user.PROJCTYON === '1' diff --git a/src/views/voteboard/voteboardWrite.vue b/src/views/voteboard/voteboardWrite.vue index deb6ebc..20d6f1f 100644 --- a/src/views/voteboard/voteboardWrite.vue +++ b/src/views/voteboard/voteboardWrite.vue @@ -10,7 +10,7 @@
투표 인원
- +
2명이상 선택해주세요.