Skip to content

Commit 5ee4045

Browse files
- FIX: Fixed missing rep import during setup via BrAPI.
- FIX: Fixed corner point map being broken on trait duplication. - FIX: Fixed wonky behavior on brapi program/trial/study selection.
1 parent 4a29004 commit 5ee4045

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

src/components/modals/TrialCreationFromBrapiModal.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
data[`${row}|${column}`] = {
180180
germplasm: c.germplasm,
181181
categories: c.categories || [],
182+
rep: c.rep,
182183
isMarked: false,
183184
brapiId: c.brapiId,
184185
measurements: {},

src/components/setup/CornerPointsMap.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@
358358
})
359359
360360
onMounted(() => {
361-
if (model.value?.corners) {
361+
if (model.value && model.value.corners && isGeographyValid(model.value.corners)) {
362362
corners.value = model.value.corners
363363
cornersEnabled.value = true
364364
} else {

src/components/util/BrapiStudySelect.vue

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,27 @@
131131
.catch(brapiDefaultCatchHandler)
132132
}
133133
134-
watch(program, async () => updateTrials(), { immediate: true })
135-
watch(trial, async () => updateStudyTypes(), { immediate: true })
136-
watch(studyType, async () => updateStudies(), { immediate: true })
134+
watch(program, async newValue => {
135+
trial.value = undefined
136+
study.value = undefined
137+
studyType.value = undefined
138+
if (newValue) {
139+
updateTrials()
140+
}
141+
}, { immediate: true })
142+
watch(trial, async newValue => {
143+
study.value = undefined
144+
studyType.value = undefined
145+
if (newValue) {
146+
updateStudyTypes()
147+
}
148+
}, { immediate: true })
149+
watch(studyType, async newValue => {
150+
study.value = undefined
151+
if (newValue) {
152+
updateStudies()
153+
}
154+
}, { immediate: true })
137155
138156
onMounted(() => {
139157
updatePrograms()

0 commit comments

Comments
 (0)