Skip to content
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

Merged
merged 15 commits into from
Jul 27, 2021

Conversation

dmeidlin
Copy link
Contributor

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.

@nickpalladino
Copy link
Member

Hey @dmeidlin could you merge 750 and rebase this PR to make it easier to review?

Copy link
Member

@timparsons timparsons left a 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;
Copy link
Member

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

Copy link
Contributor Author

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;
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Done.

Comment on lines 38 to 78
<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>
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx. done.

Comment on lines 83 to 84
v-bind:editable="$ability.can('update', 'Observation')"
v-bind:archivable="$ability.can('archive', 'Observation')"
Copy link
Member

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 😄 )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx. done.

Comment on lines 142 to 143
Observations are used to create studies.<br>
You can add, edit, and delete observations from this panel.
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Copy link
Member

@nickpalladino nickpalladino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried running with some observation data from the discrete analyzer import and am getting an error. It looks like observations are being returned from the api call but there was some kind of issue displaying them
Screenshot from 2021-07-12 11-05-37

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 }
Copy link
Member

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?

Copy link
Contributor Author

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.

@dmeidlin dmeidlin merged commit 3918173 into develop Jul 27, 2021
@dmeidlin dmeidlin deleted the feature/BI-751 branch July 27, 2021 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants