Skip to content

Commit

Permalink
Merge branch 'mvp-2.1.0' into CRDCDH-753
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro-Vega authored Jan 22, 2024
2 parents 4eb10a4 + f38fc6c commit f4682fa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/DataSubmissions/GenericTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ type Props<T> = {
defaultRowsPerPage?: number;
paginationPlacement?: CSSProperties["justifyContent"];
containerProps?: TableContainerProps;
numRowsNoContent?: number;
setItemKey?: (item: T, index: number) => string;
onFetchData?: (params: FetchListing<T>, force: boolean) => void;
onOrderChange?: (order: Order) => void;
Expand All @@ -172,6 +173,7 @@ const GenericTable = <T,>({
defaultRowsPerPage = 10,
paginationPlacement,
containerProps,
numRowsNoContent = 10,
setItemKey,
onFetchData,
onOrderChange,
Expand All @@ -185,7 +187,6 @@ const GenericTable = <T,>({
);
const [page, setPage] = useState<number>(0);
const [perPage, setPerPage] = useState<number>(defaultRowsPerPage);
const numRowsNoContent = 10;

useEffect(() => {
fetchData();
Expand Down
2 changes: 2 additions & 0 deletions src/content/dataSubmissions/FileListDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ const FileListDialog = ({
defaultOrder="asc"
defaultRowsPerPage={20}
paginationPlacement="center"
noContentText="No files were uploaded."
numRowsNoContent={5}
onFetchData={handleFetchBatchFiles}
setItemKey={(item, idx) => `${idx}_${item.fileName}_${item.createdAt}`}
containerProps={{ sx: tableContainerSx }}
Expand Down
5 changes: 5 additions & 0 deletions src/types/Submissions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ type UploadResult = {
fileName: string;
succeeded: boolean;
errors: string[];
/**
* Applies to Data File uploads only. Indicates whether the file was skipped
* intentionally during the upload process.
*/
skipped?: boolean;
};

type BatchFileInfo = {
Expand Down

0 comments on commit f4682fa

Please sign in to comment.