Merge branch 'main' of http://192.168.0.251:3000/localhost/localhost-front
This commit is contained in:
commit
3d7257338b
@ -1,5 +1,9 @@
|
|||||||
/* 여기에 light css 작성 */
|
/* 여기에 light css 작성 */
|
||||||
|
|
||||||
|
.opacity-50 {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
/* board */
|
/* board */
|
||||||
.board-content img {
|
.board-content img {
|
||||||
max-width: 100% !important;
|
max-width: 100% !important;
|
||||||
@ -83,6 +87,7 @@
|
|||||||
background: linear-gradient(90deg, orange, #ff8c00);
|
background: linear-gradient(90deg, orange, #ff8c00);
|
||||||
box-shadow: 0 0 20px rgba(255, 140, 0, 1);
|
box-shadow: 0 0 20px rgba(255, 140, 0, 1);
|
||||||
transform: scale(1.05);
|
transform: scale(1.05);
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
/* 페이드 인 애니메이션 */
|
/* 페이드 인 애니메이션 */
|
||||||
@keyframes fadeIn {
|
@keyframes fadeIn {
|
||||||
|
|||||||
@ -79,9 +79,10 @@ $api.interceptors.response.use(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 에러 응답에 커스텀 메시지가 포함되어 있다면 해당 메시지 사용
|
// 에러 응답에 커스텀 메시지가 포함되어 있다면 해당 메시지 사용
|
||||||
if (error.response && error.response.data && error.response.data.message) {
|
// if (error.response && error.response.data && error.response.data.message) {
|
||||||
toastStore.onToast(error.response.data.message, 'e');
|
// toastStore.onToast(error.response.data.message, 'e');
|
||||||
} else if (error.response) {
|
// } else if (error.response) {
|
||||||
|
if (error.response) {
|
||||||
// 기본 HTTP 에러 처리
|
// 기본 HTTP 에러 처리
|
||||||
switch (error.response.status) {
|
switch (error.response.status) {
|
||||||
case 400:
|
case 400:
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<h5 class="card-title fw-bold">
|
<h5 class="card-title fw-bold">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</h5>
|
</h5>
|
||||||
<p v-if="isProjectExpired" class="btn-icon btn-danger rounded-2"><i class='bx bx-power-off'></i></p>
|
<p v-if="isProjectExpired" class="btn-icon btn-danger rounded-2 pe-none"><i class='bx bx-power-off'></i></p>
|
||||||
<div v-if="!isProjectExpired" class="d-flex gap-1">
|
<div v-if="!isProjectExpired" class="d-flex gap-1">
|
||||||
<EditBtn @click.stop="openEditModal" />
|
<EditBtn @click.stop="openEditModal" />
|
||||||
<DeleteBtn v-if="isProjectCreator" @click.stop="handleDelete" class="ms-1"/>
|
<DeleteBtn v-if="isProjectCreator" @click.stop="handleDelete" class="ms-1"/>
|
||||||
|
|||||||
@ -48,7 +48,6 @@ const fetchSentVacationCount = async () => {
|
|||||||
availableQuota.value = Math.max(maxQuota - sentCount.value, 0);
|
availableQuota.value = Math.max(maxQuota - sentCount.value, 0);
|
||||||
grantCount.value = availableQuota.value;
|
grantCount.value = availableQuota.value;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("🚨 연차 전송 기록 조회 실패:", error);
|
|
||||||
availableQuota.value = maxQuota;
|
availableQuota.value = maxQuota;
|
||||||
grantCount.value = maxQuota;
|
grantCount.value = maxQuota;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card mb-6" :class="{ 'disabled-class': data.localVote.LOCVOTDDT && (topVoters.length == 1 || data.localVote.LOCVOTRES || voteResult == 0)}">
|
<div class="card mb-6" :class="{'ps-none opacity-50': 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">
|
||||||
@ -28,7 +28,7 @@
|
|||||||
</button>
|
</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 pe-none"><i class="bx bx-power-off"></i></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -32,7 +32,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<save-btn class="mt-2" @click="selectVote"/>
|
<div class="d-flex">
|
||||||
|
<save-btn class="mt-2 ms-auto" @click="selectVote"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -8,7 +8,7 @@ const routes = [
|
|||||||
path: '/',
|
path: '/',
|
||||||
name: "Home",
|
name: "Home",
|
||||||
component: () => import('@v/MainView.vue'),
|
component: () => import('@v/MainView.vue'),
|
||||||
// meta: { requiresAuth: true }
|
meta: { requiresAuth: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/board',
|
path: '/board',
|
||||||
@ -95,11 +95,11 @@ const routes = [
|
|||||||
component: () => import('@v/admin/TheAuthorization.vue'),
|
component: () => import('@v/admin/TheAuthorization.vue'),
|
||||||
meta: { requiresAuth: true }
|
meta: { requiresAuth: true }
|
||||||
},
|
},
|
||||||
{ path: "/error/400", name: "Error400", component: () => import('@v/error/Error400.vue') },
|
{ path: "/error/400", name: "Error400", component: () => import('@v/error/Error400.vue'), meta: {layout: 'NoLayout'} },
|
||||||
{ path: "/error/500", name: "Error500", component: () => import('@v/error/Error500.vue') },
|
{ path: "/error/500", name: "Error500", component: () => import('@v/error/Error500.vue'), meta: {layout: 'NoLayout'} },
|
||||||
{
|
{
|
||||||
path: "/:anything(.*)",
|
path: "/:anything(.*)",
|
||||||
name: "Error404", component: () => import('@v/error/Error404.vue')
|
name: "Error404", component: () => import('@v/error/Error404.vue'), meta: {layout: 'NoLayout'}
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,6 @@ async function fetchUsers() {
|
|||||||
isAdmin: user.MEMBERROL === 'ROLE_ADMIN',
|
isAdmin: user.MEMBERROL === 'ROLE_ADMIN',
|
||||||
}));
|
}));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('사용자 목록을 불러오는 중 오류 발생:', error);
|
|
||||||
toastStore.onToast('사용자 목록을 불러오지 못했습니다.', 'e');
|
toastStore.onToast('사용자 목록을 불러오지 못했습니다.', 'e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,7 +82,6 @@ async function toggleAdmin(user) {
|
|||||||
throw new Error('권한 변경 실패');
|
throw new Error('권한 변경 실패');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('권한 변경 중 오류 발생:', error);
|
|
||||||
toastStore.onToast('권한 변경에 실패했습니다.', 'e');
|
toastStore.onToast('권한 변경에 실패했습니다.', 'e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -224,7 +224,6 @@ const fetchGeneralPosts = async (page = 1) => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("데이터 오류:", error);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -249,7 +248,6 @@ const fetchNoticePosts = async () => {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("데이터 오류:", error);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -206,7 +206,6 @@
|
|||||||
link.remove();
|
link.remove();
|
||||||
window.URL.revokeObjectURL(url);
|
window.URL.revokeObjectURL(url);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('파일 다운로드 오류:', error);
|
|
||||||
alert('파일 다운로드 중 오류가 발생했습니다.');
|
alert('파일 다운로드 중 오류가 발생했습니다.');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -272,25 +271,21 @@
|
|||||||
|
|
||||||
// 좋아요, 싫어요
|
// 좋아요, 싫어요
|
||||||
const handleUpdateReaction = async ({ boardId, commentId, isLike, isDislike }) => {
|
const handleUpdateReaction = async ({ boardId, commentId, isLike, isDislike }) => {
|
||||||
try {
|
await axios.post(`/board/${boardId}/${commentId}/reaction`, {
|
||||||
await axios.post(`/board/${boardId}/${commentId}/reaction`, {
|
LOCBRDSEQ: boardId, // 게시글 id
|
||||||
LOCBRDSEQ: boardId, // 게시글 id
|
LOCCMTSEQ: commentId, //댓글 id
|
||||||
LOCCMTSEQ: commentId, //댓글 id
|
LOCGOBGOD: isLike ? 'T' : 'F',
|
||||||
LOCGOBGOD: isLike ? 'T' : 'F',
|
LOCGOBBAD: isDislike ? 'T' : 'F',
|
||||||
LOCGOBBAD: isDislike ? 'T' : 'F',
|
});
|
||||||
});
|
|
||||||
|
|
||||||
const response = await axios.get(`board/${boardId}`);
|
const response = await axios.get(`board/${boardId}`);
|
||||||
const updatedData = response.data.data;
|
const updatedData = response.data.data;
|
||||||
|
|
||||||
likes.value = updatedData.likeCount;
|
likes.value = updatedData.likeCount;
|
||||||
dislikes.value = updatedData.dislikeCount;
|
dislikes.value = updatedData.dislikeCount;
|
||||||
|
|
||||||
likeClicked.value = isLike;
|
likeClicked.value = isLike;
|
||||||
dislikeClicked.value = isDislike;
|
dislikeClicked.value = isDislike;
|
||||||
} catch (error) {
|
|
||||||
alert('오류가 발생했습니다.');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 대댓글 좋아요
|
// 대댓글 좋아요
|
||||||
@ -413,24 +408,20 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
const response = await axios.post(`board/${currentBoardId.value}/comment`, {
|
||||||
const response = await axios.post(`board/${currentBoardId.value}/comment`, {
|
LOCBRDSEQ: currentBoardId.value,
|
||||||
LOCBRDSEQ: currentBoardId.value,
|
LOCCMTRPY: comment,
|
||||||
LOCCMTRPY: comment,
|
LOCCMTPWD: isCheck ? password : '',
|
||||||
LOCCMTPWD: isCheck ? password : '',
|
LOCCMTPNT: 1,
|
||||||
LOCCMTPNT: 1,
|
LOCBRDTYP: isCheck ? '300102' : null,
|
||||||
LOCBRDTYP: isCheck ? '300102' : null,
|
});
|
||||||
});
|
|
||||||
|
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
passwordAlert.value = '';
|
passwordAlert.value = '';
|
||||||
commentAlert.value = '';
|
commentAlert.value = '';
|
||||||
await fetchComments();
|
await fetchComments();
|
||||||
} else {
|
} else {
|
||||||
alert('댓글 작성을 실패했습니다.');
|
alert('댓글 작성을 실패했습니다.');
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
alert('오류가 발생했습니다.');
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -129,15 +129,11 @@
|
|||||||
const fileError = ref('');
|
const fileError = ref('');
|
||||||
|
|
||||||
const fetchCategories = async () => {
|
const fetchCategories = async () => {
|
||||||
try {
|
const response = await axios.get('board/categories');
|
||||||
const response = await axios.get('board/categories');
|
categoryList.value = response.data.data;
|
||||||
categoryList.value = response.data.data;
|
const freeCategory = categoryList.value.find(category => category.CMNCODNAM === '자유');
|
||||||
const freeCategory = categoryList.value.find(category => category.CMNCODNAM === '자유');
|
if (freeCategory) {
|
||||||
if (freeCategory) {
|
categoryValue.value = freeCategory.CMNCODVAL;
|
||||||
categoryValue.value = freeCategory.CMNCODVAL;
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('카테고리 불러오기 오류:', error);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -243,7 +239,6 @@
|
|||||||
toastStore.onToast('게시물이 작성되었습니다.', 's');
|
toastStore.onToast('게시물이 작성되었습니다.', 's');
|
||||||
goList();
|
goList();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
|
||||||
toastStore.onToast('게시물 작성 중 오류가 발생했습니다.', 'e');
|
toastStore.onToast('게시물 작성 중 오류가 발생했습니다.', 'e');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="error-container">
|
<div class="error-page">
|
||||||
<div class="error-content">
|
<div class="error-content">
|
||||||
<img src="/img/illustrations/page-misc-error-dark.png" alt="Error Illustration" class="error-image" />
|
<img src="/img/illustrations/page-misc-error-dark.png" alt="Error Illustration" class="error-image" />
|
||||||
<h1>400</h1>
|
<h1>400</h1>
|
||||||
|
|||||||
@ -282,7 +282,6 @@ const handleProfileClick = async (user) => {
|
|||||||
isGrantModalOpen.value = true;
|
isGrantModalOpen.value = true;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("🚨 연차 데이터 불러오기 실패:", error);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 프로필 사원 리스트
|
// 프로필 사원 리스트
|
||||||
@ -304,7 +303,6 @@ const fetchUserList = async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("📌 사용자 목록 불러오기 오류:", error);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 사원별 남은 연차 개수
|
// 사원별 남은 연차 개수
|
||||||
@ -318,7 +316,6 @@ const fetchRemainingVacation = async () => {
|
|||||||
}, {});
|
}, {});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("🚨 남은 연차 데이터를 불러오지 못했습니다:", error);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 로그인한 사원이 사용한 휴가 필터링
|
// 로그인한 사원이 사용한 휴가 필터링
|
||||||
@ -405,7 +402,6 @@ async function saveVacationChanges() {
|
|||||||
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) {
|
||||||
console.error("🚨 휴가 변경 저장 실패:", error);
|
|
||||||
toastStore.onToast('휴가 저장 요청에 실패했습니다.', 'e');
|
toastStore.onToast('휴가 저장 요청에 실패했습니다.', 'e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -419,7 +415,6 @@ async function fetchVacationHistory(year) {
|
|||||||
receivedVacations.value = response.data.data.receivedVacations || []
|
receivedVacations.value = response.data.data.receivedVacations || []
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`🚨 휴가 데이터 불러오기 실패:`, error);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 모든 사원 연차 내역 및 그래프화
|
// 모든 사원 연차 내역 및 그래프화
|
||||||
@ -450,7 +445,6 @@ async function fetchVacationData(year, month) {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error fetching vacation data:", error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -525,7 +519,6 @@ const fetchVacationCodes = async () => {
|
|||||||
console.warn("❌ 공통 코드 데이터를 불러오지 못했습니다.");
|
console.warn("❌ 공통 코드 데이터를 불러오지 못했습니다.");
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("🚨 공통 코드 API 호출 실패:", error);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const getVacationType = (typeCode) => {
|
const getVacationType = (typeCode) => {
|
||||||
@ -567,7 +560,7 @@ watch(() => lastRemainingYear.value, async (newYear, oldYear) => {
|
|||||||
await fetchVacationHistory(newYear);
|
await fetchVacationHistory(newYear);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 새로운 휴가 추가 시 반차 버튼 초기화
|
// 새로운 휴가추가 시 반차 버튼 초기화
|
||||||
watch(
|
watch(
|
||||||
() => Array.from(selectedDates.value.keys()), // 선택된 날짜 리스트 감시
|
() => Array.from(selectedDates.value.keys()), // 선택된 날짜 리스트 감시
|
||||||
(newKeys) => {
|
(newKeys) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user