![user]()
props.data.localVote.total_voted, () => {
// 종료 체크 함수
const checkVoteCompletion = () => {
- if (props.data.localVote.total_votable === props.data.localVote.total_voted && props.data.localVote.LOCVOTDDT == '') {
+ if (props.data.localVote.total_votable === props.data.localVote.total_voted && props.data.localVote.LOCVOTDDT == null) {
emit('voteEnded', { id: props.data.localVote.LOCVOTSEQ });
}
};
diff --git a/src/views/board/BoardEdit.vue b/src/views/board/BoardEdit.vue
index ca83d6e..9cd81a0 100644
--- a/src/views/board/BoardEdit.vue
+++ b/src/views/board/BoardEdit.vue
@@ -166,7 +166,8 @@
// 목록 페이지로 이동
const goList = () => {
accessStore.$reset();
- router.push('/board');
+ //router.push('/board');
+ router.back();
};
// 전 페이지로 이동
diff --git a/src/views/board/BoardView.vue b/src/views/board/BoardView.vue
index a202b57..7b4e57e 100644
--- a/src/views/board/BoardView.vue
+++ b/src/views/board/BoardView.vue
@@ -30,6 +30,7 @@
autocomplete="new-password"
v-model="password"
placeholder="비밀번호 입력"
+ maxlength="8"
@input="
password = password.replace(/\s/g, '');
inputCheck();
@@ -562,6 +563,7 @@
if (comment.isEditTextarea) {
comment.isEditTextarea = false;
comment.isCommentPassword = true;
+ toggleCommentPassword(comment, 'delete');
} else {
toggleCommentPassword(comment, 'delete');
}
diff --git a/src/views/vacation/VacationManagement.vue b/src/views/vacation/VacationManagement.vue
index 52dbbe3..1422758 100644
--- a/src/views/vacation/VacationManagement.vue
+++ b/src/views/vacation/VacationManagement.vue
@@ -127,6 +127,19 @@ const hasChanges = computed(() => {
);
});
+// 캘린더 이동 함수 (이전, 다음, 오늘)
+const moveCalendar = async (value = 0) => {
+ const calendarApi = fullCalendarRef.value?.getApi();
+
+ if (value === 1) {
+ calendarApi.prev(); // 이전 달로 이동
+ } else if (value === 2) {
+ calendarApi.next(); // 다음 달로 이동
+ } else if (value === 3) {
+ calendarApi.today(); // 오늘 날짜로 이동
+ }
+};
+
/* 캘린더 설정 */
// 풀 캘린더 옵션,이벤트
const calendarOptions = reactive({
@@ -143,6 +156,20 @@ const calendarOptions = reactive({
dateClick: handleDateClick,
datesSet: handleMonthChange,
events: calendarEvents,
+ customButtons: {
+ prev: {
+ text: 'PREV',
+ click: () => moveCalendar(1),
+ },
+ today: {
+ text: 'TODAY',
+ click: () => moveCalendar(3),
+ },
+ next: {
+ text: 'NEXT',
+ click: () => moveCalendar(2),
+ },
+ },
});
// 캘린더 월 변경
function handleMonthChange(viewInfo) {
@@ -178,6 +205,21 @@ function handleDateClick(info) {
const isMyVacation = myVacations.value.some(vac => vac.date.substring(0, 10) === clickedDateStr && !vac.receiverId);
+ if (!selectedDates.value.has(clickedDateStr) && isMyVacation && halfDayType.value) {
+ const existingVacation = myVacations.value.find(vac => vac.date.substring(0, 10) === clickedDateStr && !vac.receiverId);
+ const selectedType =
+ halfDayType.value === "AM" ? "700101" :
+ halfDayType.value === "PM" ? "700102" : "700103";
+ if (existingVacation.type === selectedType) {
+ toastStore.onToast("이미 사용한 연차입니다.", "e");
+ if (halfDayButtonsRef.value) {
+ halfDayButtonsRef.value.resetHalfDay();
+ }
+ halfDayType.value = null;
+ return;
+ }
+ }
+
// 이미 활성화된 날짜를 한 번 더 클릭하면 비활성화
if (currentValue && currentValue !== "delete") {
selectedDates.value.delete(clickedDateStr);
diff --git a/src/views/voteboard/voteBoardList.vue b/src/views/voteboard/voteBoardList.vue
index e1f885b..4079dad 100644
--- a/src/views/voteboard/voteBoardList.vue
+++ b/src/views/voteboard/voteBoardList.vue
@@ -132,7 +132,6 @@ const checkedNames = (numList) => {
}
//투표종료
const endVoteId = (endVoteId) => {
- console.log('endVoteId',endVoteId)
$api.patch('vote/updateEndData',{
endVoteId :endVoteId
}).then((res)=>{
@@ -143,7 +142,6 @@ const endVoteId = (endVoteId) => {
}
//기한 지난 투표 종료
const voteEnded = async (id) =>{
- console.log('voteEnded',id)
await endVoteId(id.id);
}
//투표 삭제
diff --git a/src/views/voteboard/voteboardWrite.vue b/src/views/voteboard/voteboardWrite.vue
index b94450e..9b2d66f 100644
--- a/src/views/voteboard/voteboardWrite.vue
+++ b/src/views/voteboard/voteboardWrite.vue
@@ -34,7 +34,7 @@
@@ -115,10 +115,7 @@ import { useUserStore } from '@s/userList';
import { useRoute } from "vue-router";
const userStore = useUserStore();
-// const offset = new Date().getTimezoneOffset() * 60000
-// const today = new Date(Date.now() - offset);
-// today.setDate(today.getDate() + 1);
-// const minDate = today.toISOString().substring(0, 16);
+
const toastStore = useToastStore();
const activeUserList = ref([]);
const disabledUsers = ref([]);
@@ -144,12 +141,11 @@ const focusDateInput = () => {
const minDate = ref('');
onMounted(() => {
- nextTick(() => {
const offset = new Date().getTimezoneOffset() * 60000;
const today = new Date(Date.now() - offset);
today.setDate(today.getDate() + 1);
minDate.value = today.toISOString().substring(0, 16);
- });
+
});
const userSet = ({ userList, userTotal }) => {
diff --git a/src/views/wordDict/wordDict.vue b/src/views/wordDict/wordDict.vue
index a75ff61..fada88a 100644
--- a/src/views/wordDict/wordDict.vue
+++ b/src/views/wordDict/wordDict.vue
@@ -31,6 +31,7 @@
{
- console.log(category,'category')
const payload = {
WRDDICCAT: category,
WRDDICTTL: wordData.title,