-
To. {{ targetUser.MEMBERNAM }} 🎁
-
+
+
+
-
-
선물할 연차 개수를 선택하세요.
+
+
선물할 연차 개수를 선택하세요.
-
-
- {{ grantCount }}
-
-
-
-
-
+
+
+ {{ grantCount }}
+
+
+
+
+
+
+
-
-
+
-
+
diff --git a/src/components/modal/VacationModal.vue b/src/components/modal/VacationModal.vue
index 5dde272..22db837 100644
--- a/src/components/modal/VacationModal.vue
+++ b/src/components/modal/VacationModal.vue
@@ -1,6 +1,6 @@
-
-
+
+
📅 내 연차 사용 내역
@@ -138,25 +138,4 @@ const closeModal = () => {
diff --git a/src/components/user/RegisterForm.vue b/src/components/user/RegisterForm.vue
index 5a5b557..0a6c7a7 100644
--- a/src/components/user/RegisterForm.vue
+++ b/src/components/user/RegisterForm.vue
@@ -95,9 +95,11 @@
:is-color="true"
:data="colorList"
@update:data="color = $event"
+ @blur="checkColorDuplicate"
class="w-50"
/>
+
{{ colorError }}
{
const response = await $api.get(`/user/checkId?memberIds=${id.value}`);
-
if (!response.data.data) {
idErrorAlert.value = true;
idError.value = '이미 사용 중인 아이디입니다.';
@@ -295,9 +298,26 @@
}
};
+
+ // 색상 중복체크
+ const checkColorDuplicate = async () => {
+ const response = await $api.get(`/user/checkColor?memberCol=${color.value}`);
+
+ if (response.data.data) {
+ colorErrorAlert.value = true;
+ colorError.value = '이미 사용 중인 색상입니다.';
+ } else {
+ colorErrorAlert.value = false;
+ colorError.value = '';
+ }
+ };
+
+
// 회원가입
const handleSubmit = async () => {
+ await checkColorDuplicate();
+
idAlert.value = id.value.trim() === '';
passwordAlert.value = password.value.trim() === '';
passwordcheckAlert.value = passwordcheck.value.trim() === '';
@@ -317,7 +337,8 @@
}
if (profilAlert.value || idAlert.value || idErrorAlert.value || passwordAlert.value || passwordcheckAlert.value ||
- passwordcheckErrorAlert.value || pwhintResAlert.value || nameAlert.value || birthAlert.value || addressAlert.value || phoneAlert.value || phoneErrorAlert.value) {
+ passwordcheckErrorAlert.value || pwhintResAlert.value || nameAlert.value || birthAlert.value ||
+ addressAlert.value || phoneAlert.value || phoneErrorAlert.value || colorErrorAlert.value) {
return;
}
diff --git a/src/layouts/TheTop.vue b/src/layouts/TheTop.vue
index ada3701..2e530ef 100644
--- a/src/layouts/TheTop.vue
+++ b/src/layouts/TheTop.vue
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/src/views/vacation/VacationManagement.vue b/src/views/vacation/VacationManagement.vue
index c8ac838..d5fa758 100644
--- a/src/views/vacation/VacationManagement.vue
+++ b/src/views/vacation/VacationManagement.vue
@@ -148,7 +148,7 @@ watch(
const calendarDatepicker = ref(null);
let fpInstance = null;
-/** ✅ 변경사항 여부 확인 */
+/** 변경사항 여부 확인 */
const hasChanges = computed(() => {
return (
selectedDates.value.size > 0 ||
@@ -157,7 +157,7 @@ const hasChanges = computed(() => {
});
-/** ✅ selectedDates가 변경될 때 버튼 상태 즉시 업데이트 */
+/** selectedDates가 변경될 때 버튼 상태 즉시 업데이트 */
watch(
() => Array.from(selectedDates.value.keys()), // keys()를 Array로 변환해서 감시
(newKeys) => {
@@ -204,7 +204,7 @@ function handleDateClick(info) {
selectedDates.value.set(clickedDateStr, type);
halfDayType.value = null;
updateCalendarEvents();
- // ✅ 날짜 선택 후 버튼 초기화
+ // 날짜 선택 후 버튼 초기화
if (halfDayButtonsRef.value) {
halfDayButtonsRef.value.resetHalfDay();
}
@@ -417,42 +417,42 @@ function handleDateClick(info) {
halfDayType.value = halfDayType.value === type ? null : type;
}
- async function fetchVacationData(year, month) {
- try {
- const response = await axios.get(`vacation/list/${year}/${month}`);
- if (response.status === 200) {
- const vacationList = response.data;
- if (lastRemainingYear.value !== year) {
- myVacations.value = vacationList.filter(
- (vac) => vac.MEMBERSEQ === userStore.user.id
- );
- lastRemainingYear.value = year;
- }
- const events = vacationList
- .filter((vac) => !vac.LOCVACRMM)
- .map((vac) => {
- let dateStr = vac.LOCVACUDT ? vac.LOCVACUDT.split("T")[0] : "";
- let backgroundColor = userColors.value[vac.MEMBERSEQ] || "#FFFFFF";
- return {
- title: getVacationType(vac.LOCVACTYP),
- start: dateStr,
- backgroundColor,
- classNames: [getVacationTypeClass(vac.LOCVACTYP)],
- saved: true,
- memberSeq: vac.MEMBERSEQ,
- };
- })
- .filter((event) => event.start);
- return events;
- } else {
- console.warn("📌 휴가 데이터를 불러오지 못함");
- return [];
- }
- } catch (error) {
- console.error("Error fetching vacation data:", error);
+// 연차 리스트 조회회
+async function fetchVacationData(year, month) {
+ try {
+ const response = await axios.get(`vacation/list/${year}/${month}`);
+ if (response.status === 200) {
+ const vacationList = response.data;
+
+ // 회원 정보가 없거나 색상 정보가 없는 데이터는 제외
+ const filteredVacations = vacationList.filter(vac =>
+ userColors.value[vac.MEMBERSEQ] && userColors.value[vac.MEMBERSEQ] !== "#FFFFFF"
+ );
+
+ const events = filteredVacations.map(vac => {
+ let dateStr = vac.LOCVACUDT ? vac.LOCVACUDT.split("T")[0] : "";
+ let backgroundColor = userColors.value[vac.MEMBERSEQ];
+
+ return {
+ title: getVacationType(vac.LOCVACTYP),
+ start: dateStr,
+ backgroundColor,
+ classNames: [getVacationTypeClass(vac.LOCVACTYP)],
+ saved: true,
+ memberSeq: vac.MEMBERSEQ,
+ };
+ }).filter(event => event.start);
+
+ return events;
+ } else {
+ console.warn("📌 휴가 데이터를 불러오지 못함");
return [];
}
+ } catch (error) {
+ console.error("Error fetching vacation data:", error);
+ return [];
}
+}
async function saveVacationChanges() {
if (!hasChanges.value) return;
@@ -522,7 +522,7 @@ function handleDateClick(info) {
await nextTick();
fullCalendarRef.value.getApi().refetchEvents();
}
- /** ✅ 오늘 이후의 날짜만 클릭 가능하도록 설정 */
+ /** 오늘 이후의 날짜만 클릭 가능하도록 설정 */
function markClickableDates() {
nextTick(() => {
const todayStr = new Date().toISOString().split("T")[0]; // 오늘 날짜 YYYY-MM-DD