260706_2_로그인 인증 검토

This commit is contained in:
2026-07-07 20:40:10 +09:00
parent f8633bb1fe
commit 5da0260be3
29 changed files with 720 additions and 336 deletions
+31
View File
@@ -101,6 +101,37 @@ export async function renderCurrentRoute(outlet: HTMLElement): Promise<void> {
return;
}
const workflowRoutes: readonly RoutePath[] = [
ROUTES.B02_PROJ_REGISTER,
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,
ROUTES.B10_PAYMENT,
ROUTES.B11_STATUS,
];
if (workflowRoutes.includes(route)) {
const { fetchSessionUser } = await import("../A06_Login/A06_Login_Api_Fetch");
try {
const user = await fetchSessionUser();
if (!user) {
navigateTo(ROUTES.A06_LOGIN);
return;
}
if (!user.company_id) {
navigateTo(ROUTES.B01_ACCOUNT);
return;
}
} catch {
navigateTo(ROUTES.A06_LOGIN);
return;
}
}
const loader = routeTable[route];
if (!loader) {
renderPlaceholder(outlet, route);