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 작성 */
|
||||
|
||||
.opacity-50 {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/* board */
|
||||
.board-content img {
|
||||
max-width: 100% !important;
|
||||
@ -83,6 +87,7 @@
|
||||
background: linear-gradient(90deg, orange, #ff8c00);
|
||||
box-shadow: 0 0 20px rgba(255, 140, 0, 1);
|
||||
transform: scale(1.05);
|
||||
color: #fff;
|
||||
}
|
||||
/* 페이드 인 애니메이션 */
|
||||
@keyframes fadeIn {
|
||||
|
||||
@ -79,9 +79,10 @@ $api.interceptors.response.use(
|
||||
}
|
||||
|
||||
// 에러 응답에 커스텀 메시지가 포함되어 있다면 해당 메시지 사용
|
||||
if (error.response && error.response.data && error.response.data.message) {
|
||||
toastStore.onToast(error.response.data.message, 'e');
|
||||
} else if (error.response) {
|
||||
// if (error.response && error.response.data && error.response.data.message) {
|
||||
// toastStore.onToast(error.response.data.message, 'e');
|
||||
// } else if (error.response) {
|
||||
if (error.response) {
|
||||
// 기본 HTTP 에러 처리
|
||||
switch (error.response.status) {
|
||||
case 400:
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<h5 class="card-title fw-bold">
|
||||
{{ title }}
|
||||
</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">
|
||||
<EditBtn @click.stop="openEditModal" />
|
||||
<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);
|
||||
grantCount.value = availableQuota.value;
|
||||
} catch (error) {
|
||||
console.error("🚨 연차 전송 기록 조회 실패:", error);
|
||||
availableQuota.value = maxQuota;
|
||||
grantCount.value = maxQuota;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<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" >
|
||||
<h5 class="card-title mb-1">
|
||||
<div class="list-unstyled users-list d-flex align-items-center gap-1">
|
||||
@ -28,7 +28,7 @@
|
||||
</button>
|
||||
<DeleteBtn v-if="!data.localVote.LOCVOTDDT" @click="voteDelete(data.localVote.LOCVOTSEQ)" />
|
||||
</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>
|
||||
|
||||
@ -32,7 +32,9 @@
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -8,7 +8,7 @@ const routes = [
|
||||
path: '/',
|
||||
name: "Home",
|
||||
component: () => import('@v/MainView.vue'),
|
||||
// meta: { requiresAuth: true }
|
||||
meta: { requiresAuth: true }
|
||||
},
|
||||
{
|
||||
path: '/board',
|
||||
@ -95,11 +95,11 @@ const routes = [
|
||||
component: () => import('@v/admin/TheAuthorization.vue'),
|
||||
meta: { requiresAuth: true }
|
||||
},
|
||||
{ path: "/error/400", name: "Error400", component: () => import('@v/error/Error400.vue') },
|
||||
{ path: "/error/500", name: "Error500", component: () => import('@v/error/Error500.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'), meta: {layout: 'NoLayout'} },
|
||||
{
|
||||
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',
|
||||
}));
|
||||
} catch (error) {
|
||||
console.error('사용자 목록을 불러오는 중 오류 발생:', error);
|
||||
toastStore.onToast('사용자 목록을 불러오지 못했습니다.', 'e');
|
||||
}
|
||||
}
|
||||
@ -83,7 +82,6 @@ async function toggleAdmin(user) {
|
||||
throw new Error('권한 변경 실패');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('권한 변경 중 오류 발생:', error);
|
||||
toastStore.onToast('권한 변경에 실패했습니다.', 'e');
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,7 +224,6 @@ const fetchGeneralPosts = async (page = 1) => {
|
||||
};
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("데이터 오류:", error);
|
||||
}
|
||||
};
|
||||
|
||||
@ -249,7 +248,6 @@ const fetchNoticePosts = async () => {
|
||||
}));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("데이터 오류:", error);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -206,7 +206,6 @@
|
||||
link.remove();
|
||||
window.URL.revokeObjectURL(url);
|
||||
} catch (error) {
|
||||
console.error('파일 다운로드 오류:', error);
|
||||
alert('파일 다운로드 중 오류가 발생했습니다.');
|
||||
}
|
||||
};
|
||||
@ -272,7 +271,6 @@
|
||||
|
||||
// 좋아요, 싫어요
|
||||
const handleUpdateReaction = async ({ boardId, commentId, isLike, isDislike }) => {
|
||||
try {
|
||||
await axios.post(`/board/${boardId}/${commentId}/reaction`, {
|
||||
LOCBRDSEQ: boardId, // 게시글 id
|
||||
LOCCMTSEQ: commentId, //댓글 id
|
||||
@ -288,9 +286,6 @@
|
||||
|
||||
likeClicked.value = isLike;
|
||||
dislikeClicked.value = isDislike;
|
||||
} catch (error) {
|
||||
alert('오류가 발생했습니다.');
|
||||
}
|
||||
};
|
||||
|
||||
// 대댓글 좋아요
|
||||
@ -413,7 +408,6 @@
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await axios.post(`board/${currentBoardId.value}/comment`, {
|
||||
LOCBRDSEQ: currentBoardId.value,
|
||||
LOCCMTRPY: comment,
|
||||
@ -429,9 +423,6 @@
|
||||
} else {
|
||||
alert('댓글 작성을 실패했습니다.');
|
||||
}
|
||||
} catch (error) {
|
||||
alert('오류가 발생했습니다.');
|
||||
}
|
||||
};
|
||||
|
||||
// 대댓글 추가
|
||||
|
||||
@ -129,16 +129,12 @@
|
||||
const fileError = ref('');
|
||||
|
||||
const fetchCategories = async () => {
|
||||
try {
|
||||
const response = await axios.get('board/categories');
|
||||
categoryList.value = response.data.data;
|
||||
const freeCategory = categoryList.value.find(category => category.CMNCODNAM === '자유');
|
||||
if (freeCategory) {
|
||||
categoryValue.value = freeCategory.CMNCODVAL;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('카테고리 불러오기 오류:', error);
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
@ -243,7 +239,6 @@
|
||||
toastStore.onToast('게시물이 작성되었습니다.', 's');
|
||||
goList();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
toastStore.onToast('게시물 작성 중 오류가 발생했습니다.', 'e');
|
||||
}
|
||||
};
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="error-container">
|
||||
<div class="error-page">
|
||||
<div class="error-content">
|
||||
<img src="/img/illustrations/page-misc-error-dark.png" alt="Error Illustration" class="error-image" />
|
||||
<h1>400</h1>
|
||||
|
||||
@ -282,7 +282,6 @@ const handleProfileClick = async (user) => {
|
||||
isGrantModalOpen.value = true;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("🚨 연차 데이터 불러오기 실패:", error);
|
||||
}
|
||||
};
|
||||
// 프로필 사원 리스트
|
||||
@ -304,7 +303,6 @@ const fetchUserList = async () => {
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error("📌 사용자 목록 불러오기 오류:", error);
|
||||
}
|
||||
};
|
||||
// 사원별 남은 연차 개수
|
||||
@ -318,7 +316,6 @@ const fetchRemainingVacation = async () => {
|
||||
}, {});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("🚨 남은 연차 데이터를 불러오지 못했습니다:", error);
|
||||
}
|
||||
};
|
||||
// 로그인한 사원이 사용한 휴가 필터링
|
||||
@ -405,7 +402,6 @@ async function saveVacationChanges() {
|
||||
const currentDate = fullCalendarRef.value.getApi().getDate();
|
||||
await loadCalendarData(currentDate.getFullYear(), currentDate.getMonth() + 1);
|
||||
} catch (error) {
|
||||
console.error("🚨 휴가 변경 저장 실패:", error);
|
||||
toastStore.onToast('휴가 저장 요청에 실패했습니다.', 'e');
|
||||
}
|
||||
}
|
||||
@ -419,7 +415,6 @@ async function fetchVacationHistory(year) {
|
||||
receivedVacations.value = response.data.data.receivedVacations || []
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`🚨 휴가 데이터 불러오기 실패:`, error);
|
||||
}
|
||||
}
|
||||
// 모든 사원 연차 내역 및 그래프화
|
||||
@ -450,7 +445,6 @@ async function fetchVacationData(year, month) {
|
||||
return [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error fetching vacation data:", error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@ -525,7 +519,6 @@ const fetchVacationCodes = async () => {
|
||||
console.warn("❌ 공통 코드 데이터를 불러오지 못했습니다.");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("🚨 공통 코드 API 호출 실패:", error);
|
||||
}
|
||||
};
|
||||
const getVacationType = (typeCode) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user