Repository navigation
[oneseo] 예체능 성적 길이 미달 시 4단계 검증 실패 처리 - #522
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
s2yeons
approved these changes
Oct 13, 2026
There was a problem hiding this comment.
Overview
- 원서 4단계 예체능 성적 입력을 졸업 유형과 전형에 따른 실제 필요 칸 수 기준으로 검증하도록 수정.
- 제출/계산 버튼 활성화와 요청 직전 데이터 정규화까지 함께 조정.
Intent
- 일부 칸만 비워도 제출이 가능했던 문제를 막고, 빈 칸이 평균에서 빠져 점수가 잘못 계산되는 것을 방지.
Risk
- 중간. 졸업 유형/전형 상태가 아직 없거나 바뀌는 경우 검증이 느슨해지거나 너무 강하게 막히지 않는지, 과도한 값 잘라내기가 실제 입력 배열과 정렬되는지, 기존 저장/임시저장 원서와 UI 버튼 활성화 흐름에 영향 없는지 확인 필요.
0 inline comment(s)
This branch was successfully deployed
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.
개요 💡
원서 4단계에서 예체능 성적 칸을 일부 비워 둔 채로도 제출 버튼이 활성화되던 문제를 수정하였습니다.
artsPhysicalAchievement는 졸업 유형과 전형에 따라 길이가 달라지는데,step4Schema는 모든 경우에 9개 이상인지만 검사하였습니다. 자유학년제 졸업자가 마지막 칸을 비운 11개짜리 배열이 그대로 전송되었고, 서버도 길이를 검사하지 않아 빈 칸이 평균에서 빠진 점수가 계산되었습니다.작업내용 ⌨️
getArtsPhysicalAchievementLength: 졸업 유형과 전형으로 기대 길이를 구하는 함수를@repo/constants에 추가하였습니다. 숫자를 고정하지 않고ArtPhysicalForm이 그리는 학기 수 × 예체능 과목 수로 계산합니다.createStep4Schema:step4Schema에 길이 검사를 더한 스키마를 추가하였습니다.graduationType은 2단계 값이라 스키마가 직접 알 수 없으므로 인자로 받습니다. 졸업 유형을 아직 모르면step4Schema와 동일하게 동작합니다.StepWrapper,CalculatePage: resolver와 제출·계산 버튼 활성화 판단에createStep4Schema를 사용하도록 변경하였습니다.normalizeArtsPhysicalAchievement: 기대 길이보다 긴 예체능 성적을 임시저장·제출·성적 계산 요청 직전에 잘라내도록 추가하였습니다.검증 결과는 다음과 같습니다.
pnpm test(@repo/constants11건,@repo/types16건,@repo/ui15건),pnpm check-types,pnpm lint가 모두 통과하였습니다.관련 이슈 🚨
리뷰 요청사항 👀
2ca7d42c로 분리하였습니다.