Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection polish #1493

Merged
merged 5 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Running the following command will create an optimized static build of your app
npm run build
````

## Docker build for DEV development
## Docker build for DEV/TEST/PROD development

There are a few configurable environment variables to keep in mind:

Expand All @@ -28,11 +28,3 @@ There are a few configurable environment variables to keep in mind:
cd docker
./docker-development.sh [check|config|build|start|stop|down]
```

## Docker build for deployment on TEST/STAGE/PROD

```
cd docker
docker pull hubmap/ingest-ui:2.3.0 (replace with the actual released version number)
./docker-deployment.sh [start|stop|down]
```
3 changes: 2 additions & 1 deletion src/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ export function App (props){
};

function handleCancel(){
window.history.back();
// window.history.back();
navigate("/");
}
const onClose = (event, reason) => {
navigate("/");
Expand Down
31 changes: 19 additions & 12 deletions src/src/components/collections/collections.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export function CollectionForm (props){
} else{
setFormErrors((prevValues) => ({
...prevValues,
'contributors': "Contributors detected but colums are unsupported / improperly formatted. Please referto the examples linked below and try again.",
'contributors': "Contributors detected but colums are unsupported / improperly formatted. Please refer to the examples linked below and try again.",
}))
isValid = false;
}
Expand Down Expand Up @@ -520,13 +520,12 @@ export function CollectionForm (props){
var contributors = []
var contacts = []
for (const row of data.data) {
contributors.push(row)
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,10 +547,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 +569,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 Expand Up @@ -905,7 +912,7 @@ export function CollectionForm (props){
)}

<div className="text-right">
<Typography variant='caption'>Please referto the <a href="https://hubmapconsortium.github.io/ingest-validation-tools/contributors/current/" target='_blank'>contributor file schema information</a>, and this <a href='https://raw.githubusercontent.com/hubmapconsortium/dataset-metadata-spreadsheet/main/contributors/latest/contributors.tsv' target='_blank'>Example TSV File</a> </Typography>
<Typography variant='caption'>Please refer to the <a href="https://hubmapconsortium.github.io/ingest-validation-tools/contributors/current/" target='_blank'>contributor file schema information</a>, and this <a href='https://raw.githubusercontent.com/hubmapconsortium/dataset-metadata-spreadsheet/main/contributors/latest/contributors.tsv' target='_blank'>Example TSV File</a> </Typography>
</div>
<div className="text-left">
<label>
Expand Down
16 changes: 12 additions & 4 deletions src/src/components/collections/epicollections.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export function EPICollectionForm (props){
} else{
setFormErrors((prevValues) => ({
...prevValues,
'contributors': "Contributors detected but colums are unsupported / improperly formatted. Please referto the examples linked below and try again.",
'contributors': "Contributors detected but colums are unsupported / improperly formatted. Please refer to the examples linked below and try again.",
}))
isValid = false;
}
Expand Down 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 Expand Up @@ -918,7 +926,7 @@ export function EPICollectionForm (props){
)}

<div className="text-right">
<Typography variant='caption'>Please referto the <a href="https://hubmapconsortium.github.io/ingest-validation-tools/contributors/current/" target='_blank'>contributor file schema information</a>, and this <a href='https://raw.githubusercontent.com/hubmapconsortium/dataset-metadata-spreadsheet/main/contributors/latest/contributors.tsv' target='_blank'>Example TSV File</a> </Typography>
<Typography variant='caption'>Please refer to the <a href="https://hubmapconsortium.github.io/ingest-validation-tools/contributors/current/" target='_blank'>contributor file schema information</a>, and this <a href='https://raw.githubusercontent.com/hubmapconsortium/dataset-metadata-spreadsheet/main/contributors/latest/contributors.tsv' target='_blank'>Example TSV File</a> </Typography>
</div>
<div className="text-left">
<label>
Expand Down
Loading