fix(study): 새 회차 시작 동선 — query 회차명이 examRounds 에 없을 때 mode='new' 자동 전환
회차 카드 페이지의 [새 회차 시작] → /questions/new?exam_round=...&start_qnum=1 진입 시 query 의 회차명이 기존 examRounds 에 없으면 (신규 회차라 등록된 문제 0개) select dropdown 옵션에 매칭이 없어서 회차 정보가 표시 안 되는 회귀. onMount 에서 query 회차명이 examRounds 에 없으면 mode='new' + f_exam_round_new prefill. 사용자가 신규 회차로 입력한 이름이 그대로 폼에 박힘. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -203,6 +203,15 @@
|
||||
f_qnum = found.next_question_number;
|
||||
}
|
||||
}
|
||||
// FIX: 새 회차 시작 동선 — query 로 받은 회차명이 기존 examRounds 에 없으면
|
||||
// 신규 회차로 보고 mode='new' + new input 에 채움 (dropdown 에 옵션이 없어서 안 보이는 회귀 차단).
|
||||
if (f_exam_round) {
|
||||
const exists = examRounds.some((r) => r.exam_round === f_exam_round);
|
||||
if (!exists) {
|
||||
f_exam_round_mode = 'new';
|
||||
f_exam_round_new = f_exam_round;
|
||||
}
|
||||
}
|
||||
// 진입 시점은 사용자가 input 박스를 만진 적 없음 — false 로 reset.
|
||||
f_qnum_user_edited = false;
|
||||
// $effect 의 lastExamRound 를 현재 값으로 sync — 첫 실행이 또 reset 하지 않도록.
|
||||
|
||||
Reference in New Issue
Block a user