-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HP-1484 HP-1617 Feat/cde submission (#1547)
* feat: skeleton of tab panels * component actions * cde sub * existing cde wip and change label * setup tags and filters * style update * update submit btn status * cde dd vlmd update * refactor vlmd dl for metadata update * presist CDE selection * fix vlmd download * update doc * remove console * fix using the correct parse() * Consider '*' as a wildcard (#1566) * Consider '*' as a wildcard * upgrade fuse to latest version (#1559) * upgrade fuse to allow search with longer 32 characters * use grid for checkbox group * disable cde form for redcap * fix zendesk function calls * adjust on pr feedback * use enum * add pr feedbacks * update place holder text --------- Co-authored-by: Sai Shanmukha Narumanchi <[email protected]> Co-authored-by: Thanh Dang Nguyen <[email protected]>
- Loading branch information
1 parent
0ef57ff
commit 079b69d
Showing
25 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.