Skip to content

Commit

Permalink
DCJ-700: Update to use correct field name (#2683)
Browse files Browse the repository at this point in the history
  • Loading branch information
rushtong authored Oct 7, 2024
1 parent 3a999e5 commit afeaa78
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/components/dac_dataset_table/DACDatasetApprovalStatus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export default function DACDatasetApprovalStatus(props) {
setOpen(false);
};

const handleAction = ({dataSetId, name}) => {
const handleAction = ({datasetId, name}) => {
setOpen(false);
try {
DataSet.deleteDataset(dataSetId).then(() => {
DataSet.deleteDataset(datasetId).then(() => {
Notifications.showSuccess({
text: `Deleted dataset '${name}' successfully.`,
});
Expand All @@ -37,7 +37,7 @@ export default function DACDatasetApprovalStatus(props) {
};

const updateApprovalStatus = async (approvalState) => {
const updatedDataset = await DAC.updateApprovalStatus(dataset.dacId, dataset.dataSetId, approvalState);
const updatedDataset = await DAC.updateApprovalStatus(dataset.dacId, dataset.datasetId, approvalState);
setDataset(updatedDataset);
};

Expand All @@ -46,7 +46,7 @@ export default function DACDatasetApprovalStatus(props) {
{dataset.study?.studyId &&
<Link
style={{marginLeft: '15px'}}
id={`${dataset.dataSetId}_edit`}
id={`${dataset.datasetId}_edit`}
className={'glyphicon glyphicon-pencil'}
to={`study_update/${dataset.study.studyId}`}
/>
Expand All @@ -55,7 +55,7 @@ export default function DACDatasetApprovalStatus(props) {
<>
<Link
style={{marginLeft: '15px'}}
id={`${dataset.dataSetId}_delete`}
id={`${dataset.datasetId}_delete`}
className={'glyphicon glyphicon-trash'}
onClick={handleClick}
to={`#`}
Expand All @@ -72,28 +72,28 @@ export default function DACDatasetApprovalStatus(props) {
const dacUndecided = (dataset) => <div style={{display: 'flex', alignItems: 'center'}}>
<Button
data-tip={true}
data-for={`approve-dataset-button-${dataset.dataSetId}`}
id={`btn_approveDataset-${dataset.dataSetId}`}
data-for={`approve-dataset-button-${dataset.datasetId}`}
id={`btn_approveDataset-${dataset.datasetId}`}
onClick={() => updateApprovalStatus(true)}
className={style['btn-primary-dac-datasets']}>
YES
</Button>
<ReactTooltip
place={'left'}
effect={'solid'}
id={`approve-dataset-button-${dataset.dataSetId}`}>Approve dataset for Data Access Committee</ReactTooltip>
id={`approve-dataset-button-${dataset.datasetId}`}>Approve dataset for Data Access Committee</ReactTooltip>
<Button
data-tip={true}
data-for={`reject-dataset-button-${dataset.dataSetId}`}
id={`btn_rejectDataset-${dataset.dataSetId}`}
data-for={`reject-dataset-button-${dataset.datasetId}`}
id={`btn_rejectDataset-${dataset.datasetId}`}
onClick={() => updateApprovalStatus(false)}
className={style['btn-primary-dac-datasets']}>
NO
</Button>
<ReactTooltip
place={'right'}
effect={'solid'}
id={`reject-dataset-button-${dataset.dataSetId}`}>Reject dataset for Data Access Committee</ReactTooltip>
id={`reject-dataset-button-${dataset.datasetId}`}>Reject dataset for Data Access Committee</ReactTooltip>
</div>;

return (!isNil(dataset?.dacApproval))
Expand Down

0 comments on commit afeaa78

Please sign in to comment.