260715_0
This commit is contained in:
@@ -54,7 +54,7 @@ function parseNumber(value: string): number | null {
|
||||
return Number.isFinite(parsed) ? parsed : null;
|
||||
}
|
||||
|
||||
export function renderB06ProfileCross(root: HTMLElement): void {
|
||||
export async function renderB06ProfileCross(root: HTMLElement): Promise<void> {
|
||||
let currentRouteId: number | null = null;
|
||||
|
||||
/* ---- 좌측: 대상 경로 ---- */
|
||||
@@ -255,14 +255,15 @@ export function renderB06ProfileCross(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