diff --git a/public/css/custom.css b/public/css/custom.css index 62bc1b9..c4bb01d 100644 --- a/public/css/custom.css +++ b/public/css/custom.css @@ -8,69 +8,41 @@ /* 휴가 */ .half-day-buttons { - display: flex; - justify-content: center; - gap: 10px; - margin-top: 20px; - } - .half-day-buttons .btn.active { - border: 2px solid black; - } - .fc-daygrid-day-frame { - min-height: 80px !important; - max-height: 120px !important; - overflow: hidden !important; - padding-top: 25px !important; - } - .fc-daygrid-day-events { - max-height: 100px !important; - overflow-y: auto !important; - } - .fc-daygrid-event { - position: absolute !important; - height: 20px !important; - width: 100% !important; - left: 0 !important; - margin: 2px 0 !important; - padding: 0 !important; - border-radius: 2px !important; - border: none !important; - } - .fc-daygrid-event-harness { - display: flex; - flex-direction: column; - align-items: flex-start; - justify-content: flex-start; - width: 100%; - gap: 22px; - } - .fc-daygrid-event.half-day-am { - width: 45% !important; - left: 0 !important; - } - .fc-daygrid-event.half-day-pm { - width: 45% !important; - left: auto !important; - right: 0 !important; - } - .fc-daygrid-event.full-day { - width: 100% !important; - left: 0 !important; - } - .fc-day-sun .fc-daygrid-day-number, - .fc-col-header-cell:first-child .fc-col-header-cell-cushion { - color: #ff4500 !important; - } - .fc-day-sat .fc-daygrid-day-number, - .fc-col-header-cell:last-child .fc-col-header-cell-cushion { - color: #6076e0 !important; - } - .fc-daygrid-day-number { - position: absolute !important; - top: 0px !important; - left: 5px !important; - text-align: left !important; - } + display: flex; + justify-content: center; + gap: 10px; + margin-top: 20px; +} +.half-day-buttons .btn.active { + border: 2px solid black; +} + +.fc-daygrid-day-events { + max-height: 100px !important; + overflow-y: auto !important; +} + +.fc-event { + border: none; +} +.fc-daygrid-event.half-day-am { + width: calc(50% - 4px) !important; +} +.fc-daygrid-event.half-day-pm { + width: calc(50% - 4px) !important; + margin-left: auto !important +} +.fc-day-sun .fc-daygrid-day-number, +.fc-col-header-cell:first-child .fc-col-header-cell-cushion { + color: #ff4500 !important; +} +.fc-day-sat .fc-daygrid-day-number, +.fc-col-header-cell:last-child .fc-col-header-cell-cushion { + color: #6076e0 !important; +} +.fc-daygrid-day-number { + margin-right: auto; +} .grayscaleImg { filter: grayscale(100%); diff --git a/src/components/commuters/Calendar.vue b/src/components/commuters/Calendar.vue new file mode 100644 index 0000000..08af625 --- /dev/null +++ b/src/components/commuters/Calendar.vue @@ -0,0 +1,202 @@ + + + diff --git a/src/components/projectlist/ProjectList.vue b/src/components/projectlist/ProjectList.vue index ce0be6a..4975995 100644 --- a/src/components/projectlist/ProjectList.vue +++ b/src/components/projectlist/ProjectList.vue @@ -172,7 +172,6 @@ const userStore = useUserInfoStore(); // 상태 관리 const user = ref(null); const projectList = ref([]); -const filteredProjects = ref([]); const selectedCategory = ref(null); const searchText = ref(''); diff --git a/src/components/user/FindPassword.vue b/src/components/user/FindPassword.vue index c4e073a..0260908 100644 --- a/src/components/user/FindPassword.vue +++ b/src/components/user/FindPassword.vue @@ -40,10 +40,11 @@ @update:alert="pwhintResAlert = $event" :value="pwhintRes" /> -
- 취소 - +
+ +
+

{{ userCheckMsg }}

@@ -73,7 +74,8 @@ {{ passwordcheckError }}
- + +

{{ pwErrMsg }}

@@ -86,6 +88,8 @@ import { useToastStore } from '@s/toastStore'; import UserFormInput from '@c/input/UserFormInput.vue'; import FormSelect from '../input/FormSelect.vue'; + import BackBtn from '@c/button/BackBtn.vue'; + import SaveBtn from '../button/SaveBtn.vue'; const router = useRouter(); const toastStore = useToastStore(); @@ -94,6 +98,8 @@ const birth = ref(''); const pwhint = ref(''); const pwhintRes = ref(''); + const userCheckMsg = ref(""); + const pwErrMsg = ref(""); const idAlert = ref(false); const birthAlert = ref(false); @@ -108,15 +114,22 @@ const passwordcheckAlert = ref(false); const passwordcheckErrorAlert = ref(false); - const { pwhintList } = commonApi(); + const { pwhintList } = commonApi({ + loadPwhint: true, + }); const handleIdChange = value => { id.value = value; idAlert.value = false; }; + const handleback = () => { + router.push('/login'); + } + // 아이디, 생년월일, 비밀번호 힌트, 답변이 일치하는 member 재설정 input 보이기 const handleSubmit = async () => { + userCheckMsg.value = ''; idAlert.value = id.value.trim() === ''; pwhintResAlert.value = pwhintRes.value.trim() === ''; birthAlert.value = birth.value.trim() === ''; @@ -135,7 +148,8 @@ if (response.status === 200 && response.data.data === true) { resetForm.value = true; } else { - toastStore.onToast('일치하는 정보가 없습니다.', 'e'); + userCheckMsg.value = '입력하신 정보와 일치하는 회원이 없습니다.'; + return; } }; @@ -151,9 +165,10 @@ // 비밀번호 업데이트 const handleNewPassword = async () => { + pwErrMsg.value = ''; passwordAlert.value = password.value.trim() === ''; passwordcheckAlert.value = passwordcheck.value.trim() === ''; - + checkPw(); if (passwordAlert.value || passwordcheckAlert.value || passwordcheckErrorAlert.value) { return; } @@ -164,7 +179,7 @@ }); if (checkResponse.data.data === false) { - toastStore.onToast('기존 비밀번호와 동일한 비밀번호로 변경할 수 없습니다.', 'e'); + pwErrMsg.value = '기존 비밀번호와 동일한 비밀번호로 변경할 수 없습니다.'; return; } diff --git a/src/components/user/LoginForm.vue b/src/components/user/LoginForm.vue index d176fed..90b4859 100644 --- a/src/components/user/LoginForm.vue +++ b/src/components/user/LoginForm.vue @@ -13,6 +13,7 @@
+

{{ errorMessage }}

@@ -29,7 +30,6 @@ diff --git a/src/components/user/RegisterForm.vue b/src/components/user/RegisterForm.vue index 1924e21..2953ea3 100644 --- a/src/components/user/RegisterForm.vue +++ b/src/components/user/RegisterForm.vue @@ -141,9 +141,11 @@ :is-alert="phoneAlert" @update:data="phone = $event" @update:alert="phoneAlert = $event" + @blur="checkPhoneDuplicate" :maxlength="11" :value="phone" /> + {{ phoneError }}
취소 @@ -181,6 +183,7 @@ const detailAddress = ref(''); const postcode = ref(''); // 우편번호 const phone = ref(''); + const phoneError = ref(''); const color = ref(''); // 선택된 color const mbti = ref(''); // 선택된 MBTI const pwhint = ref(''); // 선택된 pwhint @@ -196,6 +199,7 @@ const birthAlert = ref(false); const addressAlert = ref(false); const phoneAlert = ref(false); + const phoneErrorAlert = ref(false); const toastStore = useToastStore(); @@ -251,6 +255,19 @@ } }; + // 전화번호 중복체크 + const checkPhoneDuplicate = async () => { + const response = await $api.get(`/user/checkPhone?memberTel=${phone.value}`); + + if (!response.data.data) { + phoneErrorAlert.value = true; + phoneError.value = '이미 사용 중인 전화번호입니다.'; + } else { + phoneErrorAlert.value = false; + phoneError.value = ''; + } + }; + // 컬러, mbti, 비밀번호 힌트 목록 불러오기 const { colorList, mbtiList, pwhintList } = commonApi({ loadColor: true, colorType: 'YON', @@ -298,7 +315,7 @@ } if (profilAlert.value || idAlert.value || idErrorAlert.value || passwordAlert.value || passwordcheckAlert.value || - passwordcheckErrorAlert.value || pwhintResAlert.value || nameAlert.value || birthAlert.value || addressAlert.value || phoneAlert.value) { + passwordcheckErrorAlert.value || pwhintResAlert.value || nameAlert.value || birthAlert.value || addressAlert.value || phoneAlert.value || phoneErrorAlert.value) { return; } diff --git a/src/components/user/UserList.vue b/src/components/user/UserList.vue index 835c7ff..27f81e6 100644 --- a/src/components/user/UserList.vue +++ b/src/components/user/UserList.vue @@ -17,6 +17,7 @@ :class="{ 'grayscaleImg': isUserDisabled(user) }" :src="`${baseUrl}upload/img/profile/${user.MEMBERPRF}`" :style="`border-color: ${user.usercolor} !important;`" + @error="$event.target.src = '/img/icons/icon.png'" alt="user" /> diff --git a/src/layouts/NormalLayout.vue b/src/layouts/NormalLayout.vue index b2295de..bdf1271 100644 --- a/src/layouts/NormalLayout.vue +++ b/src/layouts/NormalLayout.vue @@ -38,17 +38,11 @@ const loadScript = src => { script.type = 'text/javascript'; script.async = true; document.body.appendChild(script); - // script.onload = () => { - // console.log(`${src} loaded successfully.`); - // }; - // script.onerror = () => { - // console.error(`Failed to load script: ${src}`); - // }; }; nextTick(async () => { await wait(200); loadScript('/vendor/js/menu.js'); - loadScript('/js/main.js'); + // loadScript('/js/main.js'); });