-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1422 from alliance-genome/release/v0.29.0
Release/v0.29.0 As sprint review Jan 31st 2024
- Loading branch information
Showing
117 changed files
with
2,111 additions
and
502 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { Button } from "primereact/button"; | ||
|
||
export const DeleteAction = ({ disabled, deletionHandler, index}) => { | ||
export const DeleteAction = ({ disabled, deletionHandler, id }) => { | ||
return ( | ||
<Button icon="pi pi-trash" className="p-button-text" disabled={disabled} | ||
onClick={(e) => deletionHandler(e, index)} /> | ||
onClick={(e) => deletionHandler(e, id)} /> | ||
); | ||
}; |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Button } from "primereact/button"; | ||
export const DuplicationAction = ({ props, handleDuplication, disabled }) => { | ||
return <Button icon="pi pi-copy" disabled={disabled} className="p-button-text" onClick={() => handleDuplication(props)}/> ; | ||
} | ||
return <Button icon="pi pi-copy" disabled={disabled} className="p-button-text p-0 text-base" onClick={() => handleDuplication(props)}/> ; | ||
} |
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
48 changes: 48 additions & 0 deletions
48
src/main/cliapp/src/components/Editors/EvidenceCodeEditor.js
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,48 @@ | ||
import { AutocompleteEditor } from "../Autocomplete/AutocompleteEditor"; | ||
import { buildAutocompleteFilter, autocompleteSearch } from "../../utils/utils"; | ||
import { SearchService } from "../../service/SearchService"; | ||
import { EvidenceAutocompleteTemplate } from "../Autocomplete/EvidenceAutocompleteTemplate"; | ||
import { ErrorMessageComponent } from "../Error/ErrorMessageComponent"; | ||
|
||
const evidenceSearch = (event, setFiltered, setInputValue) => { | ||
const searchService = new SearchService(); | ||
const autocompleteFields = ["curie", "name", "abbreviation"]; | ||
const endpoint = "ecoterm"; | ||
const filterName = "evidenceFilter"; | ||
const filter = buildAutocompleteFilter(event, autocompleteFields); | ||
const otherFilters = { | ||
obsoleteFilter: { | ||
"obsolete": { | ||
queryString: false | ||
} | ||
}, | ||
subsetFilter: { | ||
"subsets": { | ||
queryString: "agr_eco_terms" | ||
} | ||
} | ||
}; | ||
|
||
setInputValue(event.query); | ||
autocompleteSearch(searchService, endpoint, filterName, filter, setFiltered, otherFilters); | ||
}; | ||
|
||
export const EvidenceCodeEditor = ({ props, errorMessages, onChangeHandler, dataKey }) => { | ||
return ( | ||
<> | ||
<AutocompleteEditor | ||
search={evidenceSearch} | ||
initialValue={props.rowData.evidenceCode} | ||
rowProps={props} | ||
fieldName='evidenceCode' | ||
valueDisplay={(item, setAutocompleteHoverItem, op, query) => | ||
<EvidenceAutocompleteTemplate item={item} setAutocompleteHoverItem={setAutocompleteHoverItem} op={op} query={query} />} | ||
onValueChangeHandler={onChangeHandler} | ||
/> | ||
<ErrorMessageComponent | ||
errorMessages={errorMessages[dataKey]} | ||
errorField="evidenceCode" | ||
/> | ||
</> | ||
); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { AutocompleteEditor } from '../Autocomplete/AutocompleteEditor'; | ||
import { SearchService } from '../../service/SearchService'; | ||
import { autocompleteSearch, buildAutocompleteFilter } from '../../utils/utils'; | ||
import { SubjectAutocompleteTemplate } from '../Autocomplete/SubjectAutocompleteTemplate'; | ||
import { DialogErrorMessageComponent } from "../Error/DialogErrorMessageComponent"; | ||
|
||
const geneSearch = (event, setFiltered, setInputValue) => { | ||
const searchService = new SearchService(); | ||
const autocompleteFields = [ | ||
"curie", "crossReferences.referencedCurie", "geneFullName.formatText", "geneFullName.displayText", | ||
"geneSymbol.formatText", "geneSymbol.displayText", "geneSynonyms.formatText", "geneSynonyms.displayText", | ||
"geneSystematicName.formatText", "geneSystematicName.displayText", "geneSecondaryIds.secondaryId" | ||
]; | ||
const endpoint = "gene"; | ||
const filterName = "objectFilter"; | ||
const filter = buildAutocompleteFilter(event, autocompleteFields); | ||
|
||
setInputValue(event.query); | ||
autocompleteSearch(searchService, endpoint, filterName, filter, setFiltered); | ||
}; | ||
|
||
export const GeneEditor = ({ props, errorMessages, onChange, dataKey }) => { | ||
return ( | ||
<> | ||
<AutocompleteEditor | ||
search={geneSearch} | ||
initialValue={props?.rowData?.objectGene?.curie} | ||
rowProps={props} | ||
fieldName='objectGene' | ||
valueDisplay={(item, setAutocompleteHoverItem, op, query) => | ||
<SubjectAutocompleteTemplate item={item} setAutocompleteHoverItem={setAutocompleteHoverItem} op={op} query={query} />} | ||
onValueChangeHandler={onChange} | ||
/> | ||
<DialogErrorMessageComponent | ||
errorMessages={errorMessages[dataKey]} | ||
errorField={"objectGene"} | ||
/> | ||
</> | ||
); | ||
}; |
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
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
62 changes: 62 additions & 0 deletions
62
src/main/cliapp/src/components/Editors/RelatedNoteEditor.js
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,62 @@ | ||
import React from 'react'; | ||
import { ErrorMessageComponent } from '../Error/ErrorMessageComponent'; | ||
import { Button } from 'primereact/button'; | ||
import { EditMessageTooltip } from '../EditMessageTooltip'; | ||
|
||
export const RelatedNoteEditor = ({ rowProps, relatedNote, errorMessages, setRelatedNotesData, dataKey }) => { | ||
|
||
const handleRelatedNotesOpenInEdit = (event, rows, rowIndex) => { | ||
event.preventDefault(); | ||
let _relatedNotesData = {}; | ||
_relatedNotesData["originalRelatedNotes"] = relatedNote ? [relatedNote] : undefined; | ||
_relatedNotesData["dialogIsVisible"] = true; | ||
_relatedNotesData["dataKey"] = dataKey; | ||
_relatedNotesData["errorMessages"] = errorMessages; | ||
_relatedNotesData["rowProps"] = rowProps; | ||
setRelatedNotesData(() => ({ | ||
..._relatedNotesData | ||
})); | ||
}; | ||
|
||
if (relatedNote) { | ||
return ( | ||
<> | ||
<div> | ||
<Button className="p-button-text" | ||
onClick={(event) => { handleRelatedNotesOpenInEdit(event, rowProps.props.rows, rowProps.rowIndex); }} > | ||
<span style={{ textDecoration: 'underline' }}> | ||
{relatedNote.freeText} | ||
<i className="pi pi-user-edit" style={{ 'fontSize': '1em' }}></i> | ||
</span> | ||
<EditMessageTooltip object="allele" /> | ||
</Button> | ||
</div> | ||
<ErrorMessageComponent | ||
errorMessages={errorMessages[dataKey]} | ||
errorField={"relatedNote"} | ||
style={{ 'fontSize': '1em' }} | ||
/> | ||
</> | ||
); | ||
} else { | ||
return ( | ||
<> | ||
<div> | ||
<Button className="p-button-text" | ||
onClick={(event) => { handleRelatedNotesOpenInEdit(event, rowProps.props.rows, rowProps.rowIndex); }} > | ||
<span style={{ textDecoration: 'underline' }}> | ||
Add Note | ||
<i className="pi pi-user-edit" style={{ 'fontSize': '1em' }}></i> | ||
</span> | ||
<EditMessageTooltip object="allele" /> | ||
</Button> | ||
</div> | ||
<ErrorMessageComponent | ||
errorMessages={errorMessages[dataKey]} | ||
errorField={"relatedNote"} | ||
style={{ 'fontSize': '1em' }} | ||
/> | ||
</> | ||
); | ||
} | ||
}; |
Oops, something went wrong.