From 521bb8ded44bc295e247ceeb528c43ce1f8bfee9 Mon Sep 17 00:00:00 2001 From: yoon Date: Thu, 20 Feb 2025 09:19:04 +0900 Subject: [PATCH 1/7] =?UTF-8?q?click=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20.stop?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/user/UserList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/user/UserList.vue b/src/components/user/UserList.vue index c5a1779..835c7ff 100644 --- a/src/components/user/UserList.vue +++ b/src/components/user/UserList.vue @@ -5,7 +5,7 @@ :key="index" class="avatar pull-up" :class="{ 'opacity-100': isUserDisabled(user) }" - @click="toggleDisable(index)" + @click.stop="toggleDisable(index)" data-bs-toggle="tooltip" data-popup="tooltip-custom" data-bs-placement="top" From 7c784464a16073595e910a0e8ef34a322e0e71d3 Mon Sep 17 00:00:00 2001 From: yoon Date: Thu, 20 Feb 2025 09:19:52 +0900 Subject: [PATCH 2/7] =?UTF-8?q?=EC=88=98=EC=A0=95=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/list/ProjectCard.vue | 16 +++++----------- src/components/list/ProjectCardList.vue | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/components/list/ProjectCard.vue b/src/components/list/ProjectCard.vue index 7ea65c0..25195a1 100644 --- a/src/components/list/ProjectCard.vue +++ b/src/components/list/ProjectCard.vue @@ -34,23 +34,17 @@ - + diff --git a/src/components/list/ProjectCardList.vue b/src/components/list/ProjectCardList.vue index 6f65d9f..9b6094b 100644 --- a/src/components/list/ProjectCardList.vue +++ b/src/components/list/ProjectCardList.vue @@ -34,7 +34,8 @@ :is-label="true" :is-common="true" :data="allColors" - v-model="selectedProject.PROJCTCOL" + :value="selectedProject.PROJCTCOL" + @update:data="selectedProject.PROJCTCOL = $event" /> \ No newline at end of file diff --git a/src/components/wordDict/DictWrite.vue b/src/components/wordDict/DictWrite.vue index 65bdceb..12d057c 100644 --- a/src/components/wordDict/DictWrite.vue +++ b/src/components/wordDict/DictWrite.vue @@ -10,10 +10,11 @@ @update:data="selectCategory = $event" @change="onChange" :value="formValue" + :disabled="isDisabled" />
- +
@@ -37,6 +38,7 @@ :is-alert="wordTitleAlert" :modelValue="titleValue" @update:modelValue="wordTitle = $event" + :disabled="isDisabled" />
@@ -56,6 +58,13 @@ import QEditor from '@/components/editor/QEditor.vue'; import FormInput from '@/components/input/FormInput.vue'; import FormSelect from '@/components/input/FormSelect.vue'; import PlusBtn from '../button/PlusBtn.vue'; +import { useUserInfoStore } from '@s/useUserInfoStore'; + +// 유저 구분 +const userStore = useUserInfoStore(); + +// 유저 상태에 따른 disabled +const isDisabled = computed(() => userStore.user.role !== 'ROLE_ADMIN'); const emit = defineEmits(['close','addCategory','addWord']); @@ -73,6 +82,11 @@ const addCategoryAlert = ref(false); //선택 카테고리 const selectCategory = ref(''); +// 제목 상태 +const computedTitle = computed(() => + wordTitle.value === '' ? props.titleValue : wordTitle.value +); + // 카테고리 상태 const selectedCategory = computed(() => selectCategory.value === '' ? props.formValue : selectCategory.value @@ -104,15 +118,18 @@ const toggleInput = () => { showInput.value = !showInput.value; }; + // 카테고리 저장 const saveInput = () => { if(addCategory.value == ''){ addCategoryAlert.value = true; return; + }else { + addCategoryAlert.value = false; } // console.log('입력값 저장됨!',addCategory.value); emit('addCategory', addCategory.value); - showInput.value = false; + // showInput.value = false; }; const onChange = (newValue) => { @@ -122,9 +139,9 @@ const onChange = (newValue) => { //용어 등록 const saveWord = () => { //validation - + // 용어 체크 - if(wordTitle.value == ''){ + if(computedTitle.value == '' || computedTitle.length == 0){ wordTitleAlert.value = true; return; } @@ -137,7 +154,7 @@ const saveWord = () => { const wordData = { id: props.NumValue || null, - title: wordTitle.value, + title: computedTitle.value, category: selectedCategory.value, content: content.value, }; diff --git a/src/views/wordDict/wordDict.vue b/src/views/wordDict/wordDict.vue index 68a060b..d027485 100644 --- a/src/views/wordDict/wordDict.vue +++ b/src/views/wordDict/wordDict.vue @@ -1,6 +1,6 @@ + } + diff --git a/src/components/vacation/ProfileList.vue b/src/components/vacation/ProfileList.vue index 526537c..ae2d257 100644 --- a/src/components/vacation/ProfileList.vue +++ b/src/components/vacation/ProfileList.vue @@ -1,6 +1,6 @@ @@ -38,6 +39,10 @@ const props = defineProps({ type: Boolean, default: false, }, + isEditTextarea: { + type: Boolean, + default: false, + } }); const emit = defineEmits(['submitComment', 'updateReaction', 'editClick']); @@ -46,17 +51,13 @@ const submitComment = (replyData) => { emit('submitComment', replyData); }; -const handleUpdateReaction = (reactionData, commentId) => { - // console.log('📢 BoardCommentList에서 이벤트 수신:', reactionData); - // console.log('📌 전달할 댓글 ID>>>>:', commentId); - +const handleUpdateReaction = (reactionData, commentId, boardId) => { const updatedReactionData = { ...reactionData, - commentId: commentId + commentId: commentId || reactionData.commentId, + boardId: boardId || reactionData.boardId, }; - // console.log('🚀 최종 전달할 데이터:', updatedReactionData); - emit('updateReaction', updatedReactionData); } diff --git a/src/views/board/BoardList.vue b/src/views/board/BoardList.vue index 34740d2..523356f 100644 --- a/src/views/board/BoardList.vue +++ b/src/views/board/BoardList.vue @@ -1,102 +1,104 @@