Skip to content

Commit

Permalink
insert current data use terms into fetched seq details and auto-refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
bh-ethz committed Apr 15, 2024
1 parent 8749ddc commit 90f2fb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ const InnerEditDataUseTermsButton: FC<EditDataUseTermsButtonProps> = ({
position: 'top-center',
autoClose: false,
}),
onSuccess: () =>
toast.success('The use terms for this sequence will be updated within a few minutes.', {
position: 'top-center',
autoClose: false,
}),
onSuccess: () => location.reload(),
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ const groupId = tableData.find((entry) => entry.name === 'groupId')!.value as nu
dataUseTermsHistory.sort((a, b) => (a.changeDate > b.changeDate ? -1 : 1));
const currentDataUseTerms = dataUseTermsHistory[0].dataUseTerms;
const dataUseTermsIndex = tableData.findIndex((entry) => entry.name === 'dataUseTerms');
if (dataUseTermsIndex !== -1) {
tableData[dataUseTermsIndex].value = currentDataUseTerms.type;
}
const isRestricted = currentDataUseTerms.type === 'RESTRICTED';
const runtimeConfig = getRuntimeConfig();
Expand Down

0 comments on commit 90f2fb2

Please sign in to comment.