캐치문 수정
All checks were successful
LocalNet_front/pipeline/head This commit looks good

This commit is contained in:
dyhj625 2025-03-18 12:26:52 +09:00
parent 00acd58995
commit f2ad06756b
2 changed files with 131 additions and 113 deletions

View File

@ -182,6 +182,7 @@ const handleSizeChange = () => {
// //
const fetchGeneralPosts = async (page = 1) => { const fetchGeneralPosts = async (page = 1) => {
try {
const { data } = await axios.get("board/general", { const { data } = await axios.get("board/general", {
params: { params: {
page, page,
@ -222,10 +223,13 @@ const fetchGeneralPosts = async (page = 1) => {
navigateLastPage: data.data.navigateLastPage navigateLastPage: data.data.navigateLastPage
}; };
} }
} catch (error) {
}
}; };
// //
const fetchNoticePosts = async () => { const fetchNoticePosts = async () => {
try {
const { data } = await axios.get("board/notices", { const { data } = await axios.get("board/notices", {
params: { searchKeyword: searchText.value } params: { searchKeyword: searchText.value }
}); });
@ -243,6 +247,8 @@ const fetchNoticePosts = async () => {
commentCount : post.commentCount commentCount : post.commentCount
})); }));
} }
} catch (error) {
}
}; };
// Enter // Enter

View File

@ -264,6 +264,7 @@ async function loadCalendarData(year, month) {
/* 프로필 구역 */ /* 프로필 구역 */
// //
const handleProfileClick = async (user) => { const handleProfileClick = async (user) => {
try {
if (isModalOpen.value && user.MEMBERSEQ === userStore.user.id) { if (isModalOpen.value && user.MEMBERSEQ === userStore.user.id) {
return; return;
} }
@ -280,6 +281,8 @@ const handleProfileClick = async (user) => {
selectedUser.value = user; selectedUser.value = user;
isGrantModalOpen.value = true; isGrantModalOpen.value = true;
} }
} catch (error) {
}
}; };
// //
const fetchUserList = async () => { const fetchUserList = async () => {
@ -300,11 +303,11 @@ const fetchUserList = async () => {
}); });
} catch (error) { } catch (error) {
console.error("📌 사용자 목록 불러오기 오류:", error);
} }
}; };
// //
const fetchRemainingVacation = async () => { const fetchRemainingVacation = async () => {
try {
const response = await axios.get("vacation/remaining"); const response = await axios.get("vacation/remaining");
if (response.status === 200) { if (response.status === 200) {
remainingVacationData.value = response.data.data.reduce((acc, vacation) => { remainingVacationData.value = response.data.data.reduce((acc, vacation) => {
@ -312,6 +315,8 @@ const fetchRemainingVacation = async () => {
return acc; return acc;
}, {}); }, {});
} }
} catch (error) {
}
}; };
// //
const filteredMyVacations = computed(() => { const filteredMyVacations = computed(() => {
@ -403,15 +408,18 @@ async function saveVacationChanges() {
/* 휴가 조회 */ /* 휴가 조회 */
// //
async function fetchVacationHistory(year) { async function fetchVacationHistory(year) {
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) {
myVacations.value = response.data.data.usedVacations || []; myVacations.value = response.data.data.usedVacations || [];
receivedVacations.value = response.data.data.receivedVacations || [] receivedVacations.value = response.data.data.receivedVacations || []
} }
} catch (error) {
}
} }
// //
async function fetchVacationData(year, month) { async function fetchVacationData(year, month) {
try {
const response = await axios.get(`vacation/list/${year}/${month}`); const response = await axios.get(`vacation/list/${year}/${month}`);
if (response.status === 200) { if (response.status === 200) {
const vacationList = response.data; const vacationList = response.data;
@ -436,9 +444,10 @@ async function fetchVacationData(year, month) {
console.warn("📌 휴가 데이터를 불러오지 못함"); console.warn("📌 휴가 데이터를 불러오지 못함");
return []; return [];
} }
} catch (error) {
return []; return [];
}
} }
// //
function updateCalendarEvents() { function updateCalendarEvents() {
const selectedEvents = Array.from(selectedDates.value) const selectedEvents = Array.from(selectedDates.value)
@ -499,6 +508,7 @@ const getVacationTypeClass = (type) => {
}; };
// //
const fetchVacationCodes = async () => { const fetchVacationCodes = async () => {
try {
const response = await axios.get("vacation/codes"); const response = await axios.get("vacation/codes");
if (response.status === 200 && response.data) { if (response.status === 200 && response.data) {
vacationCodeMap.value = response.data.data.reduce((acc, item) => { vacationCodeMap.value = response.data.data.reduce((acc, item) => {
@ -508,6 +518,8 @@ const fetchVacationCodes = async () => {
} else { } else {
console.warn("❌ 공통 코드 데이터를 불러오지 못했습니다."); console.warn("❌ 공통 코드 데이터를 불러오지 못했습니다.");
} }
} catch (error) {
}
}; };
const getVacationType = (typeCode) => { const getVacationType = (typeCode) => {
return vacationCodeMap.value[typeCode] || "기타"; return vacationCodeMap.value[typeCode] || "기타";
@ -548,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) => {