(
Return to all Submissions
-
- {description}
-
- e.preventDefault()}>
- {children}
-
+
+
+ {description}
+
+ e.preventDefault()}>
+ {children}
+
+
);
}
diff --git a/src/components/Questionnaire/ReviewDataListing.tsx b/src/components/Questionnaire/ReviewDataListing.tsx
index 22761b340..44220d7f4 100644
--- a/src/components/Questionnaire/ReviewDataListing.tsx
+++ b/src/components/Questionnaire/ReviewDataListing.tsx
@@ -34,7 +34,11 @@ const ReviewDataListing = ({ idPrefix, title, description, hideTitle, children }
)}
{description && (
-
+
{description}
)}
diff --git a/src/components/Questionnaire/ReviewFileTypeTable.tsx b/src/components/Questionnaire/ReviewFileTypeTable.tsx
index b9bf9e0a2..cc78510d3 100644
--- a/src/components/Questionnaire/ReviewFileTypeTable.tsx
+++ b/src/components/Questionnaire/ReviewFileTypeTable.tsx
@@ -77,24 +77,6 @@ const StyledTableCell = styled(TableCell)(() => ({
},
}));
-const StyledTableCellNumber = styled(TableCell)(() => ({
- "&.MuiTableCell-root": {
- height: "100%",
- color: "#346798",
- fontFamily: "'Inter'",
- fontSize: "15px",
- fontStyle: "normal",
- fontWeight: 400,
- lineHeight: "normal",
- padding: "11px 15px",
- borderBottom: "0 !important",
- borderRight: "1px solid #6B7294",
- "&:last-child": {
- borderRight: "none",
- },
- },
-}));
-
type ReviewFileTypeTableProps = {
files: FileInfo[];
};
@@ -127,15 +109,12 @@ const ReviewFileTypeTable: React.FC = ({ files }) => (
{file.extension}
-
+
{file.count}
-
-
+
+
{addSpace(file.amount)}
-
+
))}
diff --git a/src/components/UploaderToolDialog/PackageTable.tsx b/src/components/UploaderToolDialog/PackageTable.tsx
index e478aa2c4..811957387 100644
--- a/src/components/UploaderToolDialog/PackageTable.tsx
+++ b/src/components/UploaderToolDialog/PackageTable.tsx
@@ -63,6 +63,10 @@ const StyledDownload = styled(Link)({
marginRight: "8px",
});
+const StyledDownloadIcon = styled(DownloadIcon)({
+ color: "#365F71",
+});
+
const PackageTable = () => (
@@ -98,7 +102,7 @@ const PackageTable = () => (
aria-label={pkg.fileName}
data-testid={`package-table-icon-download-${pkg.fileName}`}
>
-
+
)}
diff --git a/src/content/dataSubmissions/CrossValidation.test.tsx b/src/content/dataSubmissions/CrossValidation.test.tsx
index 40a99f261..d39f79b71 100644
--- a/src/content/dataSubmissions/CrossValidation.test.tsx
+++ b/src/content/dataSubmissions/CrossValidation.test.tsx
@@ -57,6 +57,7 @@ const baseSubmission: Submission = {
crossSubmissionStatus: null,
studyID: "",
deletingData: false,
+ nodeCount: 0,
};
const baseCrossValidationResult: CrossValidationResult = {
diff --git a/src/content/dataSubmissions/DataActivity.test.tsx b/src/content/dataSubmissions/DataActivity.test.tsx
index 86d8040d0..5192aa06c 100644
--- a/src/content/dataSubmissions/DataActivity.test.tsx
+++ b/src/content/dataSubmissions/DataActivity.test.tsx
@@ -42,6 +42,7 @@ const baseSubmission: Omit = {
fileValidationStatus: "New",
studyID: "",
deletingData: false,
+ nodeCount: 0,
};
type ParentProps = {
diff --git a/src/content/dataSubmissions/DataSubmissionsListView.tsx b/src/content/dataSubmissions/DataSubmissionsListView.tsx
index 402118228..34b63396b 100644
--- a/src/content/dataSubmissions/DataSubmissionsListView.tsx
+++ b/src/content/dataSubmissions/DataSubmissionsListView.tsx
@@ -79,7 +79,7 @@ const StyledTableCell = styled(TableCell)({
fontSize: "14px",
color: "#083A50 !important",
"&.MuiTableCell-root": {
- padding: "14px 8px 12px",
+ padding: "14px 4px 12px",
overflowWrap: "anywhere",
whiteSpace: "nowrap",
},
@@ -213,6 +213,12 @@ const columns: Column[] = [
renderValue: (a) => ,
field: "conciergeName",
},
+ {
+ label: "Node Count",
+ renderValue: (a) =>
+ Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format(a.nodeCount || 0),
+ field: "nodeCount",
+ },
{
label: "Created Date",
renderValue: (a) =>
diff --git a/src/content/dataSubmissions/QualityControl.test.tsx b/src/content/dataSubmissions/QualityControl.test.tsx
index 0a352b2d0..adf4c7f09 100644
--- a/src/content/dataSubmissions/QualityControl.test.tsx
+++ b/src/content/dataSubmissions/QualityControl.test.tsx
@@ -55,6 +55,7 @@ const baseSubmission: Submission = {
crossSubmissionStatus: null,
studyID: "",
deletingData: false,
+ nodeCount: 0,
};
const baseQCResult: QCResult = {
diff --git a/src/content/questionnaire/FormView.tsx b/src/content/questionnaire/FormView.tsx
index 75741cd31..6770c708e 100644
--- a/src/content/questionnaire/FormView.tsx
+++ b/src/content/questionnaire/FormView.tsx
@@ -27,6 +27,7 @@ import PageBanner from "../../components/PageBanner";
import bannerPng from "../../assets/banner/submission_banner.png";
import { Status as AuthStatus, useAuthContext } from "../../components/Contexts/AuthContext";
import usePageTitle from "../../hooks/usePageTitle";
+import ExportRequestButton from "../../components/ExportRequestButton";
const StyledContainer = styled(Container)(() => ({
"&.MuiContainer-root": {
@@ -173,13 +174,14 @@ const FormView: FC = ({ section }: Props) => {
const hasReopenedFormRef = useRef(false);
const hasUpdatedReviewStatusRef = useRef(false);
- const refs = {
+ const refs: FormSectionProps["refs"] = {
saveFormRef: createRef(),
submitFormRef: createRef(),
nextButtonRef: createRef(),
approveFormRef: createRef(),
inquireFormRef: createRef(),
rejectFormRef: createRef(),
+ exportButtonRef: createRef(),
getFormObjectRef: useRef<(() => FormObject) | null>(null),
};
@@ -810,6 +812,7 @@ const FormView: FC = ({ section }: Props) => {
>
Next
+
diff --git a/src/content/questionnaire/sections/A.tsx b/src/content/questionnaire/sections/A.tsx
index 722c01677..e7e11c69b 100644
--- a/src/content/questionnaire/sections/A.tsx
+++ b/src/content/questionnaire/sections/A.tsx
@@ -73,6 +73,7 @@ const FormSectionA: FC = ({ SectionOption, refs }: FormSection
approveFormRef,
inquireFormRef,
rejectFormRef,
+ exportButtonRef,
getFormObjectRef,
} = refs;
@@ -129,6 +130,7 @@ const FormSectionA: FC = ({ SectionOption, refs }: FormSection
approveFormRef.current.style.display = "none";
inquireFormRef.current.style.display = "none";
rejectFormRef.current.style.display = "none";
+ exportButtonRef.current.style.display = "none";
getFormObjectRef.current = getFormObject;
}, [refs]);
diff --git a/src/content/questionnaire/sections/B.tsx b/src/content/questionnaire/sections/B.tsx
index 89c4d3a0a..827a2f7c4 100644
--- a/src/content/questionnaire/sections/B.tsx
+++ b/src/content/questionnaire/sections/B.tsx
@@ -94,6 +94,7 @@ const FormSectionB: FC = ({ SectionOption, refs }: FormSection
approveFormRef,
inquireFormRef,
rejectFormRef,
+ exportButtonRef,
getFormObjectRef,
} = refs;
@@ -310,6 +311,7 @@ const FormSectionB: FC = ({ SectionOption, refs }: FormSection
approveFormRef.current.style.display = "none";
inquireFormRef.current.style.display = "none";
rejectFormRef.current.style.display = "none";
+ exportButtonRef.current.style.display = "none";
getFormObjectRef.current = getFormObject;
}, [refs]);
diff --git a/src/content/questionnaire/sections/C.tsx b/src/content/questionnaire/sections/C.tsx
index 1361e12c8..5fe5722dc 100644
--- a/src/content/questionnaire/sections/C.tsx
+++ b/src/content/questionnaire/sections/C.tsx
@@ -40,6 +40,7 @@ const FormSectionC: FC = ({ SectionOption, refs }: FormSection
approveFormRef,
inquireFormRef,
rejectFormRef,
+ exportButtonRef,
getFormObjectRef,
} = refs;
const { C: SectionCMetadata } = SectionMetadata;
@@ -121,6 +122,7 @@ const FormSectionC: FC = ({ SectionOption, refs }: FormSection
approveFormRef.current.style.display = "none";
inquireFormRef.current.style.display = "none";
rejectFormRef.current.style.display = "none";
+ exportButtonRef.current.style.display = "none";
getFormObjectRef.current = getFormObject;
}, [refs]);
diff --git a/src/content/questionnaire/sections/D.tsx b/src/content/questionnaire/sections/D.tsx
index b30b565f7..c1ebfef18 100644
--- a/src/content/questionnaire/sections/D.tsx
+++ b/src/content/questionnaire/sections/D.tsx
@@ -158,6 +158,7 @@ const FormSectionD: FC = ({ SectionOption, refs }: FormSection
approveFormRef,
inquireFormRef,
rejectFormRef,
+ exportButtonRef,
getFormObjectRef,
} = refs;
const [fileTypeData, setFileTypeData] = useState(
@@ -267,6 +268,7 @@ const FormSectionD: FC = ({ SectionOption, refs }: FormSection
approveFormRef.current.style.display = "none";
inquireFormRef.current.style.display = "none";
rejectFormRef.current.style.display = "none";
+ exportButtonRef.current.style.display = "none";
getFormObjectRef.current = getFormObject;
}, [refs]);
diff --git a/src/content/questionnaire/sections/Review.tsx b/src/content/questionnaire/sections/Review.tsx
index 50be5427e..1a2345c84 100644
--- a/src/content/questionnaire/sections/Review.tsx
+++ b/src/content/questionnaire/sections/Review.tsx
@@ -62,6 +62,7 @@ const FormSectionReview: FC = ({ SectionOption, refs }: FormSe
approveFormRef,
inquireFormRef,
rejectFormRef,
+ exportButtonRef,
getFormObjectRef,
} = refs;
@@ -106,6 +107,7 @@ const FormSectionReview: FC = ({ SectionOption, refs }: FormSe
saveFormRef.current.style.display = "none";
nextButtonRef.current.style.display = "none";
+ exportButtonRef.current.style.display = "flex";
if (formMode === "Review") {
approveFormRef.current.style.display = "flex";
@@ -718,7 +720,7 @@ const FormSectionReview: FC = ({ SectionOption, refs }: FormSe
-
+
);
};
diff --git a/src/graphql/getSubmission.ts b/src/graphql/getSubmission.ts
index 05157ce2f..1559253d3 100644
--- a/src/graphql/getSubmission.ts
+++ b/src/graphql/getSubmission.ts
@@ -57,6 +57,7 @@ export const query = gql`
intention
dataType
otherSubmissions
+ nodeCount
createdAt
updatedAt
}
diff --git a/src/graphql/listSubmissions.ts b/src/graphql/listSubmissions.ts
index da42e1169..d5befc98c 100644
--- a/src/graphql/listSubmissions.ts
+++ b/src/graphql/listSubmissions.ts
@@ -33,6 +33,7 @@ export const query = gql`
status
archived
conciergeName
+ nodeCount
createdAt
updatedAt
intention
diff --git a/src/types/Globals.d.ts b/src/types/Globals.d.ts
index f34fb76fc..c8af36932 100644
--- a/src/types/Globals.d.ts
+++ b/src/types/Globals.d.ts
@@ -12,6 +12,7 @@ type FormSectionProps = {
approveFormRef: React.RefObject;
inquireFormRef: React.RefObject;
rejectFormRef: React.RefObject;
+ exportButtonRef: React.RefObject;
getFormObjectRef: React.MutableRefObject<(() => FormObject | null) | null>;
};
SectionOption: SectionOption;
diff --git a/src/types/Submissions.d.ts b/src/types/Submissions.d.ts
index 4c4af1cc1..4f6f0e853 100644
--- a/src/types/Submissions.d.ts
+++ b/src/types/Submissions.d.ts
@@ -59,6 +59,10 @@ type Submission = {
* @see OtherSubmissions
*/
otherSubmissions: string;
+ /**
+ * The total number of nodes in the Submission
+ */
+ nodeCount: number;
createdAt: string; // ISO 8601 date time format with UTC or offset e.g., 2023-05-01T09:23:30Z
updatedAt: string; // ISO 8601 date time format with UTC or offset e.g., 2023-05-01T09:23:30Z
};
diff --git a/src/utils/dataSubmissionUtils.test.ts b/src/utils/dataSubmissionUtils.test.ts
index 441eea57d..919b5bda0 100644
--- a/src/utils/dataSubmissionUtils.test.ts
+++ b/src/utils/dataSubmissionUtils.test.ts
@@ -34,6 +34,7 @@ const baseSubmission: Submission = {
validationType: ["metadata", "file"],
studyID: "",
deletingData: false,
+ nodeCount: 0,
};
describe("General Submit", () => {
diff --git a/src/utils/dataSubmissionUtils.ts b/src/utils/dataSubmissionUtils.ts
index 80f9e770e..8f6db9172 100644
--- a/src/utils/dataSubmissionUtils.ts
+++ b/src/utils/dataSubmissionUtils.ts
@@ -159,7 +159,11 @@ export const unpackValidationSeverities = {
+export const downloadBlob = (
+ content: string | Blob,
+ filename: string,
+ contentType: string
+): void => {
const blob = new Blob([content], { type: contentType });
const url = URL.createObjectURL(blob);
const link = document.createElement("a");