diff --git a/convertPheno_client/cypress/e2e/home.spec.js b/convertPheno_client/cypress/e2e/home.spec.js
index 9c85a196..1c09b472 100644
--- a/convertPheno_client/cypress/e2e/home.spec.js
+++ b/convertPheno_client/cypress/e2e/home.spec.js
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/getKCTokens.sh b/convertPheno_client/getKCTokens.sh
index 74b4b5da..7be37666 100644
--- a/convertPheno_client/getKCTokens.sh
+++ b/convertPheno_client/getKCTokens.sh
@@ -6,7 +6,7 @@
#
# Last Modified: Apr/28/2023
#
-# Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+# Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
#
# License: GPL-3.0 license
diff --git a/convertPheno_client/replace_env_vars.sh b/convertPheno_client/replace_env_vars.sh
index 96d3c6e8..ad83936f 100755
--- a/convertPheno_client/replace_env_vars.sh
+++ b/convertPheno_client/replace_env_vars.sh
@@ -6,7 +6,7 @@
#
# Last Modified: Apr/28/2023
#
-# Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+# Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
#
# License: GPL-3.0 license
diff --git a/convertPheno_client/src/code/App.jsx b/convertPheno_client/src/code/App.jsx
index 1839024a..01d975c6 100644
--- a/convertPheno_client/src/code/App.jsx
+++ b/convertPheno_client/src/code/App.jsx
@@ -5,13 +5,19 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
import React, { useEffect, useContext, useMemo, useState } from "react";
-import { Navigate, Route, Routes, useNavigate, useParams } from "react-router-dom";
+import {
+ Navigate,
+ Route,
+ Routes,
+ useNavigate,
+ useParams,
+} from "react-router-dom";
import { ErrorBoundary } from "react-error-boundary";
import { Box, Grid } from "@mui/material";
import { useTheme, ThemeProvider, createTheme } from "@mui/material/styles";
@@ -99,7 +105,7 @@ function renderRoutes() {
));
}
-function AuthenticatedRoute ({ element: Component, path, security }) {
+function AuthenticatedRoute({ element: Component, path, security }) {
const navigate = useNavigate();
const isAuthenticated = security === "false" || auth.user.authenticated;
const params = useParams();
@@ -107,14 +113,14 @@ function AuthenticatedRoute ({ element: Component, path, security }) {
useEffect(() => {
if (!isAuthenticated) {
if ("jobId" in params) {
- path = `${ path }/${ params.jobId }`;
+ path = `${path}/${params.jobId}`;
}
navigate("/login", { state: { redirect: path } });
}
}, [auth.user.authenticated, navigate]);
return isAuthenticated ? : null;
-};
+}
function App() {
const theme = useTheme();
diff --git a/convertPheno_client/src/code/Auth.js b/convertPheno_client/src/code/Auth.js
index d7b8ce2c..6be445e2 100644
--- a/convertPheno_client/src/code/Auth.js
+++ b/convertPheno_client/src/code/Auth.js
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/Login.jsx b/convertPheno_client/src/code/Login.jsx
index 3c7bd8f1..97cb1307 100644
--- a/convertPheno_client/src/code/Login.jsx
+++ b/convertPheno_client/src/code/Login.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
@@ -20,7 +20,7 @@ import Home from "./views/home/Home";
const kcConfig =
process.env.NODE_ENV === "production"
- ? JSON.parse(window.REACT_APP_KC_CONFIG.replace(/'/g, "\""))
+ ? JSON.parse(window.REACT_APP_KC_CONFIG.replace(/'/g, '"'))
: JSON.parse(import.meta.env.VITE_KC_CONFIG);
const keycloakConfig = {
diff --git a/convertPheno_client/src/code/Main.jsx b/convertPheno_client/src/code/Main.jsx
index 2ffa3f36..999de744 100644
--- a/convertPheno_client/src/code/Main.jsx
+++ b/convertPheno_client/src/code/Main.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/apis.js b/convertPheno_client/src/code/apis.js
index 21ebdab9..b17924cf 100644
--- a/convertPheno_client/src/code/apis.js
+++ b/convertPheno_client/src/code/apis.js
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/header/Header.jsx b/convertPheno_client/src/code/header/Header.jsx
index 141379a8..b326a08a 100644
--- a/convertPheno_client/src/code/header/Header.jsx
+++ b/convertPheno_client/src/code/header/Header.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/about/About.tsx b/convertPheno_client/src/code/views/about/About.tsx
index f18dda45..49e43d1d 100644
--- a/convertPheno_client/src/code/views/about/About.tsx
+++ b/convertPheno_client/src/code/views/about/About.tsx
@@ -5,7 +5,7 @@
Last Modified: Jun/21/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/clinicalData/ClinicalData.jsx b/convertPheno_client/src/code/views/conversion/ components/clinicalData/ClinicalData.jsx
index 80147b64..46292c72 100644
--- a/convertPheno_client/src/code/views/conversion/ components/clinicalData/ClinicalData.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/clinicalData/ClinicalData.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/columnsTreeViewModal/ColumnsTreeViewModal.jsx b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/columnsTreeViewModal/ColumnsTreeViewModal.jsx
index bd2672d7..fe9f56af 100644
--- a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/columnsTreeViewModal/ColumnsTreeViewModal.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/columnsTreeViewModal/ColumnsTreeViewModal.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/dataGrid/CopyOnClick.jsx b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/dataGrid/CopyOnClick.jsx
index 77568f21..0984a183 100644
--- a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/dataGrid/CopyOnClick.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/dataGrid/CopyOnClick.jsx
@@ -5,13 +5,14 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
import React, { useState, useRef } from "react";
import { Button, Popover, Tooltip, Typography } from "@mui/material";
+import ValueWithTooltip from "./ValueWithTooltip";
const UnstyledButton = ({ onClick, children }) => {
return (
@@ -84,62 +85,6 @@ const getValue = (props) => {
);
};
-const ValueWithTooltip = ({ value, ontology_id, url }) => {
- const [isTooltipOpen, setIsTooltipOpen] = useState(false);
- const tooltipTimeout = useRef({ current: null });
-
- console.log("value", value);
- console.log("ontology_id", ontology_id);
- console.log("url", url);
-
- const handleMouseOver = (value) => {
- if (value === "NA") {
- return;
- }
- setIsTooltipOpen(true);
- clearTimeout(tooltipTimeout.current);
- };
-
- const handleMouseOut = () => {
- tooltipTimeout.current = setTimeout(() => {
- setIsTooltipOpen(false);
- }, 1000);
- };
-
- const handleLinkClick = () => {
- clearTimeout(tooltipTimeout.current);
- window.open(url, "_blank");
- };
-
- return (
-
- Click to open{" "}
-
- {ontology_id}
-
-
- }
- placement="bottom"
- >
- handleMouseOver(value)}
- onMouseOut={handleMouseOut}
- style={{ marginRight: "5px", cursor: "pointer" }}
- >
- {value}
-
-
- );
-};
-
const PopoverButton = ({
children,
onClick,
diff --git a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/dataGrid/DataGrid.jsx b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/dataGrid/DataGrid.jsx
index 262e472c..ac221b1a 100644
--- a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/dataGrid/DataGrid.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/dataGrid/DataGrid.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/dataGrid/ValueWithTooltip.jsx b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/dataGrid/ValueWithTooltip.jsx
new file mode 100644
index 00000000..a489dd44
--- /dev/null
+++ b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/dataGrid/ValueWithTooltip.jsx
@@ -0,0 +1,68 @@
+/**
+ renders the value of a cell in the data grid with a tooltip that shows the ontology id and a link to the ontology term
+
+ This file is part of convert-pheno-ui
+
+ Last Modified: Sep/1/2023
+
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
+
+ License: GPL-3.0 license
+*/
+
+import React, { useState, useRef } from "react";
+import { Tooltip } from "@mui/material";
+
+export default function ValueWithTooltip(props) {
+ const { value, ontology_id, url } = props;
+
+ const [isTooltipOpen, setIsTooltipOpen] = useState(false);
+ const tooltipTimeout = useRef({ current: null });
+
+ const handleMouseOver = (value) => {
+ if (value === "NA") {
+ return;
+ }
+ setIsTooltipOpen(true);
+ clearTimeout(tooltipTimeout.current);
+ };
+
+ const handleMouseOut = () => {
+ tooltipTimeout.current = setTimeout(() => {
+ setIsTooltipOpen(false);
+ }, 1000);
+ };
+
+ const handleLinkClick = () => {
+ clearTimeout(tooltipTimeout.current);
+ window.open(url, "_blank");
+ };
+
+ return (
+
+ Click to open{" "}
+
+ {ontology_id}
+
+
+ }
+ placement="bottom"
+ >
+ handleMouseOver(value)}
+ onMouseOut={handleMouseOut}
+ style={{ marginRight: "5px", cursor: "pointer" }}
+ >
+ {value}
+
+
+ );
+}
diff --git a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/QueryBuilder.jsx b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/QueryBuilder.jsx
index 62ead694..106129f4 100644
--- a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/QueryBuilder.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/QueryBuilder.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/components/DndBox.jsx b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/components/DndBox.jsx
index 89fe16f4..cb7b5af4 100644
--- a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/components/DndBox.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/components/DndBox.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/components/DndTarget.jsx b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/components/DndTarget.jsx
index e341761b..c43ea8c5 100644
--- a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/components/DndTarget.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/components/DndTarget.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/hooks/useQueryBuilder.jsx b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/hooks/useQueryBuilder.jsx
index 732dbe63..a21445f8 100644
--- a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/hooks/useQueryBuilder.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/queryBuilder/hooks/useQueryBuilder.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/simpleTabs/SimpleTabs.jsx b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/simpleTabs/SimpleTabs.jsx
index 4ad35829..3162e80b 100644
--- a/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/simpleTabs/SimpleTabs.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/clinicalData/components/simpleTabs/SimpleTabs.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/clinicalData/hooks/queryDb.jsx b/convertPheno_client/src/code/views/conversion/ components/clinicalData/hooks/queryDb.jsx
index f9f792b3..53c64a17 100644
--- a/convertPheno_client/src/code/views/conversion/ components/clinicalData/hooks/queryDb.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/clinicalData/hooks/queryDb.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/Submission.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/Submission.jsx
index 738cfab2..88c16fd2 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/Submission.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/Submission.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/arrows/Arrows.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/arrows/Arrows.jsx
index c8711847..93375b06 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/arrows/Arrows.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/arrows/Arrows.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/fileMappingModal/FileMappingModal.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/fileMappingModal/FileMappingModal.jsx
index 21508dfa..0aeb6b36 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/fileMappingModal/FileMappingModal.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/fileMappingModal/FileMappingModal.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/loadingBackdrop/LoadingBackdrop.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/loadingBackdrop/LoadingBackdrop.jsx
index 38cb230f..465c815b 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/loadingBackdrop/LoadingBackdrop.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/loadingBackdrop/LoadingBackdrop.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/outputFormatsSelection/OutputFormatsSelection.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/outputFormatsSelection/OutputFormatsSelection.jsx
index c4b93fec..b98590ad 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/outputFormatsSelection/OutputFormatsSelection.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/outputFormatsSelection/OutputFormatsSelection.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/SubmissionForms.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/SubmissionForms.jsx
index 342716fd..185e37cc 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/SubmissionForms.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/SubmissionForms.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/arrows/Arrows.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/arrows/Arrows.jsx
index ea0e0c01..e8870060 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/arrows/Arrows.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/arrows/Arrows.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileMappingModal/FileMappingModal.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileMappingModal/FileMappingModal.jsx
index 6440ac69..eae392ab 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileMappingModal/FileMappingModal.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileMappingModal/FileMappingModal.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileUpload/FileUpload.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileUpload/FileUpload.jsx
index f6414a05..e010846a 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileUpload/FileUpload.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileUpload/FileUpload.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileUpload/components/inputFilesPond/InputFilesPond.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileUpload/components/inputFilesPond/InputFilesPond.jsx
index 957b76a2..3aeb558b 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileUpload/components/inputFilesPond/InputFilesPond.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileUpload/components/inputFilesPond/InputFilesPond.jsx
@@ -5,15 +5,14 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
import React, { useState } from "react";
import auth from "../../../../../../../../../../Auth";
-import
-{
+import {
Button,
Grid,
Typography,
@@ -28,59 +27,55 @@ import
import InfoIcon from "@mui/icons-material/Info";
import { FilePond, registerPlugin } from "react-filepond";
import "filepond/dist/filepond.min.css";
-import FilePondPluginFileValidateType from 'filepond-plugin-file-validate-type';
-import FilePondPluginFileValidateSize from 'filepond-plugin-file-validate-size';
+import FilePondPluginFileValidateType from "filepond-plugin-file-validate-type";
+import FilePondPluginFileValidateSize from "filepond-plugin-file-validate-size";
-registerPlugin( FilePondPluginFileValidateType );
-registerPlugin( FilePondPluginFileValidateSize );
+registerPlugin(FilePondPluginFileValidateType);
+registerPlugin(FilePondPluginFileValidateSize);
const api_endpoint =
process.env.NODE_ENV === "production"
? window.REACT_APP_API_URL
: import.meta.env.VITE_API_URL;
-function CustomAlert ( props )
-{
+function CustomAlert(props) {
const { info } = props;
- const [ open, setOpen ] = useState( false );
+ const [open, setOpen] = useState(false);
- const handleClick = () =>
- {
- setOpen( true );
+ const handleClick = () => {
+ setOpen(true);
};
- const handleClose = () =>
- {
- setOpen( false );
+ const handleClose = () => {
+ setOpen(false);
};
return (
-
+
-
);
}
-export default function InputFilesPond ( props )
-{
+export default function InputFilesPond(props) {
const {
setUploadedFiles,
setFilesUploadFinished,
@@ -88,10 +83,9 @@ export default function InputFilesPond ( props )
inputFormat,
} = props;
- const [ files, setFiles ] = useState( [] );
+ const [files, setFiles] = useState([]);
- const handleFileUploadFinished = ( _, file ) =>
- {
+ const handleFileUploadFinished = (_, file) => {
/*
handleFileUploadFinished function
@@ -105,45 +99,40 @@ export default function InputFilesPond ( props )
Purpose:
- To update the state uploadedFiles with the file that was uploaded
*/
- const returnedFileName = JSON.parse( file.serverId ).tempFilename;
+ const returnedFileName = JSON.parse(file.serverId).tempFilename;
const fileName = file.filename;
- const extension = fileName.split( "." ).pop();
+ const extension = fileName.split(".").pop();
let fileType = "input-file";
- if ( fileName.includes( "dictionary" ) && extension === "csv" )
- {
+ if (fileName.includes("dictionary") && extension === "csv") {
fileType = "redcap-dictionary";
} else if (
- fileName.includes( "mapping" ) &&
- [ "yaml", "yml", "json" ].includes( extension )
- )
- {
+ fileName.includes("mapping") &&
+ ["yaml", "yml", "json"].includes(extension)
+ ) {
fileType = "mapping-file";
}
- setUploadedFiles( ( prev ) =>
- {
+ setUploadedFiles((prev) => {
return {
...prev,
- [ fileName ]: [ fileType, returnedFileName ],
+ [fileName]: [fileType, returnedFileName],
};
- } );
+ });
};
- const handleAllFilesUploadFinished = () =>
- {
- setFilesUploadFinished( true );
+ const handleAllFilesUploadFinished = () => {
+ setFilesUploadFinished(true);
};
- const getFileUploadInfo = ( inputFormat ) =>
- {
+ const getFileUploadInfo = (inputFormat) => {
// better get that config from a config file
const fileTypeToExpected = {
redcap: {
fileCount: 3,
- files: [ "Input", "Dictionary", "Mapping" ],
- fileExtensions: [ "csv", "tsv", "txt" ],
+ files: ["Input", "Dictionary", "Mapping"],
+ fileExtensions: ["csv", "tsv", "txt"],
info: [
"The input-file & dictionary can be a .csv, .tsv or .txt",
"Make sure that the input and the dictionary have the same separator",
@@ -152,32 +141,32 @@ export default function InputFilesPond ( props )
},
bff: {
fileCount: 1,
- files: [ "Input-file" ],
- fileExtensions: [ "json" ],
- info: [ "input has to be a .json" ],
+ files: ["Input-file"],
+ fileExtensions: ["json"],
+ info: ["input has to be a .json"],
},
omop: {
fileCount: 1,
- files: [ "Input-file" ],
- fileExtensions: [ "sql", "sql.gz" ],
- info: [ "input has to be a .sql or sql.gz" ],
+ files: ["Input-file"],
+ fileExtensions: ["sql", "sql.gz"],
+ info: ["input has to be a .sql or sql.gz"],
},
};
fileTypeToExpected.cdisc = fileTypeToExpected.redcap;
fileTypeToExpected.pxf = fileTypeToExpected.bff;
- const text = [ fileTypeToExpected[ inputFormat ].info.join( ", " ) ];
+ const text = [fileTypeToExpected[inputFormat].info.join(", ")];
- fileTypeToExpected[ inputFormat ].infoText = text;
- fileTypeToExpected[ inputFormat ].label = [
+ fileTypeToExpected[inputFormat].infoText = text;
+ fileTypeToExpected[inputFormat].label = [
"Drag/Drop or Browse:
",
- `${ fileTypeToExpected[ inputFormat ].files.join( " & " ) }`,
+ `${fileTypeToExpected[inputFormat].files.join(" & ")}`,
];
- return fileTypeToExpected[ inputFormat ];
+ return fileTypeToExpected[inputFormat];
};
const serverConfig = {
- url: `${ api_endpoint }api/submission/upload`,
+ url: `${api_endpoint}api/submission/upload`,
process: {
headers: { Authorization: auth.getToken() },
},
@@ -188,47 +177,44 @@ export default function InputFilesPond ( props )
return (
<>
- {/* info icon clickable */ }
+ {/* info icon clickable */}
-
+
- {
- setRunExampleData( false );
- } }
- onprocessfile={ handleFileUploadFinished }
- onprocessfiles={ handleAllFilesUploadFinished }
- onremovefile={ ( _, file ) =>
- {
- setFilesUploadFinished( false );
+ labelIdle={getFileUploadInfo(inputFormat).label.join("")}
+ onaddfile={() => {
+ setRunExampleData(false);
+ }}
+ onprocessfile={handleFileUploadFinished}
+ onprocessfiles={handleAllFilesUploadFinished}
+ onremovefile={(_, file) => {
+ setFilesUploadFinished(false);
// TODO
// remove file from list of uploaded files
// setSelectedFile(null);
- } }
-
+ }}
// option provided by plugins
// better hand this over as a prop
- acceptedFileTypes={
- [
- "text/csv",
- "text/tsv",
- "text/plain",
- "application/json",
- "application/sql",
- "application/x-sql",
- "application/x-yaml"
- ] }
+ acceptedFileTypes={[
+ "text/csv",
+ "text/tsv",
+ "text/plain",
+ "application/json",
+ "application/sql",
+ "application/x-sql",
+ "application/x-yaml",
+ ]}
// better hand this over as a prop
- fileValidateTypeLabelExpectedTypes={ "Expect .txt, .c/tsv, .y(a)ml, .json" }
-
+ fileValidateTypeLabelExpectedTypes={
+ "Expect .txt, .c/tsv, .y(a)ml, .json"
+ }
// fileValidateTypeDetectType={ ( source, type ) =>
// {
// console.log( source, type );
@@ -243,8 +229,8 @@ export default function InputFilesPond ( props )
labelMaxFileSize="Maximum file size is 1GB"
/>
-
-
+
+
>
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileUpload/components/inputFormatSelection/InputFormatSelection.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileUpload/components/inputFormatSelection/InputFormatSelection.jsx
index a02647c4..5ac3a0ea 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileUpload/components/inputFormatSelection/InputFormatSelection.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/fileUpload/components/inputFormatSelection/InputFormatSelection.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/loadingBackdrop/LoadingBackdrop.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/loadingBackdrop/LoadingBackdrop.jsx
index d142ee85..79fb7ed4 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/loadingBackdrop/LoadingBackdrop.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/loadingBackdrop/LoadingBackdrop.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/outputFormatsSelection/OutputFormatsSelection.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/outputFormatsSelection/OutputFormatsSelection.jsx
index 7e708e2e..671e02fb 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/outputFormatsSelection/OutputFormatsSelection.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionForms/components/outputFormatsSelection/OutputFormatsSelection.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/SubmissionSummary.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/SubmissionSummary.jsx
index f6f55e71..1cfb963a 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/SubmissionSummary.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/SubmissionSummary.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/downloadButtons/DownloadButtons.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/downloadButtons/DownloadButtons.jsx
index 7d708b34..3b077536 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/downloadButtons/DownloadButtons.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/downloadButtons/DownloadButtons.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/inputSummary/InputSummary.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/inputSummary/InputSummary.jsx
index a25de2c1..4357604e 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/inputSummary/InputSummary.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/inputSummary/InputSummary.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/outputSummary/OutputSummary.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/outputSummary/OutputSummary.jsx
index 0a89cd02..f524d7c6 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/outputSummary/OutputSummary.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/outputSummary/OutputSummary.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/triggerNewSubmissionButton/TriggerNewSubmissionButton.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/triggerNewSubmissionButton/TriggerNewSubmissionButton.jsx
index dc2ed540..53f12a0d 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/triggerNewSubmissionButton/TriggerNewSubmissionButton.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/components/submissionSummary/components/triggerNewSubmissionButton/TriggerNewSubmissionButton.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/ components/submission/hooks/fileConversions.jsx b/convertPheno_client/src/code/views/conversion/ components/submission/hooks/fileConversions.jsx
index e1b364fd..d413fb79 100644
--- a/convertPheno_client/src/code/views/conversion/ components/submission/hooks/fileConversions.jsx
+++ b/convertPheno_client/src/code/views/conversion/ components/submission/hooks/fileConversions.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/Conversion.jsx b/convertPheno_client/src/code/views/conversion/Conversion.jsx
index 72d05d71..dc8994df 100644
--- a/convertPheno_client/src/code/views/conversion/Conversion.jsx
+++ b/convertPheno_client/src/code/views/conversion/Conversion.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/conversion/hooks/finishedJobs.jsx b/convertPheno_client/src/code/views/conversion/hooks/finishedJobs.jsx
index d634ae89..2af5126b 100644
--- a/convertPheno_client/src/code/views/conversion/hooks/finishedJobs.jsx
+++ b/convertPheno_client/src/code/views/conversion/hooks/finishedJobs.jsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/home/Home.stories.tsx b/convertPheno_client/src/code/views/home/Home.stories.tsx
index 9fae8eb9..36aa5bb6 100644
--- a/convertPheno_client/src/code/views/home/Home.stories.tsx
+++ b/convertPheno_client/src/code/views/home/Home.stories.tsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
diff --git a/convertPheno_client/src/code/views/home/Home.tsx b/convertPheno_client/src/code/views/home/Home.tsx
index 6ccd9ec5..0954cca3 100644
--- a/convertPheno_client/src/code/views/home/Home.tsx
+++ b/convertPheno_client/src/code/views/home/Home.tsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/
@@ -66,11 +66,11 @@ const InfoBox = ({ label, value }) => {
>
{label}:
-
+
{value}
@@ -131,20 +131,15 @@ export default function Home() {
variant="contained"
sx={buttonStyle}
onClick={() => auth.user.keycloak.logout()}
- >
+ >
>
- ):(
+ ) : (
<>
-
+
-
diff --git a/convertPheno_client/src/main.tsx b/convertPheno_client/src/main.tsx
index f59b98e5..c41565ea 100644
--- a/convertPheno_client/src/main.tsx
+++ b/convertPheno_client/src/main.tsx
@@ -5,7 +5,7 @@
Last Modified: Apr/28/2023
- Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.crg.eu)
+ Copyright (C) 2022-2023 Ivo Christopher Leist - CNAG (Ivo.leist@cnag.eu)
License: GPL-3.0 license
*/