feat: #85 하루 마감 API 연결 (daily_plan_finalize) - #86
Open
wngjs8114 wants to merge 1 commit into
Open
Conversation
Collaborator
|
이 PR은 PR #80(feature/#79-daily-plan-finalize-api)이랑 완전히 같은 기능(#85 하루 마감 API 연결)을 별도 브랜치에서 독립적으로 구현하신 것 같습니다. PR #80은 이미 리뷰 반영 후 dev에 merge됐습니다(d0c6b75). 이 브랜치(feature/#85-daily-plan-finalize)는 d585386 커밋 하나만 있고 PR #78 merge 직후 시점을 기준으로 하고 있어서, PR #80에서 있었던 리뷰 내용(예: _get_today_daily_plan 조회 순서 수정)은 반영이 안 된 상태입니다. 실제로 dev와 병합을 시도해보니 planner/views.py, planner/tests.py 양쪽에서 충돌이 발생합니다. 코드 자체는 문제없어 보입니다(오히려 시험기간을 먼저 고르지 않고 DailyPlan을 직접 조회하는 방식이라, PR #80에서 지적했던 것과 동일한 버그도 없습니다). 다만 이미 dev에 같은 기능이 들어가 있는 상태라, 이 PR은 닫으시는 걸 권장드립니다. 혹시 이 브랜치에서 PR #80에는 없는 다른 작업(예: redirect_url TODO 처리 방식 등)이 있다면, 그 부분만 따로 새 PR로 만들어서 올려주시면 확인하겠습니다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
관련 이슈
Closes #85
작업 내용
end_of_day_modal.html(FE1, #74)이 하루 종료 UI는 갖췄지만,eodSubmit버튼은 아직setTimeout으로 가짜 진행 애니메이션만 보여줄 뿐 실제 제출 로직이 없던 부분을 연결한다.planner:daily_plan_finalize(POST): 오늘의 DailyPlan을finalize_daily_plan()으로 마감 처리progress_record([planner] 학습 결과 입력 API 연결 (progress_record) #73)와 동일하게 JSON API로 구현API 계약
POST /planner/daily-plans/finalize/
Response 성공(200): {"needs_recovery": bool, "recovery_group_id": str|null, "redirect_url": str}
Response 실패(400/404/409): {"message": str}
설계 결정 사항
mark_unrecorded_as_not_done=True고정:end_of_day_modal.html이 이미 "완료하지 못한 작업이 있으면 복구 방법을 선택할 수 있는 화면으로 안내해드릴게요"라고 안내하고 있어서, 미입력 작업을 사용자 확인 없이 자동으로 못함 처리하는 게 UI 문구와 일치date=timezone.localdate()로 오늘 계획만 조회하므로,FutureDailyPlanFinalizeError는 View 레벨에서 발생할 일이 없음(애초에 조회 대상에서 제외) — 대신 없는 계획으로 404 처리recovery_compareURL 미완성 대응:#82(복구안 비교 화면)가 아직 View 연결 전이라,redirect_url은 임시로"#"처리.#82View 작업 시reverse('planner:recovery_compare', ...)로 교체 필요#73(progress_record)에서 정한 "오늘 날짜 + 활성 시험기간만" 제한 원칙 동일 적용이번 PR 범위 밖
recovery_compare(복구안 비교) View — 화면(feat: #68 복구안 비교 및 미리보기 화면 구현 #82)만 진행 중, 별도 이슈로 분리eodSubmit클릭 핸들러 fetch 연결 (API 계약 전달 후 FE1 작업)테스트
python manage.py test planner→ 146개 통과 (기존 140 + 신규 6)TODO (후속)
#82View 연결 시redirect_url임시 처리("#")를 실제recovery_compareURL로 교체