Merge branch 'main' into commuters
This commit is contained in:
commit
10aaae307e
@ -108,7 +108,6 @@ cursor: not-allowed !important;
|
|||||||
.vac-modal-content {
|
.vac-modal-content {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-radius: 8px;
|
|
||||||
box-shadow: 0px -4px 5px rgba(0, 0, 0, 0.1),
|
box-shadow: 0px -4px 5px rgba(0, 0, 0, 0.1),
|
||||||
0px 4px 0px rgba(0, 0, 0, 0);
|
0px 4px 0px rgba(0, 0, 0, 0);
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
@ -207,44 +206,21 @@ cursor: not-allowed !important;
|
|||||||
.custom-button:hover i {
|
.custom-button:hover i {
|
||||||
color: #ff0800;
|
color: #ff0800;
|
||||||
}
|
}
|
||||||
|
.custom-button:disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* 휴가 사원프로필 */
|
/* 휴가 사원프로필 */
|
||||||
.profile-list {
|
.profile-list {
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 15px;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
justify-content: flex-start;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.profile-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
cursor: pointer;
|
|
||||||
width: calc(33.33% - 10px);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 오전/오후반차,저장버튼 */
|
/* 오전/오후반차,저장버튼 */
|
||||||
/* 버튼 기본 스타일 */
|
/* 버튼 기본 스타일 */
|
||||||
.vac-btn {
|
.vac-btn {
|
||||||
width: 60px;
|
transition: all 0.2sease-in-out;
|
||||||
height: 60px;
|
border: 2px solid transparent;
|
||||||
border-radius: 50%;
|
|
||||||
font-size: 20px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
transition: all 0.2s ease-in-out;
|
|
||||||
display: inline-block;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 1.53;
|
|
||||||
color: #697a8d;
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
cursor: pointer;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
}
|
}
|
||||||
/* 마우스를 올렸을 때 */
|
/* 마우스를 올렸을 때 */
|
||||||
.vac-btn:hover {
|
.vac-btn:hover {
|
||||||
@ -265,8 +241,9 @@ cursor: not-allowed !important;
|
|||||||
.vac-btn-warning{
|
.vac-btn-warning{
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #ffc144;
|
background-color: #ffc144;
|
||||||
border-color: #ffe605;
|
border-color: #ffc144;
|
||||||
box-shadow: 0 0.125rem 0.25rem 0 rgba(255, 171, 0, 0.4);
|
box-shadow: 0 0.125rem 0.25rem 0 rgba(255, 171, 0, 0.4);
|
||||||
|
font-size: 28px;
|
||||||
}
|
}
|
||||||
/* AM 버튼 (선택된 상태) */
|
/* AM 버튼 (선택된 상태) */
|
||||||
.vac-btn-warning.active {
|
.vac-btn-warning.active {
|
||||||
@ -278,26 +255,20 @@ cursor: not-allowed !important;
|
|||||||
background-color: #03c3ec;
|
background-color: #03c3ec;
|
||||||
border-color: #03c3ec;
|
border-color: #03c3ec;
|
||||||
box-shadow: 0 0.125rem 0.25rem 0 rgba(3, 195, 236, 0.4);
|
box-shadow: 0 0.125rem 0.25rem 0 rgba(3, 195, 236, 0.4);
|
||||||
|
font-size: 28px;
|
||||||
}
|
}
|
||||||
/* PM 버튼 (선택된 상태) */
|
/* PM 버튼 (선택된 상태) */
|
||||||
.vac-btn-info.active {
|
.vac-btn-info.active {
|
||||||
background-color: #0b5ed7 !important;
|
background-color: #0b5ed7 !important;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
/* 버튼 기본 (비활성화일 때 기본 녹색) */
|
/* 버튼 기본 */
|
||||||
.vac-btn-success {
|
.vac-btn-success {
|
||||||
font-size: 24px;
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
transition: all 0.2s ease-in-out;
|
transition: all 0.2s ease-in-out;
|
||||||
background-color: #871919 !important;
|
background-color: #871919 !important;
|
||||||
color: white;
|
color: white;
|
||||||
cursor: pointer;
|
border: 2px solid transparent;
|
||||||
border: 1px solid transparent;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
/* 버튼 활성화 */
|
/* 버튼 활성화 */
|
||||||
.vac-btn-success.active {
|
.vac-btn-success.active {
|
||||||
@ -309,7 +280,6 @@ cursor: not-allowed !important;
|
|||||||
}
|
}
|
||||||
/* 버튼 비활성화 */
|
/* 버튼 비활성화 */
|
||||||
.vac-btn-success.disabled {
|
.vac-btn-success.disabled {
|
||||||
border: 3px solid #e6e4e4; /* 붉은색 테두리 적용 */
|
|
||||||
background-color: #bbb8b8 !important;
|
background-color: #bbb8b8 !important;
|
||||||
color: white !important;
|
color: white !important;
|
||||||
cursor: not-allowed !important;
|
cursor: not-allowed !important;
|
||||||
@ -341,17 +311,17 @@ cursor: not-allowed !important;
|
|||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
.vac-grant-modal-title {
|
.vac-grant-modal-title {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
.vac-modal-text {
|
.vac-modal-text {
|
||||||
font-size: 11px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
.vac-modal-title {
|
.vac-modal-title {
|
||||||
font-size: 14px;
|
font-size: 17px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.vacation-item {
|
.vacation-item {
|
||||||
font-size: 12px;
|
font-size: 13px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
@ -367,6 +337,16 @@ cursor: not-allowed !important;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 1500px) {
|
@media (max-width: 1500px) {
|
||||||
|
.vac-grant-modal-title {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.vac-modal-text {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
.vac-modal-title {
|
||||||
|
font-size: 13px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
.close-btn {
|
.close-btn {
|
||||||
top: 5px;
|
top: 5px;
|
||||||
right: 5px;
|
right: 5px;
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
:profileName="comment.author"
|
:profileName="comment.author"
|
||||||
:date="comment.createdAt"
|
:date="comment.createdAt"
|
||||||
:comment="comment"
|
:comment="comment"
|
||||||
|
:profileImg="comment.profileImg"
|
||||||
:showDetail="false"
|
:showDetail="false"
|
||||||
:isLike="!isLike"
|
:isLike="!isLike"
|
||||||
:isCommentPassword="isCommentPassword"
|
:isCommentPassword="isCommentPassword"
|
||||||
@ -23,7 +24,7 @@
|
|||||||
class="form-control"
|
class="form-control"
|
||||||
:value="password"
|
:value="password"
|
||||||
placeholder="비밀번호 입력"
|
placeholder="비밀번호 입력"
|
||||||
@input="$emit('update:password', $event.target.value.trim())"
|
@input="filterInput"
|
||||||
/>
|
/>
|
||||||
<button class="btn btn-primary" @click="logPasswordAndEmit">확인</button>
|
<button class="btn btn-primary" @click="logPasswordAndEmit">확인</button>
|
||||||
</div>
|
</div>
|
||||||
@ -47,7 +48,10 @@
|
|||||||
<!-- <template v-if="isDeleted">
|
<!-- <template v-if="isDeleted">
|
||||||
<p class="m-0 text-muted">댓글이 삭제되었습니다.</p>
|
<p class="m-0 text-muted">댓글이 삭제되었습니다.</p>
|
||||||
</template> -->
|
</template> -->
|
||||||
<PlusButton v-if="isPlusButton" @click="toggleComment" class="mt-6" />
|
<PlusButton v-if="isPlusButton" @click="toggleComment" class="mt-6">
|
||||||
|
<i class="icon-base bx bx-plus beforeRotate" :class="{ rotate: isComment }"></i>
|
||||||
|
</PlusButton>
|
||||||
|
|
||||||
<BoardCommentArea v-if="isComment" :unknown="unknown" @submitComment="submitComment" :commnetId="comment.commentId" />
|
<BoardCommentArea v-if="isComment" :unknown="unknown" @submitComment="submitComment" :commnetId="comment.commentId" />
|
||||||
|
|
||||||
<slot name="reply"></slot>
|
<slot name="reply"></slot>
|
||||||
@ -118,6 +122,11 @@
|
|||||||
'update:password',
|
'update:password',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const filterInput = (event) => {
|
||||||
|
event.target.value = event.target.value.replace(/\s/g, ""); // 공백 제거
|
||||||
|
emit("update:password", event.target.value);
|
||||||
|
};
|
||||||
|
|
||||||
const localEditedContent = ref(props.comment.content);
|
const localEditedContent = ref(props.comment.content);
|
||||||
|
|
||||||
// 댓글 입력 창 토글
|
// 댓글 입력 창 토글
|
||||||
@ -173,3 +182,13 @@
|
|||||||
emit('editClick', props.comment);
|
emit('editClick', props.comment);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
.beforeRotate {
|
||||||
|
transition: transform 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rotate {
|
||||||
|
transform: rotate(45deg);
|
||||||
|
transition: transform 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@ -34,7 +34,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 비밀번호 입력 필드 (익명이 선택된 경우에만 표시) -->
|
<!-- 비밀번호 입력 필드 (익명이 선택된 경우에만 표시) -->
|
||||||
<div v-if="isCheck" class="d-flex align-items-center flex-grow-1">
|
<template v-if="isCheck">
|
||||||
|
<div class="d-flex align-items-center flex-grow-1">
|
||||||
<label class="form-label mb-0 me-3" for="basic-default-password">비밀번호</label>
|
<label class="form-label mb-0 me-3" for="basic-default-password">비밀번호</label>
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
@ -44,15 +45,16 @@
|
|||||||
placeholder="비밀번호 입력"
|
placeholder="비밀번호 입력"
|
||||||
@input="passwordAlertTextHandler"
|
@input="passwordAlertTextHandler"
|
||||||
/>
|
/>
|
||||||
<span v-if="passwordAlert" class="invalid-feedback d-block text-start ms-2">{{ passwordAlert }}</span>
|
|
||||||
<span v-else class="invalid-feedback d-block text-start ms-2">{{ passwordAlert2 }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 답변 쓰기 버튼 -->
|
<!-- 답변 쓰기 버튼 -->
|
||||||
<div class="ms-auto mt-3 mt-md-0">
|
<div class="ms-auto mt-3 mt-md-0">
|
||||||
<SaveBtn class="btn btn-primary" @click="handleCommentSubmit"></SaveBtn>
|
<SaveBtn class="btn btn-primary" @click="handleCommentSubmit"></SaveBtn>
|
||||||
</div>
|
</div>
|
||||||
|
<span v-if="passwordAlert" class="invalid-feedback d-block text-start ms-2">{{ passwordAlert }}</span>
|
||||||
|
<span v-else class="invalid-feedback d-block text-start ms-2">{{ passwordAlert2 }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -101,7 +103,8 @@
|
|||||||
textAlert.value = '';
|
textAlert.value = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
const passwordAlertTextHandler = () => {
|
const passwordAlertTextHandler = (event) => {
|
||||||
|
event.target.value = event.target.value.replace(/\s/g, "");
|
||||||
passwordAlert2.value = '';
|
passwordAlert2.value = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="d-flex align-items-center flex-wrap">
|
<div class="d-flex align-items-center flex-wrap">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<div v-if="!unknown" class="avatar me-2">
|
<div class="avatar me-2">
|
||||||
<img :src="getProfileImage(profilePath)" alt="Avatar" class="rounded-circle" />
|
<img :src="getProfileImage(profileImg)" alt="Avatar" class="rounded-circle" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="me-2">
|
<div class="me-2">
|
||||||
@ -60,10 +60,6 @@
|
|||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
profilePath: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
unknown: {
|
unknown: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
@ -94,6 +90,10 @@
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
profileImg: {
|
||||||
|
type: String,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['updateReaction', 'editClick', 'deleteClick']);
|
const emit = defineEmits(['updateReaction', 'editClick', 'deleteClick']);
|
||||||
@ -122,7 +122,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 프로필 이미지 경로 설정
|
// 프로필 이미지 경로 설정
|
||||||
const getProfileImage = profilePath => {
|
const getProfileImage = profileImg => {
|
||||||
return profilePath && profilePath.trim() ? `${baseUrl}upload/img/profile/${profilePath}` : defaultProfile;
|
return profileImg && profileImg != '' ? `${baseUrl}upload/img/profile/${profileImg}` : defaultProfile;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,29 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menu gap-4 justify-content-center mt-5">
|
<div class="row gx-2 mb-4">
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="ratio ratio-1x1">
|
||||||
<!-- 오전 반차 버튼 -->
|
<!-- 오전 반차 버튼 -->
|
||||||
<button
|
<button class="vac-btn vac-btn-warning rounded-circle d-flex align-items-center justify-content-center" :class="{ active: halfDayType === 'AM' }"
|
||||||
class="vac-btn vac-btn-warning"
|
@click="toggleHalfDay('AM')">
|
||||||
:class="{ active: halfDayType === 'AM' }"
|
|
||||||
@click="toggleHalfDay('AM')"
|
|
||||||
>
|
|
||||||
<i class="bi bi-sun"></i>
|
<i class="bi bi-sun"></i>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="ratio ratio-1x1">
|
||||||
<!-- 오후 반차 버튼 -->
|
<!-- 오후 반차 버튼 -->
|
||||||
<button
|
<button class="vac-btn vac-btn-info rounded-circle d-flex align-items-center justify-content-center" :class="{ active: halfDayType === 'PM' }"
|
||||||
class="vac-btn vac-btn-info"
|
@click="toggleHalfDay('PM')">
|
||||||
:class="{ active: halfDayType === 'PM' }"
|
|
||||||
@click="toggleHalfDay('PM')"
|
|
||||||
>
|
|
||||||
<i class="bi bi-moon"></i>
|
<i class="bi bi-moon"></i>
|
||||||
</button>
|
</button>
|
||||||
<!-- 저장 버튼 -->
|
</div>
|
||||||
<div class="save-button-container">
|
</div>
|
||||||
<button class="vac-btn-success" @click="addVacationRequests"
|
<div class="col-4">
|
||||||
|
<div class="ratio ratio-1x1">
|
||||||
|
<button class="vac-btn-success rounded-circle d-flex align-items-center justify-content-center" @click="addVacationRequests"
|
||||||
:class="{ active: !isDisabled, disabled: isDisabled }">
|
:class="{ active: !isDisabled, disabled: isDisabled }">
|
||||||
✔
|
✔
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<button class="btn btn-label-primary btn-icon">
|
<button class="btn btn-label-primary btn-icon">
|
||||||
|
<slot>
|
||||||
<i class="icon-base bx bx-plus"></i>
|
<i class="icon-base bx bx-plus"></i>
|
||||||
|
</slot>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'PlusButton',
|
name: 'PlusButton',
|
||||||
methods: {
|
methods: {},
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="isOpen" class="vac-modal-dialog" @click.self="closeModal">
|
<div v-if="isOpen" class="vac-modal-dialog" @click.self="closeModal">
|
||||||
<div class="vac-modal-content p-5 modal-scroll">
|
<div class="vac-modal-content p-5 modal-scroll">
|
||||||
<h5 class="vac-modal-title">📅 내 연차 상세 내역</h5>
|
<h5 class="vac-modal-title">📅 내 연차 내역</h5>
|
||||||
<button class="close-btn" @click="closeModal">✖</button>
|
<button class="close-btn" @click="closeModal">✖</button>
|
||||||
<!-- 연차 목록 -->
|
<!-- 연차 목록 -->
|
||||||
<div class="vac-modal-body" v-if="mergedVacations.length > 0">
|
<div class="vac-modal-body" v-if="mergedVacations.length > 0">
|
||||||
@ -57,26 +57,34 @@ const emit = defineEmits(["close"]);
|
|||||||
|
|
||||||
// 사용한 휴가(선물,연차사용)
|
// 사용한 휴가(선물,연차사용)
|
||||||
let globalCounter = 0;
|
let globalCounter = 0;
|
||||||
|
|
||||||
const usedVacations = computed(() => {
|
const usedVacations = computed(() => {
|
||||||
return props.myVacations.flatMap((v) => {
|
const data = props.myVacations.flatMap((v) => {
|
||||||
const count = v.used_quota || 1;
|
|
||||||
return Array.from({ length: count }, (_, i) => ({
|
const count = v.used_quota
|
||||||
|
return Array.from({ length: Math.ceil(count) }, (_, i) => ({
|
||||||
...v,
|
...v,
|
||||||
category: "used",
|
category: "used",
|
||||||
code: v.LOCVACTYP,
|
code: v.LOCVACTYP,
|
||||||
|
used_quota: count, // 반차 강제 포함
|
||||||
_expandIndex: globalCounter++,
|
_expandIndex: globalCounter++,
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
return data;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 받은 휴가
|
// 받은 휴가
|
||||||
const receivedVacations = computed(() =>
|
const receivedVacations = computed(() => {
|
||||||
props.receivedVacations.map((v) => ({
|
const data = props.receivedVacations.flatMap((v) => {
|
||||||
|
const count = v.received_quota ?? 1;
|
||||||
|
return Array.from({ length: Math.ceil(count) }, (_, i) => ({
|
||||||
...v,
|
...v,
|
||||||
category: "received",
|
category: "received",
|
||||||
}))
|
_expandIndex: globalCounter++,
|
||||||
);
|
}));
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
});
|
||||||
// 필터링
|
// 필터링
|
||||||
const sortedUsedVacationsAsc = computed(() => {
|
const sortedUsedVacationsAsc = computed(() => {
|
||||||
return [...usedVacations.value].sort((a, b) => {
|
return [...usedVacations.value].sort((a, b) => {
|
||||||
|
|||||||
@ -1,31 +1,42 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="input-group mb-3 d-flex">
|
<div class="input-group mb-3 d-flex">
|
||||||
<input type="text" class="form-control" placeholder="Search" @change="search" @input="preventLeadingSpace" />
|
<input
|
||||||
<button type="button" class="btn btn-primary"><i class="bx bx-search bx-md"></i></button>
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
placeholder="Search"
|
||||||
|
v-model="searchQuery"
|
||||||
|
@keyup.enter="search"
|
||||||
|
@input="preventLeadingSpace"
|
||||||
|
/>
|
||||||
|
<button type="button" class="btn btn-primary" @click="search">
|
||||||
|
<i class="bx bx-search bx-md"></i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const props = defineProps({
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
maxlength: {
|
maxlength: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 30,
|
default: 30,
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const emits = defineEmits(['update:data']);
|
const emits = defineEmits(["update:data"]);
|
||||||
|
const searchQuery = ref("");
|
||||||
|
|
||||||
const search = function (event) {
|
const search = function () {
|
||||||
|
// Type Number 일때 maxlength 적용 안됨 방지
|
||||||
//Type Number 일때 maxlength 적용 안됨 방지
|
if (searchQuery.value.length > props.maxlength) {
|
||||||
if (event.target.value.length > props.maxlength) {
|
searchQuery.value = searchQuery.value.slice(0, props.maxlength);
|
||||||
event.target.value = event.target.value.slice(0, props.maxlength);
|
|
||||||
}
|
}
|
||||||
emits('update:data', event.target.value);
|
emits("update:data", searchQuery.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const preventLeadingSpace = function (event) {
|
const preventLeadingSpace = function () {
|
||||||
event.target.value = event.target.value.trimStart();
|
searchQuery.value = searchQuery.value.trimStart();
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,15 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card-body d-flex justify-content-center m-n5">
|
<div class="">
|
||||||
<ul class="profile-list">
|
<ul class="row gx-2 mb-2 list-inline">
|
||||||
<li
|
<li
|
||||||
v-for="(user, index) in sortedUserList"
|
v-for="(user, index) in sortedUserList"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="profile-item"
|
class="col-4 mb-3"
|
||||||
:class="{ newRow: (index + 1) % 4 === 0 }"
|
:class="{ newRow: (index + 1) % 4 === 0 }"
|
||||||
@click="$emit('profileClick', user)"
|
@click="$emit('profileClick', user)"
|
||||||
data-bs-placement="top"
|
data-bs-placement="top"
|
||||||
:aria-label="user.MEMBERSEQ"
|
:aria-label="user.MEMBERSEQ"
|
||||||
>
|
>
|
||||||
|
<div class="ratio ratio-1x1 mb-2 profile-list">
|
||||||
<img
|
<img
|
||||||
class="rounded-circle profile-img"
|
class="rounded-circle profile-img"
|
||||||
:src="getUserProfileImage(user.MEMBERPRF)"
|
:src="getUserProfileImage(user.MEMBERPRF)"
|
||||||
@ -18,6 +19,7 @@
|
|||||||
@error="setDefaultImage"
|
@error="setDefaultImage"
|
||||||
@load="showImage"
|
@load="showImage"
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
<span class="mt-2 text-sm-center d-block fs-6 remaining-vacation">
|
<span class="mt-2 text-sm-center d-block fs-6 remaining-vacation">
|
||||||
{{ remainingVacationData[user.MEMBERSEQ] || 0 }}
|
{{ remainingVacationData[user.MEMBERSEQ] || 0 }}
|
||||||
</span>
|
</span>
|
||||||
@ -110,9 +112,7 @@ if (windowWidth.value >= 1850) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const getDynamicStyle = (user) => ({
|
const getDynamicStyle = (user) => ({
|
||||||
width: profileSize.value,
|
borderWidth: "3px",
|
||||||
height: profileSize.value,
|
|
||||||
borderWidth: "4px",
|
|
||||||
borderColor: user.usercolor || "#ccc",
|
borderColor: user.usercolor || "#ccc",
|
||||||
borderStyle: "solid",
|
borderStyle: "solid",
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card mb-6" :class="{'disabled-class': data.localVote.LOCVOTDDT}" >
|
<div class="card mb-6" :class="{ 'disabled-class': data.localVote.LOCVOTDDT && (topVoters.length == 1 || data.localVote.LOCVOTRES || voteResult == 0)}">
|
||||||
<div class="card-body" v-if="!data.localVote.LOCVOTDEL" >
|
<div class="card-body" v-if="!data.localVote.LOCVOTDEL" >
|
||||||
<h5 class="card-title mb-1">
|
<h5 class="card-title mb-1">
|
||||||
<div class="list-unstyled users-list d-flex align-items-center gap-1">
|
<div class="list-unstyled users-list d-flex align-items-center gap-1">
|
||||||
@ -15,21 +15,22 @@
|
|||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
<h6 class="mb-1">{{ data.localVote.MEMBERNAM }}</h6>
|
<h6 class="mb-1">{{ data.localVote.MEMBERNAM }}</h6>
|
||||||
|
<!-- 투표완료시 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="add-btn d-flex align-items-center">
|
<div class="add-btn d-flex align-items-center">
|
||||||
<!-- 투표완료시 -->
|
|
||||||
<i v-if="yesVotetotal != '0'" class="bx bxs-check-circle link-success"></i>
|
|
||||||
<!-- 투표작성자만 수정/삭제/종료 가능 -->
|
<!-- 투표작성자만 수정/삭제/종료 가능 -->
|
||||||
<div v-if="userStore.user.id === data.localVote.LOCVOTREG">
|
<div v-if="userStore.user.id === data.localVote.LOCVOTREG">
|
||||||
<button
|
<button
|
||||||
v-if="!data.localVote.LOCVOTDDT"
|
v-if="!data.localVote.LOCVOTDDT"
|
||||||
type="button"
|
type="button"
|
||||||
class="bx btn btn-danger"
|
class="btn btn-label-danger btn-icon"
|
||||||
@click="endBtn(data.localVote.LOCVOTSEQ)"
|
@click="endBtn(data.localVote.LOCVOTSEQ)"
|
||||||
>종료</button>
|
><i class="bx bx-power-off"></i>
|
||||||
|
</button>
|
||||||
<DeleteBtn v-if="!data.localVote.LOCVOTDDT" @click="voteDelete(data.localVote.LOCVOTSEQ)" />
|
<DeleteBtn v-if="!data.localVote.LOCVOTDDT" @click="voteDelete(data.localVote.LOCVOTSEQ)" />
|
||||||
</div>
|
</div>
|
||||||
<p v-if="data.localVote.LOCVOTDDT" class="btn-icon btn-danger rounded-2"><i class="bx bx-power-off"></i></p>
|
<p v-if="data.localVote.LOCVOTDDT" class="btn-icon btn-danger rounded-2"><i class="bx bx-power-off"></i></p>
|
||||||
|
<i v-if="yesVotetotal != '0'" class="bx bxs-check-circle link-success"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -54,7 +55,7 @@
|
|||||||
|
|
||||||
<!-- 투표 결과 -->
|
<!-- 투표 결과 -->
|
||||||
<div v-if="data.localVote.LOCVOTDDT" class="mt-3">
|
<div v-if="data.localVote.LOCVOTDDT" class="mt-3">
|
||||||
<vote-result-list :data="data.voteDetails" @randomList="randomList" :randomResultNum="data.localVote.LOCVOTRES"/>
|
<vote-result-list :data="topVoters" @randomList="randomList" :randomResultNum="data.localVote.LOCVOTRES" :locvotreg="data.localVote.LOCVOTREG"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 투표완/미완 인원 -->
|
<!-- 투표완/미완 인원 -->
|
||||||
<vote-user-list
|
<vote-user-list
|
||||||
@ -95,6 +96,14 @@ const yesVotetotal = computed(() => {
|
|||||||
return props.data.voteDetails.reduce((sum, item) => sum + item.yesvote, 0);
|
return props.data.voteDetails.reduce((sum, item) => sum + item.yesvote, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 가장 많은 투표를 받은 항목들 (1위)
|
||||||
|
const topVoters = computed(() => {
|
||||||
|
// 가장 높은 VOTE_COUNT 찾기
|
||||||
|
const maxVoteCount = Math.max(...props.data.voteDetails.map(item => item.VOTE_COUNT));
|
||||||
|
// VOTE_COUNT가 가장 높은 항목들 필터링
|
||||||
|
return props.data.voteDetails.filter(item => item.VOTE_COUNT === maxVoteCount);
|
||||||
|
});
|
||||||
|
|
||||||
const baseUrl = $api.defaults.baseURL.replace(/api\/$/, '');
|
const baseUrl = $api.defaults.baseURL.replace(/api\/$/, '');
|
||||||
const userStore = useUserInfoStore();
|
const userStore = useUserInfoStore();
|
||||||
const currentDate = new Date();
|
const currentDate = new Date();
|
||||||
@ -104,7 +113,6 @@ voteEndDate.setDate(voteEndDate.getDate() + 1);
|
|||||||
const isVoteEnded = computed(() => {
|
const isVoteEnded = computed(() => {
|
||||||
return currentDate > voteEndDate;
|
return currentDate > voteEndDate;
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['addContents','checkedNames','endVoteId','voteEnded','randomList','voteDelete','updateVote']);
|
const emit = defineEmits(['addContents','checkedNames','endVoteId','voteEnded','randomList','voteDelete','updateVote']);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (isVoteEnded.value && !props.data.localVote.LOCVOTDDT) {
|
if (isVoteEnded.value && !props.data.localVote.LOCVOTDDT) {
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="card mb-6 border border-2 border-primary rounded primary-shadow">
|
<div class="card mb-6 border border-2 border-primary rounded primary-shadow">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<!-- 1위가 여러개일때 -->
|
<!-- 1위가 여러개일때 -->
|
||||||
<vote-result-random v-if="topVoters.length > 1" :data="topVoters" :randomResultNum="randomResultNum"
|
<vote-result-random v-if="topVoters.length > 1" :data="topVoters" :randomResultNum="randomResultNum" :locvotreg="locvotreg"
|
||||||
@randomList="randomList"/>
|
@randomList="randomList"/>
|
||||||
<!-- 1위가 하나일때-->
|
<!-- 1위가 하나일때-->
|
||||||
<vote-result-card v-if="topVoters.length == 1" :data="topVoters"/>
|
<vote-result-card v-if="topVoters.length == 1" :data="topVoters"/>
|
||||||
@ -24,6 +24,10 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
|
locvotreg: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
// 가장 많은 투표를 받은 항목들 (1위)
|
// 가장 많은 투표를 받은 항목들 (1위)
|
||||||
const topVoters = computed(() => {
|
const topVoters = computed(() => {
|
||||||
|
|||||||
@ -16,9 +16,8 @@
|
|||||||
<span class="spinner-grow me-1" role="status" aria-hidden="true"></span>
|
<span class="spinner-grow me-1" role="status" aria-hidden="true"></span>
|
||||||
random..
|
random..
|
||||||
</button>
|
</button>
|
||||||
<div class="d-grid w-100 mt-6">
|
<div class="d-grid w-100 mt-6" v-if="userStore.user.id === locvotreg">
|
||||||
<button v-if="!isRandom && !randomResultNum" @click="randomList" class="btn btn-primary"><i class='bx bx-sync'></i></button>
|
<button v-if="!isRandom && !randomResultNum" @click="randomList" class="btn btn-primary"><i class='bx bx-sync'></i></button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -26,6 +25,7 @@
|
|||||||
import voteResultRandomList from "@c/voteboard/voteResultRandomList.vue"
|
import voteResultRandomList from "@c/voteboard/voteResultRandomList.vue"
|
||||||
import voteResultCard from '@c/voteboard/voteResultCard.vue';
|
import voteResultCard from '@c/voteboard/voteResultCard.vue';
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
|
import { useUserInfoStore } from "@s/useUserInfoStore";
|
||||||
const emit = defineEmits(['randomList']);
|
const emit = defineEmits(['randomList']);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
@ -36,7 +36,12 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
|
locvotreg: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
const userStore = useUserInfoStore();
|
||||||
const isRandom = ref(false);
|
const isRandom = ref(false);
|
||||||
const randomList = () =>{
|
const randomList = () =>{
|
||||||
isRandom.value = true;
|
isRandom.value = true;
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
:boardId="currentBoardId"
|
:boardId="currentBoardId"
|
||||||
:profileName="profileName"
|
:profileName="profileName"
|
||||||
:unknown="unknown"
|
:unknown="unknown"
|
||||||
|
:profileImg="profileImg"
|
||||||
:views="views"
|
:views="views"
|
||||||
:commentNum="commentNum"
|
:commentNum="commentNum"
|
||||||
:date="formattedBoardDate"
|
:date="formattedBoardDate"
|
||||||
@ -35,7 +36,7 @@
|
|||||||
/>
|
/>
|
||||||
<button class="btn btn-primary" @click="submitPassword">확인</button>
|
<button class="btn btn-primary" @click="submitPassword">확인</button>
|
||||||
</div>
|
</div>
|
||||||
<span v-if="passwordAlert" class="invalid-feedback d-block text-start">{{ passwordAlert }}</span>
|
<span v-if="boardPasswordAlert" class="invalid-feedback d-block text-start">{{ boardPasswordAlert }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -59,7 +60,7 @@
|
|||||||
<i class="fa-solid fa-download me-2"></i>
|
<i class="fa-solid fa-download me-2"></i>
|
||||||
첨부파일 ({{ attachments.length }}개)
|
첨부파일 ({{ attachments.length }}개)
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu" style="z-index: 1004">
|
||||||
<li v-for="(attachment, index) in attachments" :key="index">
|
<li v-for="(attachment, index) in attachments" :key="index">
|
||||||
<a class="dropdown-item" href="#" @click.prevent="downloadFile(attachment)">
|
<a class="dropdown-item" href="#" @click.prevent="downloadFile(attachment)">
|
||||||
{{ attachment.originalName }}.{{ attachment.extension }}
|
{{ attachment.originalName }}.{{ attachment.extension }}
|
||||||
@ -150,6 +151,7 @@
|
|||||||
const commentNum = ref(0);
|
const commentNum = ref(0);
|
||||||
const attachment = ref(false);
|
const attachment = ref(false);
|
||||||
const comments = ref([]);
|
const comments = ref([]);
|
||||||
|
const profileImg = ref('');
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -157,7 +159,7 @@
|
|||||||
const toastStore = useToastStore();
|
const toastStore = useToastStore();
|
||||||
const currentBoardId = ref(Number(route.params.id));
|
const currentBoardId = ref(Number(route.params.id));
|
||||||
const unknown = computed(() => profileName.value === '익명');
|
const unknown = computed(() => profileName.value === '익명');
|
||||||
const currentUserId = computed(() => userStore.user.id); // 현재 로그인한 사용자 id
|
const currentUserId = computed(() => userStore?.user?.id); // 현재 로그인한 사용자 id
|
||||||
const authorId = ref(''); // 작성자 id
|
const authorId = ref(''); // 작성자 id
|
||||||
|
|
||||||
const isAuthor = computed(() => currentUserId.value === authorId.value);
|
const isAuthor = computed(() => currentUserId.value === authorId.value);
|
||||||
@ -208,6 +210,7 @@
|
|||||||
const isEditTextarea = ref(false);
|
const isEditTextarea = ref(false);
|
||||||
const isDeleted = ref(true);
|
const isDeleted = ref(true);
|
||||||
const commentAlert = ref('');
|
const commentAlert = ref('');
|
||||||
|
const boardPasswordAlert = ref('');
|
||||||
|
|
||||||
const updatePassword = newPassword => {
|
const updatePassword = newPassword => {
|
||||||
password.value = newPassword;
|
password.value = newPassword;
|
||||||
@ -233,7 +236,6 @@
|
|||||||
};
|
};
|
||||||
// 게시물 상세 데이터 불러오기
|
// 게시물 상세 데이터 불러오기
|
||||||
const fetchBoardDetails = async () => {
|
const fetchBoardDetails = async () => {
|
||||||
try {
|
|
||||||
const response = await axios.get(`board/${currentBoardId.value}`);
|
const response = await axios.get(`board/${currentBoardId.value}`);
|
||||||
const data = response.data.data;
|
const data = response.data.data;
|
||||||
|
|
||||||
@ -241,6 +243,7 @@
|
|||||||
authorId.value = data.authorId;
|
authorId.value = data.authorId;
|
||||||
boardTitle.value = data.title || '제목 없음';
|
boardTitle.value = data.title || '제목 없음';
|
||||||
boardContent.value = data.content || '';
|
boardContent.value = data.content || '';
|
||||||
|
profileImg.value = data.profileImg || '';
|
||||||
date.value = data.date || '';
|
date.value = data.date || '';
|
||||||
views.value = data.cnt || 0;
|
views.value = data.cnt || 0;
|
||||||
likes.value = data.likeCount || 0;
|
likes.value = data.likeCount || 0;
|
||||||
@ -248,9 +251,6 @@
|
|||||||
attachment.value = data.hasAttachment || null;
|
attachment.value = data.hasAttachment || null;
|
||||||
commentNum.value = data.commentCount || 0;
|
commentNum.value = data.commentCount || 0;
|
||||||
attachments.value = data.attachments || [];
|
attachments.value = data.attachments || [];
|
||||||
} catch (error) {
|
|
||||||
alert('게시물 데이터를 불러오는 중 오류가 발생했습니다.');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 좋아요, 싫어요
|
// 좋아요, 싫어요
|
||||||
@ -280,7 +280,6 @@
|
|||||||
const handleCommentReaction = async ({ boardId, commentId, isLike, isDislike }) => {
|
const handleCommentReaction = async ({ boardId, commentId, isLike, isDislike }) => {
|
||||||
if (!commentId) return; // 댓글 ID가 없으면 실행 안 함
|
if (!commentId) return; // 댓글 ID가 없으면 실행 안 함
|
||||||
|
|
||||||
try {
|
|
||||||
const response = await axios.post(`/board/${boardId}/${commentId}/reaction`, {
|
const response = await axios.post(`/board/${boardId}/${commentId}/reaction`, {
|
||||||
LOCBRDSEQ: boardId, // 게시글 ID
|
LOCBRDSEQ: boardId, // 게시글 ID
|
||||||
LOCCMTSEQ: commentId, // 댓글 ID
|
LOCCMTSEQ: commentId, // 댓글 ID
|
||||||
@ -289,14 +288,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
await fetchComments();
|
await fetchComments();
|
||||||
} catch (error) {
|
|
||||||
alert('오류가 발생했습니다.');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 댓글 목록 조회
|
// 댓글 목록 조회
|
||||||
const fetchComments = async (page = 1) => {
|
const fetchComments = async (page = 1) => {
|
||||||
try {
|
|
||||||
// 댓글
|
// 댓글
|
||||||
const response = await axios.get(`board/${currentBoardId.value}/comments`, {
|
const response = await axios.get(`board/${currentBoardId.value}/comments`, {
|
||||||
params: {
|
params: {
|
||||||
@ -313,6 +308,7 @@
|
|||||||
content: comment.LOCCMTRPY,
|
content: comment.LOCCMTRPY,
|
||||||
likeCount: comment.likeCount || 0,
|
likeCount: comment.likeCount || 0,
|
||||||
dislikeCount: comment.dislikeCount || 0,
|
dislikeCount: comment.dislikeCount || 0,
|
||||||
|
profileImg: comment.profileImg || '',
|
||||||
likeClicked: comment.likeClicked || false,
|
likeClicked: comment.likeClicked || false,
|
||||||
dislikeClicked: comment.dislikeClicked || false,
|
dislikeClicked: comment.dislikeClicked || false,
|
||||||
createdAtRaw: new Date(comment.LOCCMTRDT), // 정렬용
|
createdAtRaw: new Date(comment.LOCCMTRDT), // 정렬용
|
||||||
@ -334,6 +330,7 @@
|
|||||||
comment.children = replyResponse.data.data.map(reply => ({
|
comment.children = replyResponse.data.data.map(reply => ({
|
||||||
author: reply.author || '익명',
|
author: reply.author || '익명',
|
||||||
authorId: reply.authorId,
|
authorId: reply.authorId,
|
||||||
|
profileImg: reply.profileImg || '',
|
||||||
commentId: reply.LOCCMTSEQ,
|
commentId: reply.LOCCMTSEQ,
|
||||||
boardId: reply.LOCBRDSEQ,
|
boardId: reply.LOCBRDSEQ,
|
||||||
parentId: reply.LOCCMTPNT, // 부모 댓글 ID
|
parentId: reply.LOCCMTPNT, // 부모 댓글 ID
|
||||||
@ -349,7 +346,7 @@
|
|||||||
comment.children = []; // 대댓글이 없으면 빈 배열로 초기화
|
comment.children = []; // 대댓글이 없으면 빈 배열로 초기화
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
commentsList;
|
||||||
// 최종적으로 댓글 목록 업데이트
|
// 최종적으로 댓글 목록 업데이트
|
||||||
comments.value = commentsList;
|
comments.value = commentsList;
|
||||||
|
|
||||||
@ -368,13 +365,13 @@
|
|||||||
navigateFirstPage: response.data.data.navigateFirstPage, // 페이지네이션에서 첫 페이지 번호
|
navigateFirstPage: response.data.data.navigateFirstPage, // 페이지네이션에서 첫 페이지 번호
|
||||||
navigateLastPage: response.data.data.navigateLastPage, // 페이지네이션에서 마지막 페이지 번호
|
navigateLastPage: response.data.data.navigateLastPage, // 페이지네이션에서 마지막 페이지 번호
|
||||||
};
|
};
|
||||||
} catch (error) {
|
|
||||||
alert('오류가 발생했습니다.');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 댓글 작성
|
// 댓글 작성
|
||||||
const handleCommentSubmit = async data => {
|
const handleCommentSubmit = async data => {
|
||||||
|
closeAllEditTextareas();
|
||||||
|
closeAllPasswordAreas();
|
||||||
|
togglePassword('close');
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -453,7 +450,9 @@
|
|||||||
|
|
||||||
// 게시글 삭제 버튼 클릭
|
// 게시글 삭제 버튼 클릭
|
||||||
const deleteClick = unknown => {
|
const deleteClick = unknown => {
|
||||||
if (unknown) {
|
const isUnknown = unknown?.unknown ?? false;
|
||||||
|
|
||||||
|
if (isUnknown) {
|
||||||
togglePassword('delete');
|
togglePassword('delete');
|
||||||
} else {
|
} else {
|
||||||
deletePost();
|
deletePost();
|
||||||
@ -477,32 +476,34 @@
|
|||||||
const editComment = comment => {
|
const editComment = comment => {
|
||||||
password.value = '';
|
password.value = '';
|
||||||
passwordCommentAlert.value = '';
|
passwordCommentAlert.value = '';
|
||||||
currentPasswordCommentId.value = null;
|
//currentPasswordCommentId.value = null;
|
||||||
|
isPassword.value = false; // 상단 프로필 비밀번호
|
||||||
|
|
||||||
const targetComment = findCommentById(comment.commentId, comments.value);
|
const targetComment = findCommentById(comment.commentId, comments.value);
|
||||||
|
|
||||||
if (!targetComment) {
|
if (!targetComment) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isMyComment = comment.authorId === currentUserId.value;
|
const isMyComment = comment.authorId === currentUserId.value;
|
||||||
const isAnonymous = comment.author === '익명';
|
const isAnonymous = comment.author === '익명';
|
||||||
|
|
||||||
if (isMyComment) {
|
if (isMyComment) {
|
||||||
if (targetComment.isEditTextarea) {
|
if (targetComment.isEditTextarea) {
|
||||||
// 수정창이 열려 있는 상태에서 다시 수정 버튼을 누르면 초기화
|
// 수정창이 열려 있는 상태에서 다시 수정 버튼을 누르면 초기화
|
||||||
|
|
||||||
targetComment.isEditTextarea = false;
|
targetComment.isEditTextarea = false;
|
||||||
|
|
||||||
currentPasswordCommentId.value = comment.commentId;
|
currentPasswordCommentId.value = comment.commentId;
|
||||||
} else {
|
} else {
|
||||||
// 다른 모든 댓글의 수정창 닫기
|
// 다른 모든 댓글의 수정창 닫기
|
||||||
closeAllEditTextareas();
|
closeAllEditTextareas();
|
||||||
|
currentPasswordCommentId.value = null;
|
||||||
// 현재 댓글만 수정 모드 활성화
|
// 현재 댓글만 수정 모드 활성화
|
||||||
targetComment.isEditTextarea = true;
|
targetComment.isEditTextarea = true;
|
||||||
}
|
}
|
||||||
} else if (isAnonymous) {
|
} else if (isAnonymous) {
|
||||||
if (currentPasswordCommentId.value === comment.commentId) {
|
if (currentPasswordCommentId.value === comment.commentId) {
|
||||||
// 이미 비밀번호 입력 중이면 유지
|
// 이미 비밀번호 입력 중이면 유지
|
||||||
|
toggleCommentPassword(comment, 'edit');
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// 다른 모든 댓글의 수정창 닫기
|
// 다른 모든 댓글의 수정창 닫기
|
||||||
@ -527,6 +528,13 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 모든 댓글의 비밀번호 창 닫기
|
||||||
|
const closeAllPasswordAreas = () => {
|
||||||
|
currentPasswordCommentId.value = null; // 비밀번호 창 닫기
|
||||||
|
password.value = '';
|
||||||
|
passwordCommentAlert.value = '';
|
||||||
|
};
|
||||||
|
|
||||||
// 댓글 삭제 버튼 클릭
|
// 댓글 삭제 버튼 클릭
|
||||||
const deleteComment = async comment => {
|
const deleteComment = async comment => {
|
||||||
const isMyComment = comment.authorId === currentUserId.value;
|
const isMyComment = comment.authorId === currentUserId.value;
|
||||||
@ -559,19 +567,27 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const togglePassword = button => {
|
const togglePassword = button => {
|
||||||
|
// close: 게시글 비밀번호 란을 초기화 한다.
|
||||||
|
if (button === 'close') {
|
||||||
|
isPassword.value = false;
|
||||||
|
boardPasswordAlert.value = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (lastClickedButton.value === button) {
|
if (lastClickedButton.value === button) {
|
||||||
isPassword.value = !isPassword.value;
|
isPassword.value = !isPassword.value;
|
||||||
|
boardPasswordAlert.value = '';
|
||||||
} else {
|
} else {
|
||||||
isPassword.value = true;
|
isPassword.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastClickedButton.value = button;
|
lastClickedButton.value = button;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 게시글 비밀번호 제출
|
// 게시글 비밀번호 제출
|
||||||
const submitPassword = async () => {
|
const submitPassword = async () => {
|
||||||
if (!password.value.trim()) {
|
if (!password.value.trim()) {
|
||||||
passwordAlert.value = '비밀번호를 입력해주세요.';
|
boardPasswordAlert.value = '비밀번호를 입력해주세요.';
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -582,7 +598,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (response.data.code === 200 && response.data.data === true) {
|
if (response.data.code === 200 && response.data.data === true) {
|
||||||
password.value = '';
|
boardPasswordAlert.value = '';
|
||||||
isPassword.value = false;
|
isPassword.value = false;
|
||||||
|
|
||||||
if (lastClickedButton.value === 'edit') {
|
if (lastClickedButton.value === 'edit') {
|
||||||
@ -592,10 +608,10 @@
|
|||||||
}
|
}
|
||||||
lastClickedButton.value = null;
|
lastClickedButton.value = null;
|
||||||
} else {
|
} else {
|
||||||
passwordAlert.value = '비밀번호가 일치하지 않습니다.';
|
boardPasswordAlert.value = '비밀번호가 일치하지 않습니다.';
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.response && error.response.status === 401) passwordAlert.value = '비밀번호가 일치하지 않습니다.';
|
if (error.response && error.response.status === 401) boardPasswordAlert.value = '비밀번호가 일치하지 않습니다.';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -677,16 +693,14 @@
|
|||||||
if (!confirm('정말 이 댓글을 삭제하시겠습니까?')) return;
|
if (!confirm('정말 이 댓글을 삭제하시겠습니까?')) return;
|
||||||
|
|
||||||
const targetComment = findCommentById(comment.commentId, comments.value);
|
const targetComment = findCommentById(comment.commentId, comments.value);
|
||||||
|
|
||||||
// console.log('잘되니?',comment)
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await axios.delete(`board/comment/${comment.commentId}`, {
|
const response = await axios.delete(`board/comment/${comment.commentId}`, {
|
||||||
data: { LOCCMTSEQ: comment.commentId },
|
params: { LOCCMTSEQ: comment.commentId, LOCCMTPNT: comment.parentId },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.data.code === 200) {
|
if (response.data.code === 200) {
|
||||||
await fetchComments();
|
await fetchComments();
|
||||||
|
closeAllPasswordAreas();
|
||||||
|
|
||||||
if (targetComment) {
|
if (targetComment) {
|
||||||
// console.log('타겟',targetComment)
|
// console.log('타겟',targetComment)
|
||||||
@ -705,6 +719,7 @@
|
|||||||
|
|
||||||
// 댓글 수정 확인
|
// 댓글 수정 확인
|
||||||
const handleSubmitEdit = async (comment, editedContent) => {
|
const handleSubmitEdit = async (comment, editedContent) => {
|
||||||
|
togglePassword();
|
||||||
try {
|
try {
|
||||||
const response = await axios.put(`board/comment/${comment.commentId}`, {
|
const response = await axios.put(`board/comment/${comment.commentId}`, {
|
||||||
LOCCMTSEQ: comment.commentId,
|
LOCCMTSEQ: comment.commentId,
|
||||||
|
|||||||
@ -3,9 +3,10 @@
|
|||||||
<div class="card app-calendar-wrapper">
|
<div class="card app-calendar-wrapper">
|
||||||
<div class="row g-0">
|
<div class="row g-0">
|
||||||
<!-- Sidebar: 사이드바 영역 -->
|
<!-- Sidebar: 사이드바 영역 -->
|
||||||
<div class="col-3 app-calendar-sidebar border-end" id="app-calendar-sidebar">
|
<div class="col-3 border-end text-center" id="app-calendar-sidebar">
|
||||||
<div class="sidebar-content">
|
<div>
|
||||||
<div class="sidebar-actions text-center my-3">
|
|
||||||
|
<div class="card-body">
|
||||||
<HalfDayButtons
|
<HalfDayButtons
|
||||||
ref="halfDayButtonsRef"
|
ref="halfDayButtonsRef"
|
||||||
@toggleHalfDay="toggleHalfDay"
|
@toggleHalfDay="toggleHalfDay"
|
||||||
@ -13,11 +14,11 @@
|
|||||||
:isDisabled="!hasChanges"
|
:isDisabled="!hasChanges"
|
||||||
:selectedDate="selectedDate"
|
:selectedDate="selectedDate"
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
<ProfileList
|
<ProfileList
|
||||||
@profileClick="handleProfileClick"
|
@profileClick="handleProfileClick"
|
||||||
:remainingVacationData="remainingVacationData"
|
:remainingVacationData="remainingVacationData"
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
<VacationModal
|
<VacationModal
|
||||||
v-if="isModalOpen"
|
v-if="isModalOpen"
|
||||||
:isOpen="isModalOpen"
|
:isOpen="isModalOpen"
|
||||||
@ -136,6 +137,7 @@ const calendarOptions = reactive({
|
|||||||
center: "title",
|
center: "title",
|
||||||
right: "prev,next",
|
right: "prev,next",
|
||||||
},
|
},
|
||||||
|
contentHeight:"auto",
|
||||||
locale: "ko",
|
locale: "ko",
|
||||||
selectable: false,
|
selectable: false,
|
||||||
dateClick: handleDateClick,
|
dateClick: handleDateClick,
|
||||||
@ -323,51 +325,66 @@ const filteredReceivedVacations = computed(() => {
|
|||||||
// 휴가 변경사항 저장
|
// 휴가 변경사항 저장
|
||||||
async function saveVacationChanges() {
|
async function saveVacationChanges() {
|
||||||
if (!hasChanges.value) return;
|
if (!hasChanges.value) return;
|
||||||
|
|
||||||
const selectedDatesArray = Array.from(selectedDates.value);
|
const selectedDatesArray = Array.from(selectedDates.value);
|
||||||
const vacationChangesByYear = selectedDatesArray.reduce((acc, [date, type]) => {
|
|
||||||
const year = date.split("-")[0]; // YYYY-MM-DD에서 YYYY 추출
|
// 전체 연도를 고려하여 삭제 및 추가할 데이터를 분리
|
||||||
if (!acc[year]) acc[year] = { add: [], delete: [] };
|
const vacationChanges = selectedDatesArray.reduce((acc, [date, type]) => {
|
||||||
if (type !== "delete") {
|
if (type !== "delete") {
|
||||||
acc[year].add.push({ date, type });
|
acc.add.push({ date, type });
|
||||||
} else {
|
} else {
|
||||||
acc[year].delete.push(date);
|
acc.delete.push(date);
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, { add: [], delete: [] });
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (const year of Object.keys(vacationChangesByYear)) {
|
// 모든 연도의 데이터를 고려하여 삭제할 ID 찾기
|
||||||
const vacationsToAdd = vacationChangesByYear[year].add;
|
const allYears = new Set(vacationChanges.delete.map(date => date.split("-")[0]));
|
||||||
// 즉시 삭제 반영을 위해 삭제 대상 id 가져오기
|
let vacationIdsToDelete = [];
|
||||||
const vacationsToDeleteForYear = myVacations.value
|
for (const year of allYears) {
|
||||||
.filter(vac => {
|
await fetchVacationHistory(year); // 각 연도의 최신 데이터를 가져오기
|
||||||
|
const vacationsToDelete = myVacations.value.filter(vac => {
|
||||||
if (!vac.date) return false;
|
if (!vac.date) return false;
|
||||||
const vacDate = vac.date.split("T")[0];
|
const vacDate = vac.date.split("T")[0];
|
||||||
return vacationChangesByYear[year].delete.includes(vacDate);
|
return vacationChanges.delete.includes(vacDate) && !vac.receiverId;
|
||||||
});
|
});
|
||||||
const vacationIdsToDelete = vacationsToDeleteForYear.map(vac => vac.id);
|
vacationIdsToDelete.push(...vacationsToDelete.map(vac => vac.id));
|
||||||
if (vacationsToAdd.length > 0 || vacationIdsToDelete.length > 0) {
|
}
|
||||||
|
|
||||||
|
if (vacationChanges.add.length > 0 || vacationIdsToDelete.length > 0) {
|
||||||
const response = await axios.post("vacation/batchUpdate", {
|
const response = await axios.post("vacation/batchUpdate", {
|
||||||
add: vacationsToAdd,
|
add: vacationChanges.add,
|
||||||
delete: vacationIdsToDelete,
|
delete: vacationIdsToDelete,
|
||||||
});
|
});
|
||||||
if (response.data && response.data.status === "OK") {
|
if (response.data && response.data.status === "OK") {
|
||||||
toastStore.onToast(`휴가 변경 사항이 저장되었습니다.`, 's');
|
toastStore.onToast(`휴가 변경 사항이 저장되었습니다.`, 's');
|
||||||
// 즉시 삭제 반영: myVacations에서 해당 ID 삭제
|
|
||||||
|
// 삭제된 ID를 반영하여 모든 연도의 `myVacations.value`를 업데이트
|
||||||
myVacations.value = myVacations.value.filter(vac => !vacationIdsToDelete.includes(vac.id));
|
myVacations.value = myVacations.value.filter(vac => !vacationIdsToDelete.includes(vac.id));
|
||||||
// 서버에서 최신 데이터 가져와 반영
|
|
||||||
|
// 삭제 후 최신 데이터 불러오기 (기존 데이터를 유지하면서 추가)
|
||||||
|
const yearsToUpdate = new Set(
|
||||||
|
[...vacationChanges.add.map(v => v.date.split("-")[0]),
|
||||||
|
...vacationChanges.delete.map(v => v.split("-")[0])]
|
||||||
|
);
|
||||||
|
|
||||||
|
for (const year of yearsToUpdate) {
|
||||||
const updatedVacations = await fetchVacationHistory(year);
|
const updatedVacations = await fetchVacationHistory(year);
|
||||||
if (updatedVacations) {
|
if (updatedVacations) {
|
||||||
myVacations.value = updatedVacations; // 최신 데이터 적용
|
myVacations.value = [...myVacations.value, ...updatedVacations.filter(newVac =>
|
||||||
|
!myVacations.value.some(oldVac => oldVac.id === newVac.id)
|
||||||
|
)];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
toastStore.onToast(`휴가 변경 중 오류가 발생했습니다.`, 'e');
|
toastStore.onToast(`휴가 변경 중 오류가 발생했습니다.`, 'e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
await fetchRemainingVacation();
|
await fetchRemainingVacation();
|
||||||
selectedDates.value.clear();
|
selectedDates.value.clear();
|
||||||
updateCalendarEvents();
|
updateCalendarEvents();
|
||||||
// 현재 보고 있는 연도의 데이터 새로고침
|
// 캘린더 새로고침
|
||||||
const currentDate = fullCalendarRef.value.getApi().getDate();
|
const currentDate = fullCalendarRef.value.getApi().getDate();
|
||||||
await loadCalendarData(currentDate.getFullYear(), currentDate.getMonth() + 1);
|
await loadCalendarData(currentDate.getFullYear(), currentDate.getMonth() + 1);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -375,24 +392,17 @@ async function saveVacationChanges() {
|
|||||||
toastStore.onToast('휴가 저장 요청에 실패했습니다.', 'e');
|
toastStore.onToast('휴가 저장 요청에 실패했습니다.', 'e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 휴가 조회 */
|
/* 휴가 조회 */
|
||||||
// 로그인 사용자의 연차 사용 내역
|
// 로그인 사용자의 연차 사용 내역
|
||||||
async function fetchVacationHistory(year) {
|
async function fetchVacationHistory(year) {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(`vacation/history?year=${year}`);
|
const response = await axios.get(`vacation/history?year=${year}`);
|
||||||
if (response.status === 200 && response.data) {
|
if (response.status === 200 && response.data) {
|
||||||
const newVacations = response.data.data.usedVacations || [];
|
myVacations.value = response.data.data.usedVacations || [];
|
||||||
|
receivedVacations.value = response.data.data.receivedVacations || []
|
||||||
const uniqueVacations = Array.from(
|
|
||||||
new Map([...myVacations.value, ...newVacations].map(v => [`${v.date}-${v.type}`, v]))
|
|
||||||
.values()
|
|
||||||
);
|
|
||||||
|
|
||||||
myVacations.value = uniqueVacations;
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`🚨 ${year}년 휴가 데이터 불러오기 실패:`, error);
|
console.error(`🚨 휴가 데이터 불러오기 실패:`, error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 모든 사원 연차 내역 및 그래프화
|
// 모든 사원 연차 내역 및 그래프화
|
||||||
@ -403,7 +413,7 @@ async function fetchVacationData(year, month) {
|
|||||||
const vacationList = response.data;
|
const vacationList = response.data;
|
||||||
// 회원 정보가 없거나 색상 정보가 없는 데이터는 제외
|
// 회원 정보가 없거나 색상 정보가 없는 데이터는 제외
|
||||||
const filteredVacations = vacationList.filter(vac =>
|
const filteredVacations = vacationList.filter(vac =>
|
||||||
userColors.value[vac.MEMBERSEQ] && userColors.value[vac.MEMBERSEQ]
|
userColors.value[vac.MEMBERSEQ] && userColors.value[vac.MEMBERSEQ] && !vac.LOCVACRMM
|
||||||
);
|
);
|
||||||
const events = filteredVacations.map(vac => {
|
const events = filteredVacations.map(vac => {
|
||||||
let dateStr = vac.LOCVACUDT ? vac.LOCVACUDT.split("T")[0] : "";
|
let dateStr = vac.LOCVACUDT ? vac.LOCVACUDT.split("T")[0] : "";
|
||||||
@ -483,7 +493,6 @@ function toggleHalfDay(type) {
|
|||||||
/* 페이지 이동 시 변경 사항 확인 */
|
/* 페이지 이동 시 변경 사항 확인 */
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
if (hasChanges.value) {
|
if (hasChanges.value) {
|
||||||
console.log('휴가!!!!!');
|
|
||||||
const answer = window.confirm("저장하지 않은 변경 사항이 있습니다. 이동하시겠습니까?");
|
const answer = window.confirm("저장하지 않은 변경 사항이 있습니다. 이동하시겠습니까?");
|
||||||
if (!answer) {
|
if (!answer) {
|
||||||
return next(false);
|
return next(false);
|
||||||
|
|||||||
@ -34,6 +34,7 @@
|
|||||||
<Pagination
|
<Pagination
|
||||||
v-if="PageData.pages"
|
v-if="PageData.pages"
|
||||||
v-bind="PageData"
|
v-bind="PageData"
|
||||||
|
:currentPage="currentPage"
|
||||||
@update:currentPage="handlePageChange"
|
@update:currentPage="handlePageChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -149,7 +150,6 @@ const voteDelete =(id) =>{
|
|||||||
}
|
}
|
||||||
//랜덤 1위 뽑기
|
//랜덤 1위 뽑기
|
||||||
const randomList = (data,id) =>{
|
const randomList = (data,id) =>{
|
||||||
isLoading.value = false;
|
|
||||||
$api.post('vote/randomList',{
|
$api.post('vote/randomList',{
|
||||||
randomList :data
|
randomList :data
|
||||||
,voteid:id
|
,voteid:id
|
||||||
@ -158,7 +158,7 @@ const randomList = (data,id) =>{
|
|||||||
toastStore.onToast('랜덤뽑기 진행되었습니다.', 's');
|
toastStore.onToast('랜덤뽑기 진행되었습니다.', 's');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getvoteList();
|
getvoteList();
|
||||||
}, 2000); // 3000ms = 3초
|
}, 1000);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -169,9 +169,9 @@ const updateVote = (id) =>{
|
|||||||
voteWrite();
|
voteWrite();
|
||||||
}
|
}
|
||||||
// 페이지 변경
|
// 페이지 변경
|
||||||
const handlePageChange = async (page) => {
|
const handlePageChange = (page) => {
|
||||||
currentPage.value=page;
|
currentPage.value=page;
|
||||||
await getvoteList();
|
getvoteList();
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style></style>
|
<style></style>
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
@change="ValidHandlerendDate"
|
@change="ValidHandlerendDate"
|
||||||
/>
|
/>
|
||||||
<!-- 항목 입력 반복 -->
|
<!-- 항목 입력 반복 -->
|
||||||
<div v-for="(item, index) in itemList" :key="index" class="d-flex align-items-start">
|
<div v-for="(item, index) in itemList" :key="index" class="d-flex align-items-start ">
|
||||||
<div class="flex-grow-1 me-2 ">
|
<div class="flex-grow-1 me-2 ">
|
||||||
<form-input
|
<form-input
|
||||||
:title="'항목 ' + (index + 1)"
|
:title="'항목 ' + (index + 1)"
|
||||||
@ -174,7 +174,7 @@ const saveVote = () => {
|
|||||||
}));
|
}));
|
||||||
$api.post('vote/insertWord',{
|
$api.post('vote/insertWord',{
|
||||||
addvoteIs :addvoteitem.value === false ? '0' :'1'
|
addvoteIs :addvoteitem.value === false ? '0' :'1'
|
||||||
,votemMltiIs: addvotemulti.value === false ? '0' : '1'
|
,votemMltiIs :addvotemulti.value === false ? '0' : '1'
|
||||||
,title :title.value.trim()
|
,title :title.value.trim()
|
||||||
,endDate :endDate.value
|
,endDate :endDate.value
|
||||||
,itemList :filteredItemList
|
,itemList :filteredItemList
|
||||||
@ -207,6 +207,6 @@ const goList = () => {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.item-input {
|
.item-input {
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
<DictAlphabetFilter @update:data="handleSelectedAlphabetChange" :indexCategory="indexCategory" :selectedAl="selectedAlphabet" />
|
<DictAlphabetFilter @update:data="handleSelectedAlphabetChange" :indexCategory="indexCategory" :selectedAl="selectedAlphabet" />
|
||||||
<!-- 카테고리 -->
|
<!-- 카테고리 -->
|
||||||
<div v-if="cateList.length">
|
<div v-if="cateList.length">
|
||||||
<CategoryBtn :lists="cateList" @update:data="handleSelectedCategoryChange" :showAll="true"/>
|
<CategoryBtn :lists="cateList" @update:data="handleSelectedCategoryChange" :showAll="true" :selectedCategory="selectedCategory" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 작성 -->
|
<!-- 작성 -->
|
||||||
<div v-if="writeStore.isItemActive(999999)" class="mt-5 card p-5">
|
<div v-if="writeStore.isItemActive(999999)" class="mt-5 card p-5">
|
||||||
@ -205,6 +205,7 @@
|
|||||||
}
|
}
|
||||||
getwordList();
|
getwordList();
|
||||||
getIndex();
|
getIndex();
|
||||||
|
selectedCategory.value = 'all';
|
||||||
if(res.data.data == '2'){
|
if(res.data.data == '2'){
|
||||||
const newCategory = { label: data, value: category };
|
const newCategory = { label: data, value: category };
|
||||||
cateList.value = [...cateList.value,newCategory];
|
cateList.value = [...cateList.value,newCategory];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user