This commit is contained in:
2026-07-15 18:33:33 +09:00
parent 6b1583103f
commit f533082537
201 changed files with 19776 additions and 563 deletions
+7 -15
View File
@@ -43,20 +43,12 @@ function createStepBar(
if (index === activeStep) button.classList.add("is-active");
button.textContent = step;
// DB state 기반 활성화 로직
let enabled = false;
if (options?.stages && options.stages.length > 0) {
enabled = index === 0 || options.stages[index - 1]?.state === "COMPLETE";
} else {
enabled = index <= activeStep;
}
// 스텝바는 항상 자유롭게 이동 가능(게이팅하지 않음).
// 단계 완료/무효화 판정은 사용자가 각 페이지의 액션 버튼(업로드·분석 실행 등)을
// 눌렀을 때 백엔드가 계산·DB 갱신하며, 여기서는 그 결과를 색상/툴팁으로 표시만 한다.
button.classList.add("is-enabled");
button.disabled = !enabled;
if (enabled) {
button.classList.add("is-enabled");
}
// state 기반 스타일링
// state 기반 스타일링 (표시 전용)
if (options?.stages && options.stages[index]) {
const state = options.stages[index].state;
button.classList.add(`state-${state.toLowerCase()}`);
@@ -73,8 +65,8 @@ function createStepBar(
}
}
// 클릭 이벤트
if (enabled && options?.routes && options?.routes[index]) {
// 클릭 이벤트 — 모든 스텝에서 이동 허용
if (options?.routes && options?.routes[index]) {
button.addEventListener("click", () => {
options.onStepClick?.(index, options.routes![index]);
});