260715_0
This commit is contained in:
@@ -71,7 +71,7 @@ function parseNumber(value: string): number | null {
|
||||
return Number.isFinite(parsed) ? parsed : null;
|
||||
}
|
||||
|
||||
export function renderB05Route(root: HTMLElement): void {
|
||||
export async function renderB05Route(root: HTMLElement): Promise<void> {
|
||||
/* ---- 좌측: 경로 제어점 ---- */
|
||||
const pointsGroup = document.createElement("fieldset");
|
||||
pointsGroup.className = "b05-route__group";
|
||||
@@ -333,14 +333,15 @@ export function renderB05Route(root: HTMLElement): void {
|
||||
let workflowStages: WorkflowStage[] = [];
|
||||
const projectId = localStorage.getItem(CURRENT_PROJECT_ID_KEY);
|
||||
if (projectId) {
|
||||
fetch(`/api/projects/${projectId}/workflow-state`)
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
workflowStages = data.stages || [];
|
||||
})
|
||||
.catch(() => {
|
||||
/* silently fail */
|
||||
});
|
||||
try {
|
||||
const res = await fetch(`/api/projects/${projectId}/workflow-state`);
|
||||
if (res.ok) {
|
||||
const data = await res.json();
|
||||
workflowStages = data.workflow_state?.stages ?? data.stages ?? [];
|
||||
}
|
||||
} catch {
|
||||
/* 실패 시 빈 배열 → activeStep 기준 폴백으로 이동 허용 */
|
||||
}
|
||||
}
|
||||
|
||||
const layout = createWorkflowLayout({
|
||||
|
||||
Reference in New Issue
Block a user