From b0055727bf68fc486648fd076c2b2d29f8ca27bc Mon Sep 17 00:00:00 2001 From: Alejandro-Vega Date: Thu, 22 Feb 2024 12:07:25 -0500 Subject: [PATCH 01/10] Updated Clinical Trial label, removed immunology and epidemiologic switches in Section D --- src/config/DataTypesConfig.ts | 2 +- src/content/questionnaire/sections/D.tsx | 20 +------------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/config/DataTypesConfig.ts b/src/config/DataTypesConfig.ts index 404f0ec9..80a723f2 100644 --- a/src/config/DataTypesConfig.ts +++ b/src/config/DataTypesConfig.ts @@ -5,7 +5,7 @@ const DataTypes = { clinicalTrial: { name: "clinicalTrial", - label: "Clinical Trial" + label: "Clinical" }, immunology: { name: "immunology", diff --git a/src/content/questionnaire/sections/D.tsx b/src/content/questionnaire/sections/D.tsx index b0f6ec57..d0b8fcaf 100644 --- a/src/content/questionnaire/sections/D.tsx +++ b/src/content/questionnaire/sections/D.tsx @@ -263,22 +263,13 @@ const FormSectionD: FC = ({ SectionOption, refs }: FormSection - = ({ SectionOption, refs }: FormSection readOnly={readOnlyInputs} sx={{ paddingBottom: "8px" }} /> - Date: Thu, 22 Feb 2024 12:07:53 -0500 Subject: [PATCH 02/10] Removed properties from Review section as well --- src/content/questionnaire/sections/Review.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/content/questionnaire/sections/Review.tsx b/src/content/questionnaire/sections/Review.tsx index 31d12fe5..78cd6e05 100644 --- a/src/content/questionnaire/sections/Review.tsx +++ b/src/content/questionnaire/sections/Review.tsx @@ -312,11 +312,9 @@ const FormSectionReview: FC = ({ description={SectionMetadata.D.sections.DATA_TYPES.description} > - - + - {data.dataTypes?.includes(DataTypes.imaging.name) && data.imagingDataDeIdentified !== null && ( )} From eeb5d2f500bcee3af3daa6d4335097eeeb8e8c64 Mon Sep 17 00:00:00 2001 From: Alejandro-Vega Date: Thu, 29 Feb 2024 12:39:43 -0500 Subject: [PATCH 03/10] Removed Data Types from Section B Repository as well --- src/components/Questionnaire/Repository.tsx | 2 -- src/config/DataTypesConfig.ts | 8 -------- 2 files changed, 10 deletions(-) diff --git a/src/components/Questionnaire/Repository.tsx b/src/components/Questionnaire/Repository.tsx index 7a8d5395..55ad6c3b 100644 --- a/src/components/Questionnaire/Repository.tsx +++ b/src/components/Questionnaire/Repository.tsx @@ -17,9 +17,7 @@ export const repositoryDataTypesOptions = [ DataTypes.clinicalTrial, DataTypes.genomics, DataTypes.imaging, - DataTypes.immunology, DataTypes.proteomics, - DataTypes.epidemiologicOrCohort, ]; type Props = { diff --git a/src/config/DataTypesConfig.ts b/src/config/DataTypesConfig.ts index 80a723f2..9299ad44 100644 --- a/src/config/DataTypesConfig.ts +++ b/src/config/DataTypesConfig.ts @@ -7,10 +7,6 @@ const DataTypes = { name: "clinicalTrial", label: "Clinical" }, - immunology: { - name: "immunology", - label: "Immunology" - }, genomics: { name: "genomics", label: "Genomics" @@ -23,10 +19,6 @@ const DataTypes = { name: "imaging", label: "Imaging" }, - epidemiologicOrCohort: { - name: "epidemiologicOrCohort", - label: "Epidemiologic or Cohort" - }, demographicData: { name: "demographicData", label: "Demographic Data" From 8f0c9a863f42685086759dc67b721b6071e20917 Mon Sep 17 00:00:00 2001 From: Alejandro-Vega Date: Thu, 29 Feb 2024 12:39:57 -0500 Subject: [PATCH 04/10] Tooltip text updates --- src/content/questionnaire/sections/B.tsx | 14 ++------------ src/content/questionnaire/sections/D.tsx | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/content/questionnaire/sections/B.tsx b/src/content/questionnaire/sections/B.tsx index 7f7a67af..98541d00 100644 --- a/src/content/questionnaire/sections/B.tsx +++ b/src/content/questionnaire/sections/B.tsx @@ -364,7 +364,7 @@ const FormSectionB: FC = ({ SectionOption, refs }: FormSection placeholder="100 characters allowed" readOnly={readOnlyInputs} hideValidation={readOnlyInputs} - tooltipText="The title should provide a snapshot of the study; it should include a broad goal or conclusion of the project. It must use title case. For example, the manuscript title." + tooltipText="A descriptive name that will be used to identify the study." required /> = ({ SectionOption, refs }: FormSection hideValidation={readOnlyInputs} required multiline - tooltipText={( - <> - Describe your study and the data being submitted. Include objectives of the study and convey information about the experimental approach. -
-
- Provide a brief description of the scientific value of the data for submission. For example, how can other researchers benefit from the value of these data. -
-
- If the description is taken verbatim from a published or soon to be published article, please submit copyright permission from the Journal. Summaries with copyrighted material must include the following within the description: “Reprinted from [Article Citation], with permission from [Publisher]." - - )} + tooltipText="Describe your study and the data being submitted. Include objectives of the study and provide a brief description of the scientific value of the study." /> diff --git a/src/content/questionnaire/sections/D.tsx b/src/content/questionnaire/sections/D.tsx index d0b8fcaf..51ecb83a 100644 --- a/src/content/questionnaire/sections/D.tsx +++ b/src/content/questionnaire/sections/D.tsx @@ -246,7 +246,7 @@ const FormSectionD: FC = ({ SectionOption, refs }: FormSection inputID="section-d-expected-publication-date" label="Expected Publication Date" name="targetedReleaseDate" - tooltipText="The date that submitters would like their data to be released to the public." + tooltipText="The date that submitters expect any paper using this data will be published." initialValue={data.targetedReleaseDate} gridWidth={6} disablePast From 63b52467ff2d7803204455b215646ff10f72de70 Mon Sep 17 00:00:00 2001 From: Alejandro-Vega Date: Thu, 29 Feb 2024 17:08:06 -0500 Subject: [PATCH 05/10] Only show Clinical Data Types section if clinical data type toggle is enabled --- src/content/questionnaire/sections/D.tsx | 174 ++++++++++++----------- 1 file changed, 92 insertions(+), 82 deletions(-) diff --git a/src/content/questionnaire/sections/D.tsx b/src/content/questionnaire/sections/D.tsx index 51ecb83a..779b4342 100644 --- a/src/content/questionnaire/sections/D.tsx +++ b/src/content/questionnaire/sections/D.tsx @@ -29,6 +29,7 @@ import DatePickerInput from "../../../components/Questionnaire/DatePickerInput"; import RadioYesNoInput from "../../../components/Questionnaire/RadioYesNoInput"; import useFormMode from "../../../hooks/useFormMode"; import SectionMetadata from "../../../config/SectionMetadata"; +import { InitialQuestionnaire } from "../../../config/InitialValues"; export type KeyedFileTypeData = { key: string; @@ -144,6 +145,7 @@ const FormSectionD: FC = ({ SectionOption, refs }: FormSection const { D: SectionDMetadata } = SectionMetadata; const [dataTypes, setDataTypes] = useState(data.dataTypes); + const [isClinical, setIsClinical] = useState(dataTypes?.includes("clinicalTrial")); const formContainerRef = useRef(); const formRef = useRef(); const [dataTypesErrorMsg, setDataTypesErrorMsg] = useState(""); @@ -183,7 +185,12 @@ const FormSectionD: FC = ({ SectionOption, refs }: FormSection dataTypesInputRef.current.setCustomValidity("At least one data type is required"); } - combinedData.clinicalData.dataTypes = combinedData.clinicalData.dataTypes.filter((str) => str !== ""); + if (!combinedData.dataTypes.includes("clinicalTrial")) { + combinedData.clinicalData = InitialQuestionnaire.clinicalData; + } else { + combinedData.clinicalData.dataTypes = combinedData.clinicalData.dataTypes.filter((str) => str !== ""); + } + combinedData.targetedReleaseDate = dayjs(formObject.targetedReleaseDate).isValid() ? formObject.targetedReleaseDate : ""; combinedData.targetedSubmissionDate = dayjs(formObject.targetedSubmissionDate).isValid() ? formObject.targetedSubmissionDate : ""; if (formObject.imagingDataDeIdentified === "true") { @@ -267,6 +274,7 @@ const FormSectionD: FC = ({ SectionOption, refs }: FormSection name="dataTypes[]" graphQLValue="clinicalTrial" value={dataTypes.includes("clinicalTrial")} + onChange={(e, val) => setIsClinical(val)} tooltipText="A research study in which one or more subjects are prospectively assigned to one or more interventions (which may include placebo or other control) to evaluate the effects of those interventions on health-related biomedical outcomes." readOnly={readOnlyInputs} /> @@ -326,87 +334,89 @@ const FormSectionD: FC = ({ SectionOption, refs }: FormSection {/* Clinical Data Types Section */} - - - - - - - - - - + {isClinical && ( + + + + + + + + + + + )} {/* File Types Section */} Date: Thu, 29 Feb 2024 17:45:47 -0500 Subject: [PATCH 06/10] Fixed Review page bug not correctly checking the right list for clinical data types --- src/content/questionnaire/sections/Review.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/questionnaire/sections/Review.tsx b/src/content/questionnaire/sections/Review.tsx index 78cd6e05..8c3d99b5 100644 --- a/src/content/questionnaire/sections/Review.tsx +++ b/src/content/questionnaire/sections/Review.tsx @@ -326,12 +326,12 @@ const FormSectionReview: FC = ({ title={SectionMetadata.D.sections.CLINICAL_DATA_TYPES.title} description={SectionMetadata.D.sections.CLINICAL_DATA_TYPES.description} > - - - - - - + + + + + + From c6085f646714d0274f8e8fff73f63a35162bb9ad Mon Sep 17 00:00:00 2001 From: Alejandro-Vega Date: Fri, 1 Mar 2024 16:10:07 -0500 Subject: [PATCH 07/10] Section B input text, placeholder, and max length changes --- src/components/Questionnaire/PlannedPublication.tsx | 4 ++-- src/components/Questionnaire/Publication.tsx | 4 ++-- src/content/questionnaire/sections/B.tsx | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/Questionnaire/PlannedPublication.tsx b/src/components/Questionnaire/PlannedPublication.tsx index 79b6f293..58db1387 100644 --- a/src/components/Questionnaire/PlannedPublication.tsx +++ b/src/components/Questionnaire/PlannedPublication.tsx @@ -45,8 +45,8 @@ const PlannedPublication: FC = ({ label="Publication Title" name={`study[plannedPublications][${index}][title]`} value={title} - placeholder="Enter title" - maxLength={100} + placeholder="500 characters allowed." + maxLength={500} gridWidth={12} required readOnly={readOnly} diff --git a/src/components/Questionnaire/Publication.tsx b/src/components/Questionnaire/Publication.tsx index a7897e74..d3a76f1f 100644 --- a/src/components/Questionnaire/Publication.tsx +++ b/src/components/Questionnaire/Publication.tsx @@ -44,8 +44,8 @@ const Publication: FC = ({ label="Publication Title" name={`study[publications][${index}][title]`} value={title} - placeholder="Enter Publication Title" - maxLength={100} + placeholder="500 characters allowed." + maxLength={500} gridWidth={12} required readOnly={readOnly} diff --git a/src/content/questionnaire/sections/B.tsx b/src/content/questionnaire/sections/B.tsx index 7f7a67af..0cd6f251 100644 --- a/src/content/questionnaire/sections/B.tsx +++ b/src/content/questionnaire/sections/B.tsx @@ -304,8 +304,8 @@ const FormSectionB: FC = ({ SectionOption, refs }: FormSection value={predefinedProgram ? programOption?.abbreviation : program?.abbreviation} filter={(input: string) => filterAlphaNumeric(input, "- ")} onChange={(e) => { e.target.value = e.target.value.toUpperCase(); }} - maxLength={20} - placeholder="20 characters allowed" + maxLength={100} + placeholder="100 characters allowed" hideValidation={readOnlyProgram} required readOnly={readOnlyProgram} @@ -454,12 +454,12 @@ const FormSectionB: FC = ({ SectionOption, refs }: FormSection /> setDbGaPPPHSNumber(e.target.value || "")} maxLength={50} - placeholder="50 characters allowed" + placeholder={"Ex/ \"phs002529.v1.p1\". 50 characters allowed."} gridWidth={12} readOnly={readOnlyInputs || !isDbGapRegistered} required={isDbGapRegistered} From 2d0438755ac70495c1d62c2c5146914c8f33d9b5 Mon Sep 17 00:00:00 2001 From: Alejandro-Vega Date: Fri, 1 Mar 2024 16:10:33 -0500 Subject: [PATCH 08/10] Updated Section B Repository description --- src/config/SectionMetadata.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/SectionMetadata.tsx b/src/config/SectionMetadata.tsx index 9e3c57f7..deaaf9d8 100644 --- a/src/config/SectionMetadata.tsx +++ b/src/config/SectionMetadata.tsx @@ -61,7 +61,7 @@ const sectionMetadata = { }, REPOSITORY: { title: "REPOSITORY", - description: "Add repository if your study has submitted data to a non-CRDC repository.", + description: "Add repository if your data has been submitted to another repository", }, } }, From f91f15ed95ce4376f0ef3941362315a0345a0a7d Mon Sep 17 00:00:00 2001 From: Alejandro-Vega Date: Fri, 1 Mar 2024 16:33:38 -0500 Subject: [PATCH 09/10] Removed ending period for placeholders --- src/components/Questionnaire/PlannedPublication.tsx | 2 +- src/components/Questionnaire/Publication.tsx | 2 +- src/content/questionnaire/sections/B.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Questionnaire/PlannedPublication.tsx b/src/components/Questionnaire/PlannedPublication.tsx index 58db1387..5fa42e30 100644 --- a/src/components/Questionnaire/PlannedPublication.tsx +++ b/src/components/Questionnaire/PlannedPublication.tsx @@ -45,7 +45,7 @@ const PlannedPublication: FC = ({ label="Publication Title" name={`study[plannedPublications][${index}][title]`} value={title} - placeholder="500 characters allowed." + placeholder="500 characters allowed" maxLength={500} gridWidth={12} required diff --git a/src/components/Questionnaire/Publication.tsx b/src/components/Questionnaire/Publication.tsx index d3a76f1f..814afe1e 100644 --- a/src/components/Questionnaire/Publication.tsx +++ b/src/components/Questionnaire/Publication.tsx @@ -44,7 +44,7 @@ const Publication: FC = ({ label="Publication Title" name={`study[publications][${index}][title]`} value={title} - placeholder="500 characters allowed." + placeholder="500 characters allowed" maxLength={500} gridWidth={12} required diff --git a/src/content/questionnaire/sections/B.tsx b/src/content/questionnaire/sections/B.tsx index 0cd6f251..f9434488 100644 --- a/src/content/questionnaire/sections/B.tsx +++ b/src/content/questionnaire/sections/B.tsx @@ -459,7 +459,7 @@ const FormSectionB: FC = ({ SectionOption, refs }: FormSection value={dbGaPPPHSNumber} onChange={(e) => setDbGaPPPHSNumber(e.target.value || "")} maxLength={50} - placeholder={"Ex/ \"phs002529.v1.p1\". 50 characters allowed."} + placeholder={"Ex/ \"phs002529.v1.p1\". 50 characters allowed"} gridWidth={12} readOnly={readOnlyInputs || !isDbGapRegistered} required={isDbGapRegistered} From 145df97cb2f000ffafad9106ad7c2f5aa5efc2ff Mon Sep 17 00:00:00 2001 From: Alejandro-Vega Date: Fri, 1 Mar 2024 16:42:38 -0500 Subject: [PATCH 10/10] Fixed alignment of tabs --- src/content/dataSubmissions/DataSubmission.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/content/dataSubmissions/DataSubmission.tsx b/src/content/dataSubmissions/DataSubmission.tsx index 51eb9dd5..c9a14e5c 100644 --- a/src/content/dataSubmissions/DataSubmission.tsx +++ b/src/content/dataSubmissions/DataSubmission.tsx @@ -127,20 +127,22 @@ const StyledCardActions = styled(CardActions, { })); const StyledTabs = styled(Tabs)(() => ({ - position: 'relative', + position: "relative", + display: "flex", + alignItems: "flex-end", "& .MuiTabs-flexContainer": { - justifyContent: "center" + justifyContent: "center", }, "& .MuiTabs-indicator": { - display: "none !important" + display: "none !important", }, - '&::before': { + "&::before": { content: '""', - position: 'absolute', + position: "absolute", bottom: 0, left: 0, right: 0, - borderBottom: '1.25px solid #6CACDA', + borderBottom: "1.25px solid #6CACDA", zIndex: 1, }, }));