diff --git a/src/breeding-insight/model/Trait.ts b/src/breeding-insight/model/Trait.ts index 24b7f7115..214f9ce8a 100644 --- a/src/breeding-insight/model/Trait.ts +++ b/src/breeding-insight/model/Trait.ts @@ -29,7 +29,6 @@ export class Trait { traitDescription?: string; method?: Method; scale?: Scale; - abbreviations?: Array; synonyms: string[] = []; mainAbbreviation?: string; active?: boolean; @@ -46,7 +45,6 @@ export class Trait { traitDescription?: string, method?: Method, scale?: Scale, - abbreviations?: Array, synonyms?: Array, active?: boolean, tags?: string[], @@ -74,7 +72,6 @@ export class Trait { } else { this.scale = new Scale(); } - this.abbreviations = abbreviations; if (synonyms){ this.synonyms = Array.from(synonyms); } @@ -92,7 +89,7 @@ export class Trait { static assign(trait: Trait): Trait { return new Trait(trait.id, trait.traitName, trait.observationVariableName, trait.programObservationLevel, trait.entity, trait.attribute, - trait.traitDescription, trait.method, trait.scale, trait.abbreviations, trait.synonyms, trait.active, trait.tags, trait.fullName, trait.isDup); + trait.traitDescription, trait.method, trait.scale, trait.synonyms, trait.active, trait.tags, trait.fullName, trait.isDup); } checkStringListEquals(list: string[] | undefined, otherList: string[] | undefined): boolean { @@ -114,7 +111,6 @@ export class Trait { (this.traitName === trait.traitName) && (this.observationVariableName === trait.observationVariableName) && (this.fullName === trait.fullName) && - (this.checkStringListEquals(this.abbreviations, trait.abbreviations)) && (this.checkStringListEquals(this.synonyms, trait.synonyms)) && (this.mainAbbreviation === trait.mainAbbreviation) && (this.entity === trait.entity) && diff --git a/src/breeding-insight/model/TraitSelector.ts b/src/breeding-insight/model/TraitSelector.ts index 259d7204f..9b651ac1b 100644 --- a/src/breeding-insight/model/TraitSelector.ts +++ b/src/breeding-insight/model/TraitSelector.ts @@ -1,6 +1,5 @@ export enum TraitField { NAME = 'name', - ABBREVIATIONS = 'abbreviations', MAIN_ABBREVIATION = 'mainAbbreviation', SYNONYMS = 'synonyms', LEVEL = 'level', diff --git a/src/components/trait/TraitDetailPanel.vue b/src/components/trait/TraitDetailPanel.vue index 03aeac707..72e0365f3 100644 --- a/src/components/trait/TraitDetailPanel.vue +++ b/src/components/trait/TraitDetailPanel.vue @@ -281,9 +281,7 @@ abbreviationsSynonymsString(synonymsMaxLength: number) : string | undefined { let abbSyn = ""; - if (this.data && this.data.abbreviations && this.data.abbreviations.length > 0) { - abbSyn = this.data.abbreviations[0]; - } + if (this.data && this.data.synonyms && this.data.synonyms.length > 0) { // Up to synonymsMaxLength synonyms will be shown before , ... cutoff const synonyms = this.data.synonyms.slice(0, Math.min(this.data.synonyms.length, synonymsMaxLength)).join(", "); diff --git a/src/components/trials/forms/BaseStudyForm.vue b/src/components/trials/forms/BaseStudyForm.vue index 15a65e5b2..25af2660a 100644 --- a/src/components/trials/forms/BaseStudyForm.vue +++ b/src/components/trials/forms/BaseStudyForm.vue @@ -272,9 +272,8 @@ export default class BaseTraitForm extends Vue { } setAbbreviations(value: string) { const abbreviations = this.parseSemiColonList(value); - this.trait.abbreviations = abbreviations; - if (abbreviations.length > 0) {this.trait.mainAbbreviation = this.trait.abbreviations[0]} } + parseSemiColonList(value: string): string[] { return value.split(';'); } diff --git a/src/views/trait/TraitsImport.vue b/src/views/trait/TraitsImport.vue index 0bbd1d75b..815a07ec7 100644 --- a/src/views/trait/TraitsImport.vue +++ b/src/views/trait/TraitsImport.vue @@ -48,7 +48,7 @@