From 3f018d11008f3fb9ebf7b26f5aa03617c7d90ae4 Mon Sep 17 00:00:00 2001 From: "saito.k" Date: Tue, 10 Oct 2023 16:52:43 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=BB=E3=81=8B=E3=83=96=E3=83=A9=E3=83=B3?= =?UTF-8?q?=E3=83=81=E3=81=AE=E3=83=9E=E3=83=BC=E3=82=B8=E3=81=A7=E6=B6=88?= =?UTF-8?q?=E3=81=88=E3=81=9F=E5=AE=9F=E8=A3=85=E3=82=92=E3=82=82=E3=81=A8?= =?UTF-8?q?=E3=81=AB=E6=88=BB=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/WorkflowPage/index.tsx | 297 ++++++++++-------- 1 file changed, 164 insertions(+), 133 deletions(-) diff --git a/dictation_client/src/pages/WorkflowPage/index.tsx b/dictation_client/src/pages/WorkflowPage/index.tsx index e5b4994..0ea3e51 100644 --- a/dictation_client/src/pages/WorkflowPage/index.tsx +++ b/dictation_client/src/pages/WorkflowPage/index.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import React, { useEffect, useState } from "react"; import Header from "components/header"; import Footer from "components/footer"; import styles from "styles/app.module.scss"; @@ -14,10 +14,13 @@ import { listWorkflowAsync } from "features/workflow/operations"; import { selectIsLoading, selectWorkflows } from "features/workflow"; import progress_activit from "assets/images/progress_activit.svg"; import { getTranslationID } from "translation"; +import { AddWorkflowPopup } from "./addworkflowPopup"; const WorkflowPage: React.FC = (): JSX.Element => { const dispatch: AppDispatch = useDispatch(); const [t] = useTranslation(); + // 追加Popupの表示制御 + const [isShowAddPopup, setIsShowAddPopup] = useState(false); const workflows = useSelector(selectWorkflows); const isLoading = useSelector(selectIsLoading); @@ -25,139 +28,167 @@ const WorkflowPage: React.FC = (): JSX.Element => { dispatch(listWorkflowAsync()); }, [dispatch]); return ( -
-
- -
-
-
-

- {t(getTranslationID("workflowPage.label.title"))} -

-
-
-
- - - - - - - - - - {workflows?.map((workflow) => ( - - - - - - - - - ))} -
{/** empty th */}{t(getTranslationID("workflowPage.label.authorID"))}{t(getTranslationID("workflowPage.label.worktype"))} - {t(getTranslationID("workflowPage.label.transcriptionist"))} - {t(getTranslationID("workflowPage.label.template"))}
- - {workflow.author.authorId}{workflow.worktype?.worktypeId ?? "-"} - {workflow.typists.map((typist, i) => ( - <> - {typist.typistName} - {i !== workflow.typists.length - 1 &&
} - - ))} -
{workflow.template?.fileName ?? "-"}
- {!isLoading && - (workflows === undefined || workflows.length === 0) && ( -

- {t(getTranslationID("common.message.listEmpty"))} -

- )} - {isLoading && ( - Loading - )} + <> + {isShowAddPopup && ( + { + setIsShowAddPopup(false); + }} + /> + )} +
+
+ +
+
+
+

+ {t(getTranslationID("workflowPage.label.title"))} +

-
-
-
-
-
+
+
+ + + + + + + + + + {workflows?.map((workflow) => ( + + + + + + + + + ))} +
{/** empty th */} + {t(getTranslationID("workflowPage.label.authorID"))} + + {t(getTranslationID("workflowPage.label.worktype"))} + + {t( + getTranslationID("workflowPage.label.transcriptionist") + )} + + {t(getTranslationID("workflowPage.label.template"))} +
+ + {workflow.author.authorId}{workflow.worktype?.worktypeId ?? "-"} + {workflow.typists.map((typist, i) => ( + <> + {typist.typistName} + {i !== workflow.typists.length - 1 &&
} + + ))} +
{workflow.template?.fileName ?? "-"}
+ {!isLoading && + (workflows === undefined || workflows.length === 0) && ( +

+ {t(getTranslationID("common.message.listEmpty"))} +

+ )} + {isLoading && ( + Loading + )} +
+
+ + +