Skip to content

Commit

Permalink
CDE-39 Retrieve pairing information (#42)
Browse files Browse the repository at this point in the history
* CDE-39 feat: Update pairing tooltip

* CDE-39 feat: Remove related query size

* CDE-39 retrieve pairing information

---------

Co-authored-by: afonso <[email protected]>
  • Loading branch information
Aiga115 and afonsobspinto authored Apr 12, 2024
1 parent 21ba77a commit 2136238
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/components/steps/mapping/MappingStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function MappingStep() {
case TabsEnum.Suggestions:
return <SuggestionsStep changeToNextTab={changeToNextTab}/>;
case TabsEnum.Mapping:
return <MappingTab defaultCollection={defaultCollection}/>;
return <MappingTab defaultCollection={defaultCollection} numberOfUnmappedRows={getUnmappedRowsCount()}/>;
default:
return <div>Unknown step</div>;
}
Expand Down
7 changes: 4 additions & 3 deletions lib/components/steps/mapping/MappingTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ const styles = {

interface MappingProps {
defaultCollection: string;
numberOfUnmappedRows: number;
}


const MappingTab = ({defaultCollection}: MappingProps) => {
const MappingTab = ({defaultCollection, numberOfUnmappedRows}: MappingProps) => {

const {datasetMapping, headerIndexes, collections, datasetMappingHeader} = useDataContext();
const {updateDatasetMappingRow, getUnmappedVariableNames, searchCustomDictionaryFields} = useServicesContext();
Expand Down Expand Up @@ -372,9 +373,9 @@ const MappingTab = ({defaultCollection}: MappingProps) => {
/>
</Box>

{hasPairingSuggestions(variableName) && (
{hasPairingSuggestions(variableName) && numberOfUnmappedRows!==0 && (
<Box sx={styles.row}>
<Accordion>
<Accordion defaultExpanded>
<AccordionSummary>
<PairIcon/>
<Typography sx={{
Expand Down

0 comments on commit 2136238

Please sign in to comment.