Skip to content

Commit

Permalink
[BI-677] fix scales sending on PUT
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris T committed Feb 10, 2021
1 parent 28a1288 commit ea76370
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/trait/forms/BaseTraitForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<template v-if="trait.scale && (Scale.dataTypeEquals(trait.scale.dataType, DataType.Ordinal) || Scale.dataTypeEquals(trait.scale.dataType, DataType.Nominal))">
<CategoryTraitForm
v-bind:data="trait.scale.categories"
v-on:update="trait.scale.categories = $event"
v-on:update="setCategories($event)"
v-bind:type="trait.scale.dataType"
v-bind:validation-handler="validationHandler"
v-bind:validation-index="0"
Expand Down Expand Up @@ -155,6 +155,7 @@ import {TraitError} from "@/breeding-insight/model/errors/TraitError";
import {ValidationError} from "@/breeding-insight/model/errors/ValidationError";
import AutoCompleteField from "@/components/forms/AutoCompleteField.vue";
import { StringFormatters } from '@/breeding-insight/utils/StringFormatters';
import {Category} from "@/breeding-insight/model/Category";
@Component({
components: {
Expand Down Expand Up @@ -273,6 +274,11 @@ export default class BaseTraitForm extends Vue {
}
setCategories(categories: Category[]) {
this.trait.scale!.categories = categories;
this.emitTrait(this.trait);
}
setObservationLevel(value: string) {
this.trait!.programObservationLevel = new ProgramObservationLevel(value);
}
Expand Down

0 comments on commit ea76370

Please sign in to comment.