-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] Task 타임블로킹 삭제 api 연결 #220
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기존에 같은 id 가진 이벤트가 캘린더에 있다면 삭제
주석 달아둔 부분에도 삭제 기능이 달려야 할 것 같습니다!
오늘 안에 한 태스크를 한번만 긁을 수 있기 때문에 새로 긁으면 기존에 있던 블럭이 지워져야 해서 이쪽에 그 처리를 해주면 될 것 같아요
interface TasksEventData { | ||
taskId: number; | ||
timeBlockId: number; | ||
title: string; | ||
start: string; | ||
end: string; | ||
allDay?: boolean; | ||
classNames: string; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interface TasksEventData { | |
taskId: number; | |
timeBlockId: number; | |
title: string; | |
start: string; | |
end: string; | |
allDay?: boolean; | |
classNames: string; | |
} | |
interface TasksEventData extends EventData { | |
taskId: number; | |
timeBlockId: number; | |
} |
여기 인터페이스 상속으로 이렇게 써줄 수 있을 것 같네요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 오 이렇게도 할 수 있군요 배우고 갑니닷 👍👍👍
const removeTimezone = (str: string) => str.replace(/:\d{2}[+-]\d{2}:\d{2}$/, ''); | ||
|
||
const startStr = removeTimezone(selectInfo.startStr); | ||
const endStr = removeTimezone(selectInfo.endStr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굳
주석한줄 달아주시면 너무너무 좋을 것 같아요!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다ㅏ! 덕분에 api 연결 구조에 대한 감을 좀 잡게 되었어요,,, (너 감잡으라고 올린 피알 아니야 막이래)
@@ -199,15 +213,15 @@ function FullCalendarBox({ size, selectDate, selectedTarget }: FullCalendarBoxPr | |||
eventClick={handleEventClick} | |||
select={addEventWhenDragged} | |||
/> | |||
{isModalOpen && ( | |||
// 🚨 임시 taskID ... 데이터 형식 확정 후 수정할 것 🚨 | |||
{isModalOpen && modalTaskId !== null && modalTimeBlockId !== null && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
모달 테스크 아이디와 타임블록 아이디가 존재할 때만 모달이 열리도록 처리해주셨군용! 쪼아요
interface TasksEventData { | ||
taskId: number; | ||
timeBlockId: number; | ||
title: string; | ||
start: string; | ||
end: string; | ||
allDay?: boolean; | ||
classNames: string; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 오 이렇게도 할 수 있군요 배우고 갑니닷 👍👍👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
타임블록킹 삭제가 되는 것을 확인했습니다! 삭제까지 많은 시간이 소요되는 것은 로딩 상태를 추가해서 추후에 처리하면 좋을 것 같습니다! 고생하셨습니당 👍
/** TimeBlock 삭제 */ | ||
const useDeleteTimeBlock = () => { | ||
const queryClient = useQueryClient(); | ||
const mutation = useMutation({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
태스크 삭제 적용까지 시간이 많이 걸려서 isLoading이면 스피너를 추가하면 더욱 좋을 것 같습니다!
작업 내용 🧑💻
알게된 점 🚀
리뷰 요구사항 💬
관련 이슈
close #214
스크린샷 (선택)