Merge branch 'khj'
This commit is contained in:
commit
8feaf568a9
@ -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'
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<div class="timeline-header mb-2">
|
||||
<h6 class="mb-0">투표 인원</h6>
|
||||
</div>
|
||||
<UserList @userListInfo="userSet" @user-list-update="handleUserListUpdate" class="mb-3" />
|
||||
<UserList :role="'vote'" @userListInfo="userSet" @user-list-update="handleUserListUpdate" class="mb-3" />
|
||||
<div v-if="UserListAlert" class="invalid-feedback d-block">2명이상 선택해주세요.</div>
|
||||
<form-input
|
||||
title="제목"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user