-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BI-751 Create an interface to view an individual study and any observation data that’s been collected #96
Conversation
Hey @dmeidlin could you merge 750 and rebase this PR to make it easier to review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor things, but looks good!
studyId?: string; | ||
germplasmId?: string; | ||
observationUnitId?: string; | ||
traitId?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be named observationVariableId
or variableId
to be in line with BrAPI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that makes sense: made the change.
traitId?: string; | ||
germplasmName?: string; | ||
observationUnitName?: string; | ||
traitName?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be named observationVariableName
or variableName
to be in line with BrAPI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Done.
<button | ||
v-if="$ability.can('create', 'Observation')" | ||
data-testid="newDataForm" | ||
v-show="!newObservationActive & observations.length > 0" | ||
class="button is-primary has-text-weight-bold is-pulled-right" | ||
v-on:click="newObservationActive = true" | ||
> | ||
<span class="icon is-small"> | ||
<PlusCircleIcon | ||
size="1.5x" | ||
aria-hidden="true" | ||
/> | ||
</span> | ||
<span> | ||
New Observation | ||
</span> | ||
</button> | ||
|
||
<NewDataForm | ||
v-if="newObservationActive" | ||
v-bind:row-validations="observationValidations" | ||
v-bind:new-record.sync="newObservation" | ||
v-bind:data-form-state="newObservationFormState" | ||
v-on:submit="saveObservation" | ||
v-on:cancel="cancelObservation" | ||
v-on:show-error-notification="$emit('show-error-notification', $event)" | ||
> | ||
<template v-slot="validations"> | ||
<div class="columns"> | ||
<div class="column is-two-fifths"> | ||
<BasicInputField | ||
v-model="newObservation.name" | ||
v-bind:validations="validations.name" | ||
v-bind:field-name="'Name'" | ||
v-bind:field-help="'Observation name as preferred. All Unicode special characters accepted.'" | ||
:placeholder="'New Observation Name'" | ||
/> | ||
</div> | ||
</div> | ||
</template> | ||
</NewDataForm> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be removed or commented out for this story
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx. done.
v-bind:editable="$ability.can('update', 'Observation')" | ||
v-bind:archivable="$ability.can('archive', 'Observation')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for this story, these can both be set to 'false' (or don't add that ability and it'll do the same thing 😄 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx. done.
Observations are used to create studies.<br> | ||
You can add, edit, and delete observations from this panel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should display as of now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { data } = await api.call({ | ||
url: `${process.env.VUE_APP_BI_API_V1_PATH}/programs/${programId}/brapi/v2/observations`, | ||
method: 'get', | ||
params: { full, studyDbId: studyId } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is full used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a check in the observation service for null values for season that should fix this.
models and dao necessary for getting observationLevel value for an observation are in place. The changes needed in the ObservationService to pull the level value for each observation are left as a TODO.