diff --git a/src/components/modal/VacationModal.vue b/src/components/modal/VacationModal.vue
index d60da1a..e1b705b 100644
--- a/src/components/modal/VacationModal.vue
+++ b/src/components/modal/VacationModal.vue
@@ -13,13 +13,21 @@
class="vacation-item"
>
- {{ totalUsedVacationCount - usedVacations.findIndex(v => v.date === vacation.date) }} )
+ {{ totalUsedVacationCount - usedVacations.findIndex(v => v.date === vacation.date) }})
{{ vacation.type === 'used' ? '-' : '+' }}
- {{ formatDate(vacation.date) }}
+
+ {{ formatDate(vacation.date) }}
+
+ ({{ vacation.halfDay ? '반차' : '풀 연차' }})
+ (보낸 연차)
+
+
@@ -57,113 +65,123 @@
const totalUsedVacationCount = computed(() => props.myVacations.length);
// ✅ 사용한 연차 + 받은 연차 통합 후 내림차순 정렬
- const usedVacations = computed(() => props.myVacations.map(v => ({ ...v, type: "used" })));
- const receivedVacations = computed(() => props.receivedVacations
- .filter(v => !v.senderId) // ✅ 보낸 사람이 있는 경우 리스트에서 제외
- .map(v => ({ ...v, type: "received" }))
+ const usedVacations = computed(() =>
+ props.myVacations.map(v => ({ ...v, type: "used" }))
);
- const mergedVacations = computed(() => {
- return [...usedVacations.value, ...receivedVacations.value].sort(
- (a, b) => new Date(b.date) - new Date(a.date)
+ const receivedVacations = computed(() =>
+ props.receivedVacations.map(v => ({ ...v, type: "received" }))
);
+
+ // ✅ 정확한 정렬 및 리스트 병합
+ const mergedVacations = computed(() => {
+ return [...usedVacations.value, ...receivedVacations.value].sort(
+ (a, b) => new Date(b.date) - new Date(a.date)
+ );
});
// ✅ 날짜 형식 변환 (YYYY-MM-DD)
const formatDate = (dateString) => {
- const date = new Date(dateString);
- return date.toISOString().split("T")[0]; // YYYY-MM-DD 형식
+ const date = new Date(dateString);
+ return date.toISOString().split("T")[0]; // YYYY-MM-DD 형식
};
const closeModal = () => {
- emit("close");
+ emit("close");
};
+
+ /* 연차 데이터 없음 */
+ .no-data {
+ text-align: center;
+ font-size: 14px;
+ color: gray;
+ margin-top: 10px;
+ }
+
diff --git a/src/views/board/BoardList.vue b/src/views/board/BoardList.vue
index a5e4135..34740d2 100644
--- a/src/views/board/BoardList.vue
+++ b/src/views/board/BoardList.vue
@@ -190,6 +190,8 @@ const fetchGeneralPosts = async (page = 1) => {
console.log(data)
const totalPosts = data.data.total; // 전체 게시물 개수 받아오기
+ console.log('📌 API 응답 데이터:', data.data);
+
generalList.value = data.data.list.map((post, index) => ({
realId: post.id,
id: totalPosts - ((page - 1) * selectedSize.value) - index,
diff --git a/src/views/board/BoardView.vue b/src/views/board/BoardView.vue
index b6c68f4..2eb5e83 100644
--- a/src/views/board/BoardView.vue
+++ b/src/views/board/BoardView.vue
@@ -94,7 +94,11 @@
@updateReaction="handleUpdateReaction"
@submitComment="handleCommentReply"
/>
-
+
@@ -103,7 +107,7 @@