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