Skip to content

Commit

Permalink
Merge pull request #251 from CBIIT/CRDCDH-660
Browse files Browse the repository at this point in the history
CRDCDH-660 Shorter Batch IDs
  • Loading branch information
Alejandro-Vega authored Jan 4, 2024
2 parents a57ce08 + ecc9623 commit 03be7f5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
5 changes: 5 additions & 0 deletions src/content/dataSubmissions/DataSubmission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ const StyledErrorDetailsButton = styled(Button)(() => ({
}));

const columns: Column<Batch>[] = [
{
label: "Batch ID",
renderValue: (data) => data.displayID,
field: "displayID",
},
{
label: "Upload Type",
renderValue: (data) => (data?.type === "file" ? "-" : data?.metadataIntention),
Expand Down
15 changes: 8 additions & 7 deletions src/content/dataSubmissions/QualityControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ const StyledSeverity = styled(Box)({
alignItems: "center",
});

const StyledBreakAll = styled(Box)({
wordBreak: "break-all"
});

const columns: Column<QCResult>[] = [
{
label: "Type",
Expand All @@ -46,17 +50,17 @@ const columns: Column<QCResult>[] = [
},
{
label: "Batch ID",
renderValue: (data) => data?.batchID,
field: "batchID",
renderValue: (data) => <StyledBreakAll>{data?.displayID}</StyledBreakAll>,
field: "displayID",
},
{
label: "Node ID",
renderValue: (data) => data?.nodeID,
renderValue: (data) => <StyledBreakAll>{data?.nodeID}</StyledBreakAll>,
field: "nodeID",
},
{
label: "CRDC ID",
renderValue: (data) => data?.CRDC_ID,
renderValue: (data) => <StyledBreakAll>{data?.CRDC_ID}</StyledBreakAll>,
field: "CRDC_ID",
},
{
Expand Down Expand Up @@ -93,9 +97,6 @@ const columns: Column<QCResult>[] = [
),
field: "description",
sortDisabled: true,
sx: {
minWidth: "260px",
}
},
];

Expand Down
1 change: 1 addition & 0 deletions src/graphql/listBatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const query = gql`
total
batches {
_id
displayID
submissionID
type
metadataIntention
Expand Down
1 change: 1 addition & 0 deletions src/graphql/submissionQCResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const query = gql`
submissionID
nodeType
batchID
displayID
nodeID
CRDC_ID
severity
Expand Down
2 changes: 2 additions & 0 deletions src/types/Submissions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ type UploadType = "metadata" | "file";

type Batch = {
_id: string;
displayID: number;
submissionID: string; // parent
type: UploadType; // [metadata, file]
metadataIntention: MetadataIntention; // [New, Update, Delete], Update is meant for "Update or insert", metadata only! file batches are always treated as Update
Expand Down Expand Up @@ -163,6 +164,7 @@ type QCResult = {
submissionID: string;
nodeType: string;
batchID: string;
displayID: number;
nodeID: string;
CRDC_ID: string;
severity: "Error" | "Warning"; // [Error, Warning]
Expand Down

0 comments on commit 03be7f5

Please # to comment.