This commit is contained in:
2026-07-10 18:12:17 +09:00
parent 50d75fcfcd
commit e3d66e717c
28 changed files with 2542 additions and 99 deletions
+8 -4
View File
@@ -1,4 +1,4 @@
import { ROUTES } from "@config/config_frontend";
import { CURRENT_PROJECT_ID_KEY, ROUTES, type RoutePath } from "@config/config_frontend";
import { isBlank } from "@util/common_util_validate";
import { navigateTo } from "../A00_Common/router";
import { ui_locales, currentLanguageIndex } from "@ui/ui_template_locale";
@@ -359,7 +359,7 @@ function projectTable(projects: ProjectItem[], currentUser: DashboardUser): HTML
text(project.name),
text(project.region),
text(`${project.progress_percent}%`),
workflow(project.workflow_stage),
workflow(project),
text(formatDate(project.updated_at)),
actCell,
];
@@ -367,7 +367,8 @@ function projectTable(projects: ProjectItem[], currentUser: DashboardUser): HTML
);
}
function workflow(activeStage: number): HTMLElement {
function workflow(project: ProjectItem): HTMLElement {
const activeStage = project.workflow_stage;
const routes: RoutePath[] = [
ROUTES.B03_FILE_INPUT,
ROUTES.B04_WF1_SURFACE,
@@ -388,7 +389,10 @@ function workflow(activeStage: number): HTMLElement {
button.disabled = !enabled;
if (enabled) {
button.classList.add("is-enabled");
button.addEventListener("click", () => navigateTo(route));
button.addEventListener("click", () => {
localStorage.setItem(CURRENT_PROJECT_ID_KEY, project.id);
navigateTo(route);
});
}
box.append(button);
});