-
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-1717 (View experiment: Details, Summary Stats, Actions) #316
Conversation
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.
Just a couple of minor changes
config.method = 'get'; | ||
config.programId = programId; | ||
config.experimentId = experimentId; | ||
config.params = {stats: true}; |
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.
It might be worth adding a parameter to this method for stats
instead of hard-coding it to true
. The parameter will need to be propagated up so that it can be set from the ExperimentDetails
component
src/breeding-insight/model/Trial.ts
Outdated
programName?: string; | ||
startDate?: string; | ||
trialPUI?: string; | ||
additionalInfo?: AdditionalInfo; |
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 of type any
to allow flexibility for future fields to be in the trial's additionalInfo
src/breeding-insight/model/Trial.ts
Outdated
|
||
} | ||
export class AdditionalInfo { | ||
createdDate?: string; | ||
defaultObservationLevel?: string; | ||
environmentsCount?: string; | ||
germplasmCount?: number; | ||
|
||
experimentNumber?: string; | ||
experimentType?: string; | ||
|
||
createdBy?: AdditionalInfoCreateBy; | ||
} | ||
|
||
export class AdditionalInfoCreateBy { | ||
userName?: string; | ||
userId?: 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.
These aren't needed if the additionalInfo
field is changed to be of type any
<!-- Per Shawn, remove this link in favor of wrapping the trial title in a link --> | ||
<!-- <router-link v-bind:to="{name: 'experiment-details', params: {programId: activeProgram.id, experimentId: BrAPIUtils.getBreedingInsightId(props.row.data.externalReferences,'/trials')}}">--> | ||
<!-- Details--> | ||
<!-- </router-link>--> |
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.
Sounds good. I think this commented code should be removed then.
// console.log("TO"); | ||
// console.log(to); | ||
// console.log("FROM"); | ||
// console.log(from); | ||
// console.log("next"); | ||
// console.log(next); |
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.
Can these lines be removed?
@@ -155,6 +161,7 @@ export default class GermplasmDetails extends GermplasmBase { | |||
private germplasmLoading: boolean = true; | |||
|
|||
mounted () { | |||
console.log("-------mount----------"); |
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.
Can this line be removed?
|
||
console.log(',.,,..,.,.,.,.,.,GERMPLASM ,.,,.,...,.,.,.,'); | ||
console.log(this.germplasm); | ||
|
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.
Can these lines be removed?
// contacts?: Array<Contact>; | ||
//datasetAuthorships?: Array<TrialNewRequestDatasetAuthorships>; |
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.
Remove the commented out fields if not needed
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.
@dmeidlin I think they are commented out because the Contact
and TrialNewRequestDatasetAuthorships
types aren't in the code base, but these fields are a part of the BrAPI Trial model. Are you ok with leaving them in there with this in mind?
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, np.
import {ExternalReferences} from "@/breeding-insight/brapi/model/externalReferences"; | ||
|
||
export class BrAPIUtils { | ||
static getBreedingInsightId(references: ExternalReferences, referenceSourcePath: string = ""): string | undefined { |
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.
Instead of typing the source as string with an empty string as default, would you mind making an ExternalReferenceSource enum and specify the arg as non-null?
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.
This method was copied from GermplasmUtils
. I think there are places in the code that don't specify a referenceSourcePath
parameter (because it's intended to just be breedinginsight.org
) hence why there is a default of an empty 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.
Ah, I see. I'm fine leaving it as is, then.
if (this.data && this.data.synonyms && this.data.synonyms.length > 0) { | ||
// Up to synonymsMaxLength synonyms will be shown before , ... cutoff | ||
const synonyms = this.data.synonyms.slice(0, Math.min(this.data.synonyms.length, synonymsMaxLength)).join(", "); | ||
console.log(synonyms); |
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 leftover console.log statement that needs to be deleted
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.
Removed
<a class="dropdown-item" | ||
v-on:click="downloadFile" | ||
> | ||
Download file | ||
</a> |
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.
There is a component @/components/experiments/ExperimentObservationsDownloadButton.vue
that can be used here for the Download link.
Description
Story: BI-1717 Sub-story of BI-1644 View experiment: Details, Summary Stats, Actions
Dependencies
bi-api: feature/BI-1716 branch
Testing
(See Acceptance Criteria in BI-1644)
Checklist: