Merge branch 'main' of http://192.168.0.251:3000/localnet/localhost-front
This commit is contained in:
commit
2c0a6f5ffc
@ -580,13 +580,18 @@
|
||||
}
|
||||
/* project list end */
|
||||
|
||||
/* commuters project list */
|
||||
/* commuters */
|
||||
.commuter-list {
|
||||
max-height: 358px;
|
||||
overflow-y: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
/* commuters project list end */
|
||||
|
||||
.fc-daygrid-day[data-has-commuters="true"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* commuters end */
|
||||
|
||||
/* Scroll Button */
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
<textarea v-model="localEditedContent" class="form-control"></textarea>
|
||||
<span v-if="editCommentAlert" class="invalid-feedback d-block text-start">{{ editCommentAlert }}</span>
|
||||
<div class="mt-2 d-flex justify-content-end">
|
||||
<SaveBtn class="btn btn-primary" @click="submitEdit"></SaveBtn>
|
||||
<SaveBtn class="btn btn-primary" @click="submitEdit" :isEnabled="disabled"></SaveBtn>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -142,6 +142,8 @@
|
||||
};
|
||||
|
||||
const localEditedContent = ref(props.comment.content);
|
||||
const isModifyContent = ref(props.comment.content);
|
||||
const disabled = ref(false);
|
||||
|
||||
// 댓글 입력 창 토글
|
||||
const isComment = ref(false);
|
||||
@ -182,6 +184,11 @@
|
||||
watch(
|
||||
() => localEditedContent.value,
|
||||
newVal => {
|
||||
if (JSON.stringify(isModifyContent.value) == JSON.stringify(newVal)) {
|
||||
disabled.value = false;
|
||||
return;
|
||||
}
|
||||
disabled.value = true;
|
||||
emit('inputDetector');
|
||||
},
|
||||
);
|
||||
|
||||
@ -1,23 +1,18 @@
|
||||
<template>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary ms-1"
|
||||
@click="$emit('click')"
|
||||
:disabled="!isEnabled"
|
||||
>
|
||||
<button type="button" class="btn btn-primary ms-1" @click="$emit('click')" :disabled="!isEnabled">
|
||||
<i class="bx bx-check"></i>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "SaveButton",
|
||||
props: {
|
||||
isEnabled: {
|
||||
type: Boolean,
|
||||
default: true, // 기본적으로 활성화
|
||||
export default {
|
||||
name: 'SaveButton',
|
||||
props: {
|
||||
isEnabled: {
|
||||
type: Boolean,
|
||||
default: true, // 기본적으로 활성화
|
||||
},
|
||||
},
|
||||
},
|
||||
emits: ["click"],
|
||||
};
|
||||
emits: ['click'],
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -60,15 +60,12 @@ const { coords, isSupported, error } = useGeolocation({
|
||||
const getAddress = (lat, lng) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const geocoder = new kakao.maps.services.Geocoder();
|
||||
const coord = new kakao.maps.LatLng(lat, lng);
|
||||
|
||||
geocoder.coord2Address(coord.getLng(), coord.getLat(), (result, status) => {
|
||||
geocoder.coord2Address(lat, lng, (result, status) => {
|
||||
if (status === kakao.maps.services.Status.OK) {
|
||||
const address = result[0].address.address_name;
|
||||
resolve(address);
|
||||
} else {
|
||||
reject('주소를 가져올 수 없습니다.');
|
||||
return;
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -86,22 +83,22 @@ const getLocation = async () => {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (coords.value) {
|
||||
userLocation.value = {
|
||||
lat: coords.value.latitude,
|
||||
lng: coords.value.longitude,
|
||||
};
|
||||
|
||||
try {
|
||||
const address = await getAddress(coords.value.latitude, coords.value.longitude);
|
||||
return address;
|
||||
} catch (error) {
|
||||
alert(error);
|
||||
return null;
|
||||
}
|
||||
if (!coords.value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
userLocation.value = {
|
||||
lat: coords.value.latitude,
|
||||
lng: coords.value.longitude,
|
||||
};
|
||||
|
||||
try {
|
||||
const address = await getAddress(coords.value.latitude, coords.value.longitude);
|
||||
return address;
|
||||
} catch (error) {
|
||||
alert(error);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
// 오늘 사용자의 출근 정보 조회
|
||||
|
||||
@ -144,17 +144,6 @@ const handleLeaveTimeUpdate = () => {
|
||||
todaysCommuter();
|
||||
};
|
||||
|
||||
const handleResetProjectState = () => {
|
||||
// 이전에 체크인했던 프로젝트로 복귀
|
||||
const storedProject = projectStore.getSelectedProject();
|
||||
if (storedProject) {
|
||||
checkedInProject.value = storedProject;
|
||||
selectedProject.value = storedProject.PROJCTSEQ;
|
||||
projectStore.setSelectedProject(storedProject);
|
||||
pendingProjectChange.value = null;
|
||||
}
|
||||
};
|
||||
|
||||
// 프로젝트 드롭 이벤트 핸들러 (ProjectList 컴포넌트에서 전달받음)
|
||||
const handleProjectDrop = ({ event, targetProject }) => {
|
||||
const draggedProjectData = JSON.parse(event.dataTransfer.getData('application/json'));
|
||||
@ -335,6 +324,7 @@ const loadCommuters = async () => {
|
||||
if (dateCell) {
|
||||
const dayEvents = dateCell.querySelector('.fc-daygrid-day-events');
|
||||
if (dayEvents) {
|
||||
dateCell.setAttribute('data-has-commuters', 'true');
|
||||
dayEvents.classList.add('text-center');
|
||||
// 프로필 이미지 생성
|
||||
const profileImg = document.createElement('img');
|
||||
@ -442,3 +432,8 @@ onMounted(async () => {
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.fc-daygrid-day[data-has-commuters="true"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="commuter-list">
|
||||
<div class="commuter-list mt-3">
|
||||
<div
|
||||
v-for="post in sortedProjects"
|
||||
:key="post.PROJCTSEQ"
|
||||
class="border border-2 mt-3 card p-2"
|
||||
class="border border-2 mb-3 card p-2"
|
||||
:style="`border-color: ${post.projctcolor} !important; color: ${post.projctcolor} !important;`"
|
||||
@dragover="allowDrop($event)"
|
||||
@drop="handleDrop($event, post)"
|
||||
|
||||
@ -332,9 +332,12 @@
|
||||
};
|
||||
|
||||
watch(password, (newValue) => {
|
||||
if (newValue.length >= 4) {
|
||||
if (newValue && newValue.length >= 4) {
|
||||
passwordErrorAlert.value = false;
|
||||
passwordError.value = '';
|
||||
} else if (newValue && newValue.length < 4) {
|
||||
passwordErrorAlert.value = true;
|
||||
passwordError.value = '비밀번호는 4자리 이상이어야 합니다.';
|
||||
}
|
||||
});
|
||||
|
||||
@ -342,6 +345,7 @@
|
||||
// 회원가입
|
||||
const handleSubmit = async () => {
|
||||
await checkColorDuplicate();
|
||||
|
||||
idAlert.value = id.value.trim() === '';
|
||||
passwordAlert.value = password.value.trim() === '';
|
||||
passwordcheckAlert.value = passwordcheck.value.trim() === '';
|
||||
@ -351,8 +355,8 @@
|
||||
addressAlert.value = address.value.trim() === '';
|
||||
phoneAlert.value = phone.value.trim() === '';
|
||||
|
||||
// 비밀번호 길이 체크 로직 추가
|
||||
if (password.value.length < 4) {
|
||||
// 비밀번호 길이 체크 로직 수정
|
||||
if (password.value && password.value.length < 4) {
|
||||
passwordErrorAlert.value = true;
|
||||
passwordError.value = '비밀번호는 4자리 이상이어야 합니다.';
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user