Skip to content

Commit

Permalink
Merge pull request #483 from CBIIT/CRDCDH-1606
Browse files Browse the repository at this point in the history
CRDCDH-1606 Add nodeCount column to Data Submission List table
  • Loading branch information
amattu2 authored Oct 3, 2024
2 parents ac9b515 + 86a8659 commit 3571bd3
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/Contexts/SubmissionContext.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const baseSubmission: Submission = {
intention: "New/Update",
dataType: "Metadata Only",
otherSubmissions: "",
nodeCount: 0,
createdAt: "",
updatedAt: "",
studyID: "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const baseSubmission: Omit<
validationType: ["metadata", "file"],
studyID: "",
deletingData: false,
nodeCount: 0,
};

const baseAuthCtx: AuthCtxState = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const baseSubmission: Submission = {
intention: "New/Update",
dataType: "Metadata Only",
otherSubmissions: "",
nodeCount: 0,
createdAt: "",
updatedAt: "",
};
Expand Down
1 change: 1 addition & 0 deletions src/components/DataSubmissions/DataUpload.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const baseSubmission: Omit<Submission, "_id"> = {
validationType: ["metadata", "file"],
studyID: "",
deletingData: false,
nodeCount: 0,
};

const baseUser: User = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const baseSubmission: Submission = {
validationType: ["metadata", "file"],
studyID: "",
deletingData: false,
nodeCount: 0,
};

const baseContext: ContextState = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const BaseSubmission: Submission = {
validationScope: "New",
validationType: [],
deletingData: false,
nodeCount: 0,
};

const baseAuthCtx: AuthContextState = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const baseSubmission: Submission = {
validationType: ["metadata", "file"],
studyID: "",
deletingData: false,
nodeCount: 0,
};

const baseContext: ContextState = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const baseSubmission: Submission = {
crossSubmissionStatus: null,
studyID: "",
deletingData: false,
nodeCount: 0,
};

const baseCrossValidationResult: CrossValidationResult = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe("ExportValidationButton cases", () => {
validationType: ["metadata", "file"],
studyID: "",
deletingData: false,
nodeCount: 0,
};

const baseQCResult: Omit<QCResult, "submissionID"> = {
Expand Down
1 change: 1 addition & 0 deletions src/components/DataSubmissions/MetadataUpload.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const baseSubmission: Omit<
validationType: ["metadata", "file"],
studyID: "",
deletingData: false,
nodeCount: 0,
};

const baseContext: ContextState = {
Expand Down
1 change: 1 addition & 0 deletions src/components/DataSubmissions/ValidationControls.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const baseSubmission: Omit<
validationType: ["metadata", "file"],
studyID: "",
deletingData: false,
nodeCount: 0,
};

const baseAuthCtx: AuthCtxState = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const baseSubmission: Omit<Submission, "_id"> = {
validationType: ["metadata", "file"],
studyID: "",
deletingData: false,
nodeCount: 0,
};

describe("Accessibility", () => {
Expand Down
1 change: 1 addition & 0 deletions src/components/DataSubmissions/ValidationStatus.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const BaseSubmission: Omit<
updatedAt: "",
studyID: "",
deletingData: false,
nodeCount: 0,
};

type TestParentProps = {
Expand Down
1 change: 1 addition & 0 deletions src/content/dataSubmissions/CrossValidation.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const baseSubmission: Submission = {
crossSubmissionStatus: null,
studyID: "",
deletingData: false,
nodeCount: 0,
};

const baseCrossValidationResult: CrossValidationResult = {
Expand Down
1 change: 1 addition & 0 deletions src/content/dataSubmissions/DataActivity.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const baseSubmission: Omit<Submission, "_id"> = {
fileValidationStatus: "New",
studyID: "",
deletingData: false,
nodeCount: 0,
};

type ParentProps = {
Expand Down
8 changes: 7 additions & 1 deletion src/content/dataSubmissions/DataSubmissionsListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down Expand Up @@ -213,6 +213,12 @@ const columns: Column<T>[] = [
renderValue: (a) => <TruncatedText text={a.conciergeName} />,
field: "conciergeName",
},
{
label: "Node Count",
renderValue: (a) =>
Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format(a.nodeCount || 0),
field: "nodeCount",
},
{
label: "Created Date",
renderValue: (a) =>
Expand Down
1 change: 1 addition & 0 deletions src/content/dataSubmissions/QualityControl.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const baseSubmission: Submission = {
crossSubmissionStatus: null,
studyID: "",
deletingData: false,
nodeCount: 0,
};

const baseQCResult: QCResult = {
Expand Down
1 change: 1 addition & 0 deletions src/graphql/getSubmission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const query = gql`
intention
dataType
otherSubmissions
nodeCount
createdAt
updatedAt
}
Expand Down
1 change: 1 addition & 0 deletions src/graphql/listSubmissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const query = gql`
status
archived
conciergeName
nodeCount
createdAt
updatedAt
intention
Expand Down
4 changes: 4 additions & 0 deletions src/types/Submissions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down
1 change: 1 addition & 0 deletions src/utils/dataSubmissionUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const baseSubmission: Submission = {
validationType: ["metadata", "file"],
studyID: "",
deletingData: false,
nodeCount: 0,
};

describe("General Submit", () => {
Expand Down

0 comments on commit 3571bd3

Please sign in to comment.