-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(discoveryEnhancedLoading): Resolving merge conflict
- Loading branch information
Showing
24 changed files
with
710 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
...uping/TabField/DataDownloadList/ActionButtons/DownloadUtils/DownloadDataDictionaryInfo.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...ing/TabField/DataDownloadList/ActionButtons/DownloadUtils/DownloadVariableMetadataInfo.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { DiscoveryConfig } from '../../../../../../../DiscoveryConfig'; | ||
import { DiscoveryResource } from '../../../../../../../Discovery'; | ||
import { mdsURL } from '../../../../../../../../localconf'; | ||
import { fetchWithCreds } from '../../../../../../../../actions'; | ||
import VariableLevelMetadata from '../../Interfaces/VariableLevelMetadata'; | ||
|
||
const DownloadVariableMetadataInfo = ( | ||
discoveryConfig: DiscoveryConfig, | ||
resourceInfo: DiscoveryResource, | ||
showDownloadVariableMetadataButton: Boolean, | ||
setVariableMetadataInfo: Function, | ||
) => { | ||
const vlmdFieldReference = discoveryConfig.features.exportToWorkspace.variableMetadataFieldName; | ||
if (showDownloadVariableMetadataButton) { | ||
const studyID = resourceInfo._hdp_uid; | ||
fetchWithCreds({ path: `${mdsURL}/${studyID}` }).then((statusResponse) => { | ||
const { data } = statusResponse; | ||
if ( | ||
statusResponse.status === 200 | ||
&& data | ||
&& data[vlmdFieldReference as string] | ||
&& Object.keys(data[vlmdFieldReference as string]).length !== 0 | ||
) { | ||
const variableLevelMetadataRecords: VariableLevelMetadata = {}; | ||
if (data[vlmdFieldReference as string].data_dictionaries) { | ||
variableLevelMetadataRecords.dataDictionaries = data[vlmdFieldReference as string].data_dictionaries; | ||
} | ||
if (data[vlmdFieldReference as string].common_data_elements) { | ||
variableLevelMetadataRecords.cdeMetadata = data[vlmdFieldReference as string].common_data_elements; | ||
} | ||
if (Object.keys(variableLevelMetadataRecords).length) { | ||
setVariableMetadataInfo({ | ||
noVariableLevelMetadata: false, | ||
variableLevelMetadataRecords, | ||
}); | ||
} | ||
} | ||
}); | ||
} | ||
}; | ||
|
||
export default DownloadVariableMetadataInfo; |
4 changes: 0 additions & 4 deletions
4
...Details/Components/FieldGrouping/TabField/DataDownloadList/Interfaces/DataDictionaries.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.