Skip to content

Commit

Permalink
show data use codes
Browse files Browse the repository at this point in the history
  • Loading branch information
rushtong committed Sep 13, 2023
1 parent 8f35d81 commit dca4d22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/pages/data_submitter_console/DataSubmitterConsole.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default function DataSubmitterConsole() {
}
}
};

setIsLoading(true);
try {
const myDatasets = await DataSet.searchDatasetIndex(query);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {useCallback, useEffect, useState} from 'react';
import {Notifications} from '../../libs/utils';
import loadingIndicator from '../../images/loading-indicator.svg';
import SortableTable from '../../components/sortable_table/SortableTable';
import {isNil} from 'lodash/fp';
import {concat, isNil, join} from 'lodash/fp';


export default function DataSubmitterDatasetsTable(props) {
Expand Down Expand Up @@ -71,13 +71,15 @@ export default function DataSubmitterDatasetsTable(props) {
const redrawRows = useCallback(() => {
const rows = datasets.map((dataset) => {
const status = isNil(dataset.dacApproval) ? 'Pending' : (dataset.dacApproval ? 'Accepted' : 'Rejected');
const primaryCodes = dataset.dataUse?.primary.map(du => du.code);
const secondaryCodes = dataset.dataUse?.secondary.map(du => du.code);
return {
datasetIdentifier: dataset.datasetIdentifier,
datasetName: dataset.datasetName,
dataSubmitter: dataset?.createUserDisplayName,
datasetCustodians: '',
dac: dataset.dacName,
dataUse: '',
dataUse: join(', ')(concat(primaryCodes)(secondaryCodes)),
status: status,
actions: ''
};
Expand Down

0 comments on commit dca4d22

Please sign in to comment.