Skip to content

Commit

Permalink
Support #35422 - Add vernacular name to organism (#1489)
Browse files Browse the repository at this point in the history
* Support #35422 - Add vernacular name to organism

- Added the field under organism remarks and above the determination section.
- Added it to the material sample type.
- Added support to the form template.

* Support #35422 - Add vernacular name to organism

- Fix tests
  • Loading branch information
brandonandre authored Dec 18, 2024
1 parent 1a4561e commit 8dfb8f0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const ORGANISM_FIELDS = [
"lifeStage",
"sex",
"remarks",
"dwcVernacularName",
"determination",
"isTarget",
"managedAttributes"
Expand Down Expand Up @@ -109,6 +110,11 @@ export function OrganismStateField({
className="col-sm-12"
multiLines={true}
/>
<TextField
{...fieldProps("dwcVernacularName")}
customName="dwcVernacularName"
className="col-sm-12"
/>
</div>
<ManagedAttributesEditor
valuesPath={fieldProps("managedAttributes").name}
Expand Down
1 change: 1 addition & 0 deletions packages/dina-ui/intl/dina-ui-en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ export const DINAUI_MESSAGES_ENGLISH = {
field_name: "Name",
field_notPubliclyReleasableReason: "Not Publicly Releasable Reason",
field_organismRemarks: "Organism Remarks",
field_dwcVernacularName: "Vernacular Name",
field_organismsIndividualEntry: "Individual Organism Entry",
field_organismsIndividualEntry_tooltip:
"Leave this OFF to copy the same data for every Organism. Toggle ON to enter different data for each Organism.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,11 @@ const expected = {
name: "organism[0].remarks",
visible: false
},
{
defaultValue: undefined,
name: "organism[0].dwcVernacularName",
visible: false
},
{
defaultValue: undefined,
name: "organism[0].managedAttributes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface OrganismAttributes {
lifeStage?: string | null;
sex?: string | null;
remarks?: string | null;
dwcVernacularName?: string | null;
isTarget?: boolean | null;
determination?: Determination[] | null;
managedAttributes?: ManagedAttributeValues;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ export const MATERIAL_SAMPLE_FORM_LEGEND: FormLegendComponentInformation[] = [
{
id: "organism[0].remarks"
},
{
id: "organism[0].dwcVernacularName"
},
{
id: "organism[0].managedAttributes"
}
Expand Down

0 comments on commit 8dfb8f0

Please sign in to comment.