From f0cd31bf2c0e4e98a922d22435abbe985260826e Mon Sep 17 00:00:00 2001 From: Chris T Date: Fri, 25 Feb 2022 12:57:03 -0500 Subject: [PATCH] [BI-1372] trait tables: fix trait sorting --- src/breeding-insight/model/Sort.ts | 2 +- src/components/ontology/OntologyTable.vue | 4 ++-- src/components/trait/TraitsImportTable.vue | 13 ++++++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/breeding-insight/model/Sort.ts b/src/breeding-insight/model/Sort.ts index 7be1b9770..4a4da0197 100644 --- a/src/breeding-insight/model/Sort.ts +++ b/src/breeding-insight/model/Sort.ts @@ -47,7 +47,7 @@ export enum OntologySortField { MethodDescription = 'methodDescription', ScaleClass = 'scaleClass', ScaleName = 'scaleName', - TraitDescription = 'traitDescription' + entityAttributeSortLabel = 'entityAttribute' } export class OntologySort { diff --git a/src/components/ontology/OntologyTable.vue b/src/components/ontology/OntologyTable.vue index 9a6078814..6b31081dd 100644 --- a/src/components/ontology/OntologyTable.vue +++ b/src/components/ontology/OntologyTable.vue @@ -142,7 +142,7 @@ v-bind:label="'Trait'" v-bind:visible="!traitSidePanelState.collapseColumns" v-bind:sortField="ontologySort.field" - v-bind:sortFieldLabel="traitDescriptionSortLabel" + v-bind:sortFieldLabel="entityAttributeSortLabel" v-bind:sortable="true" v-bind:sortOrder="ontologySort.order" v-on:newSortColumn="$emit('newSortColumn', $event)" @@ -323,7 +323,7 @@ export default class OntologyTable extends Vue { private methodSortLabel: string = OntologySortField.MethodDescription; private scaleClassSortLabel: string = OntologySortField.ScaleClass; private unitSortLabel: string = OntologySortField.ScaleName; - private traitDescriptionSortLabel: string = OntologySortField.TraitDescription; + private entityAttributeSortLabel: string = OntologySortField.entityAttributeSortLabel; // New trait form private newTraitActive: boolean = false; diff --git a/src/components/trait/TraitsImportTable.vue b/src/components/trait/TraitsImportTable.vue index 21434e178..7456e4d44 100644 --- a/src/components/trait/TraitsImportTable.vue +++ b/src/components/trait/TraitsImportTable.vue @@ -54,7 +54,17 @@ {{ data.observationVariableName }} - + {{ data.entity | capitalize }} {{ data.attribute | capitalize }}