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 + )} +
+
+ + +