This commit is contained in:
2026-07-10 19:52:06 +09:00
parent b98affbf99
commit 6b1583103f
19 changed files with 1515 additions and 98 deletions
@@ -11,7 +11,7 @@
* 텍스트는 ui_template_locale에 선(先) 등록 후 참조 (frontend.md §3).
* ========================================================================== */
import { CURRENT_PROJECT_ID_KEY } from "@config/config_frontend";
import { CURRENT_PROJECT_ID_KEY, ROUTES, type RoutePath } from "@config/config_frontend";
import { currentLanguageIndex, ui_locales } from "@ui/ui_template_locale";
import {
createButton,
@@ -20,8 +20,9 @@ import {
showLoadingOverlay,
showToast,
} from "@ui/ui_template_elements";
import { createWorkflowLayout } from "@ui/ui_template_workflow_layout";
import { createWorkflowLayout, type WorkflowStage } from "@ui/ui_template_workflow_layout";
import { workflowSteps } from "../A00_Common/b_page_scaffold";
import { navigateTo } from "../A00_Common/router";
import {
confirmSections,
generateSections,
@@ -240,12 +241,44 @@ export function renderB06ProfileCross(root: HTMLElement): void {
}
renderEmptyResult();
const workflowRoutes = [
ROUTES.B03_FILE_INPUT,
ROUTES.B04_WF1_SURFACE,
ROUTES.B05_WF2_ROUTE,
ROUTES.B06_WF3_PROFILE_CROSS,
ROUTES.B07_WF4_DESIGN_DETAIL,
ROUTES.B08_WF5_QUANTITY,
ROUTES.B09_WF6_ESTIMATION,
];
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 */
});
}
const layout = createWorkflowLayout({
title: L("B06_Profile_Title"),
steps: workflowSteps(),
activeStep: 3,
leftPanel: leftForm,
mainContent: resultCard,
stages: workflowStages,
routes: workflowRoutes,
onStepClick: (_stepIndex, route) => {
if (projectId) {
localStorage.setItem(CURRENT_PROJECT_ID_KEY, projectId);
navigateTo(route as RoutePath);
}
},
});
root.replaceChildren(layout.root);
}