Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DCJ-700: Update to use correct field name #2683

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading