Skip to content

Commit

Permalink
Fix Contributor Dupe
Browse files Browse the repository at this point in the history
  • Loading branch information
BirdMachine committed Oct 15, 2024
1 parent 6cf9026 commit dcb62b2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
26 changes: 17 additions & 9 deletions src/src/components/collections/collections.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ export function CollectionForm (props){
}else if (row.is_contact && (row.is_contact === "TRUE"|| row.is_contact.toLowerCase()==="yes") ){
contacts.push(row)
}
contributors.push(row)
// contributors.push(row)

}
setFormValues ({
Expand All @@ -548,10 +548,14 @@ export function CollectionForm (props){
key={("rowName_" + index)}
className="row-selection"
>
<TableCell className="clicky-cell" scope="row">{row.display_name}</TableCell>
<TableCell className="clicky-cell" scope="row">{row.affiliation}</TableCell>
<TableCell className="clicky-cell" scope="row"> {row.orcid} </TableCell>
<TableCell className="clicky-cell" scope="row"> { (row.is_contact && (row.is_contact==="TRUE" || row.is_contact.toLowerCase()==="yes")) ? <FontAwesomeIcon icon={faCheck} /> : ""} </TableCell>
<TableCell className="clicky-cell" scope="row">{row.display_name}</TableCell>
<TableCell className="clicky-cell" scope="row">{row.affiliation}</TableCell>
<TableCell className="clicky-cell" scope="row">{row.orcid} </TableCell>
<TableCell className="clicky-cell" scope="row">{row.email }</TableCell>
<TableCell className="clicky-cell" scope="row"> { (row.is_contact && (row.is_contact==="TRUE" || row.is_contact.toLowerCase()==="yes")) ? <FontAwesomeIcon icon={faCheck} /> : ""} </TableCell>
<TableCell className="clicky-cell" scope="row">{row.is_principal_investigator }</TableCell>
<TableCell className="clicky-cell" scope="row">{row.is_operator }</TableCell>
<TableCell className="clicky-cell" scope="row">{row.metadata_schema_id}</TableCell>
</TableRow>
);
});
Expand All @@ -566,10 +570,14 @@ export function CollectionForm (props){
<Table stickyHeader aria-label="Associated Collaborators" size="small" className="table table-striped table-hover mb-0">
<TableHead className="thead-dark font-size-sm">
<TableRow className=" " >
<TableCell> Name</TableCell>
<TableCell component="th">Affiliation</TableCell>
<TableCell component="th">Orcid</TableCell>
<TableCell component="th">Is Contact</TableCell>
<TableCell> Name</TableCell>
<TableCell component="th">Affiliation</TableCell>
<TableCell component="th">Orcid</TableCell>
<TableCell component="th">Email</TableCell>
<TableCell component="th">Is Contact</TableCell>
<TableCell component="th">Is Principal Investigator</TableCell>
<TableCell component="th">Is Operator</TableCell>
<TableCell component="th">Metadata Schema ID</TableCell>
</TableRow>
</TableHead>
<TableBody>
Expand Down
12 changes: 10 additions & 2 deletions src/src/components/collections/epicollections.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ export function EPICollectionForm (props){
}else if(row.is_contact && (row.is_contact === "TRUE"|| row.is_contact.toLowerCase()==="yes") ){
contacts.push(row)
}
contributors.push(row)
// contributors.push(row)
}
setFormValues ({
...formValues,
Expand All @@ -557,8 +557,12 @@ export function EPICollectionForm (props){
>
<TableCell className="clicky-cell" scope="row">{row.display_name}</TableCell>
<TableCell className="clicky-cell" scope="row">{row.affiliation}</TableCell>
<TableCell className="clicky-cell" scope="row"> {row.orcid} </TableCell>
<TableCell className="clicky-cell" scope="row">{row.orcid} </TableCell>
<TableCell className="clicky-cell" scope="row">{row.email }</TableCell>
<TableCell className="clicky-cell" scope="row"> { (row.is_contact && (row.is_contact==="TRUE" || row.is_contact.toLowerCase()==="yes")) ? <FontAwesomeIcon icon={faCheck} /> : ""} </TableCell>
<TableCell className="clicky-cell" scope="row">{row.is_principal_investigator }</TableCell>
<TableCell className="clicky-cell" scope="row">{row.is_operator }</TableCell>
<TableCell className="clicky-cell" scope="row">{row.metadata_schema_id}</TableCell>
</TableRow>
);
});
Expand All @@ -577,7 +581,11 @@ export function EPICollectionForm (props){
<TableCell> Name</TableCell>
<TableCell component="th">Affiliation</TableCell>
<TableCell component="th">Orcid</TableCell>
<TableCell component="th">Email</TableCell>
<TableCell component="th">Is Contact</TableCell>
<TableCell component="th">Is Principal Investigator</TableCell>
<TableCell component="th">Is Operator</TableCell>
<TableCell component="th">Metadata Schema ID</TableCell>
</TableRow>
</TableHead>
<TableBody>
Expand Down

1 comment on commit dcb62b2

@BirdMachine
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also adds new Columns to Contributors Table

Please sign in to comment.