B05 페이지 초안

This commit is contained in:
2026-07-18 17:48:51 +09:00
parent b03d38084e
commit 050a5a2ba3
24 changed files with 1749 additions and 600 deletions
+14 -2
View File
@@ -12,6 +12,7 @@ import { createButton, createTag, showToast } from "@ui/ui_template_elements";
import { createGeneralLayout } from "@ui/ui_template_general_layout";
import { createWorkflowOverlays } from "@ui/ui_template_overlay";
import { createStepBar, WORKFLOW_STEP_ICONS } from "@ui/ui_template_workflow_layout";
import { fetchDashboardMe } from "../B01_Dashboard/B01_Dashboard_Api_Fetch";
import {
checkWF1AnalysisStatus,
createUploadSession,
@@ -50,6 +51,9 @@ function L(key: keyof typeof ui_locales): string {
}
export async function renderB03FileInput(root: HTMLElement): Promise<void> {
const dashboardUser = await fetchDashboardMe();
const completionRoute =
dashboardUser.role === "SYSTEM_ADMIN" ? ROUTES.B04_WF1_SURFACE : ROUTES.B05_WF2_ROUTE;
const slots = initializeSlots();
const cardMap = new Map<FileSlot, HTMLElement>();
const resultList = document.createElement("ul");
@@ -441,6 +445,14 @@ export async function renderB03FileInput(root: HTMLElement): Promise<void> {
if (status.status === "completed") {
return true;
}
if (
status.current_stage === "awaiting_confirmation" &&
status.message.includes("자동 확정 보류")
) {
pageError.textContent = status.message;
showToast(status.message, "warning");
return false;
}
} catch {}
await new Promise((resolve) => setTimeout(resolve, 5000));
}
@@ -468,7 +480,7 @@ export async function renderB03FileInput(root: HTMLElement): Promise<void> {
const analysisComplete = await pollWF1Analysis(activeProjectId);
if (analysisComplete) {
navigateTo(ROUTES.B04_WF1_SURFACE);
navigateTo(completionRoute);
} else {
showToast(L("B03_File_Analysis_StillRunning"), "warning");
}
@@ -576,7 +588,7 @@ export async function renderB03FileInput(root: HTMLElement): Promise<void> {
label: L("B03_File_Restore_State"),
container: resumeBanner,
poll: pollWF1Analysis,
onComplete: () => navigateTo(ROUTES.B04_WF1_SURFACE),
onComplete: () => navigateTo(completionRoute),
});
}
}