Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into dev-integrate
  • Loading branch information
yuanzhou committed Oct 7, 2024
2 parents 4e30790 + 2b0d9be commit d74b68d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 6 additions & 3 deletions src/src/components/collections/collections.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,13 @@ export function CollectionForm (props){
var contributors = []
var contacts = []
for (const row of data.data) {
contributors.push(row)
if(row.is_contact === "TRUE"){
if(!row.is_contact){
row.is_contact = "NO"
}else if (row.is_contact && (row.is_contact === "TRUE"|| row.is_contact.toLowerCase()==="yes") ){
contacts.push(row)
}
contributors.push(row)

}
setFormValues ({
...formValues,
Expand All @@ -548,7 +551,7 @@ export function CollectionForm (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.is_contact==="TRUE" || row.is_contact.toLowerCase()==="yes") ? <FontAwesomeIcon icon={faCheck} /> : ""} </TableCell>
<TableCell className="clicky-cell" scope="row"> { (row.is_contact && (row.is_contact==="TRUE" || row.is_contact.toLowerCase()==="yes")) ? <FontAwesomeIcon icon={faCheck} /> : ""} </TableCell>
</TableRow>
);
});
Expand Down
10 changes: 6 additions & 4 deletions src/src/components/collections/epicollections.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,12 @@ export function EPICollectionForm (props){
var contacts = []
for (const row of data.data) {
contributors.push(row)
if(row.is_contact === "TRUE"){
if(!row.is_contact){
row.is_contact = "NO"
}else if(row.is_contact && (row.is_contact === "TRUE"|| row.is_contact.toLowerCase()==="yes") ){
contacts.push(row)
console.debug('%c◉ contact ', 'color:#00ff7b', row);
}
contributors.push(row)
}
setFormValues ({
...formValues,
Expand All @@ -556,8 +558,8 @@ 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.is_contact==="TRUE" || row.is_contact.toLowerCase()==="yes") ? <FontAwesomeIcon icon={faCheck} /> : ""} </TableCell>
</TableRow>
<TableCell className="clicky-cell" scope="row"> { (row.is_contact && (row.is_contact==="TRUE" || row.is_contact.toLowerCase()==="yes")) ? <FontAwesomeIcon icon={faCheck} /> : ""} </TableCell>
</TableRow>
);
});
}
Expand Down

0 comments on commit d74b68d

Please sign in to comment.