diff --git a/src/content/dataSubmissions/DataActivity.tsx b/src/content/dataSubmissions/DataActivity.tsx index 5df1ed2b..d7d2809d 100644 --- a/src/content/dataSubmissions/DataActivity.tsx +++ b/src/content/dataSubmissions/DataActivity.tsx @@ -21,6 +21,11 @@ import { import { FormatDate } from "../../utils"; import FileListDialog from "../../components/FileListDialog"; import ErrorDetailsDialog from "../../components/ErrorDetailsDialog"; +import StyledTooltip from "../../components/StyledFormComponents/StyledTooltip"; + +const StyledDateTooltip = styled(StyledTooltip)({ + cursor: "pointer", +}); const StyledRejectedStatus = styled("div")({ color: "#B54717", @@ -107,14 +112,24 @@ const columns: Column[] = [ }, { label: "Uploaded Date", - renderValue: (data) => - data?.createdAt ? `${FormatDate(data.createdAt, "MM-DD-YYYY [at] hh:mm A")}` : "", + renderValue: (data) => ( + + + {FormatDate(data.createdAt, "M/D/YYYY")} + + + ), field: "createdAt", default: true, sx: { - minWidth: "240px", + minWidth: "92px", }, }, + { + label: "Uploaded By", + renderValue: (data) => data?.submitterName || "", + field: "submitterName", + }, { label: "Upload Errors", renderValue: (data) => ( diff --git a/src/graphql/listBatches.ts b/src/graphql/listBatches.ts index 53bb5249..8ecb56f0 100644 --- a/src/graphql/listBatches.ts +++ b/src/graphql/listBatches.ts @@ -26,6 +26,7 @@ const FullBatchFragment = gql` createdAt updatedAt } + submitterName status errors } @@ -78,7 +79,7 @@ export type Response = { total: number; batches: (IsPartial extends true ? Pick - : Batch)[]; + : Omit)[]; }; batchStatusList: { batches: Pick[]; diff --git a/src/types/Submissions.d.ts b/src/types/Submissions.d.ts index 600864b5..9da20bcd 100644 --- a/src/types/Submissions.d.ts +++ b/src/types/Submissions.d.ts @@ -161,28 +161,31 @@ type UploadType = "metadata" | "data file"; type Batch = { _id: string; displayID: number; - submissionID: string; // parent + submissionID: string; type: UploadType; - fileCount: number; // calculated by BE + fileCount: number; files: BatchFileInfo[]; status: BatchStatus; errors: string[]; + /** + * The ID of the user who created the batch + */ + submitterID?: string; + /** + * The name of the user who created the batch + */ + submitterName?: string; 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 }; -type NewBatch = { - _id: string; - submissionID: string; // parent - bucketName?: string; // S3 bucket of the submission, for file batch / CLI use - filePrefix?: string; // prefix/path within S3 bucket, for file batch / CLI use - type: UploadType; - fileCount: number; // calculated by BE +type NewBatch = Pick< + Batch, + "_id" | "submissionID" | "type" | "fileCount" | "status" | "errors" | "createdAt" | "updatedAt" +> & { + bucketName?: string; + filePrefix?: string; files: FileURL[]; - status: BatchStatus; // [New, Uploaded, Upload Failed, Loaded, Rejected] Loaded and Rejected are for metadata batch only - errors: string[]; - 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 }; type ListBatches = {