Conversation
…-1375 # Conflicts: # src/views/germplasm/GermplasmTable.vue
| <template> | ||
| <router-link v-if="this.germplasmUUID" v-bind:to="{name: 'germplasm-details', params: {programId: activeProgram.id, germplasmId: this.germplasmUUID}}"> | ||
| {{ this.germplasmGID }} | ||
| </router-link> |
There was a problem hiding this comment.
I'm wondering for this if it would be better to have the GID not be a link if UUID isn't provided, rather than not showing the GID at all?
I'm thinking that because from a user perspective it might be better to have a broken link rather than missing data in the case of a data error such as missing UUID.
There was a problem hiding this comment.
Good point, changed to be text in the case of no UUID
| v-bind:germplasmUUID="Pedigree.parsePedigreeString(germplasm.additionalInfo.pedigreeByUUID).femaleParent" | ||
| v-bind:germplasmGID="Pedigree.parsePedigreeString(germplasm.pedigree).femaleParent" | ||
| > </GermplasmLink> | ||
| <template v-if="Pedigree.parsePedigreeString(germplasm.pedigree).maleParent"> |
There was a problem hiding this comment.
In the GermplasmLink above you have the v-if directly in the component, but here you have it in a template. Is it possible to move this into the GermplasmLink for consistency?
There was a problem hiding this comment.
Right now I have the GermplasmLink as a one germplasm per link sort of thing rather than a more complicated component that includes multiple configurations of links. The v-if here is wrapped around the "/ " part of the pedigree since the slash and gid only show up if there is a male parent. I could add some sort of boolean to pass in but I would still need a boolean on the outside for the slash lest I make the Germplasm Link more complicated by adding the slash. So what I have now seems to be the simplest route?
There was a problem hiding this comment.
Ah gotcha, I missed the /. No need to change anything, thanks for the explanation!
| {{ props.row.data.additionalInfo.createdBy.userName }} | ||
| </b-table-column> | ||
| <b-table-column field="germplasmId" v-slot="props" :th-attrs="(column) => ({scope:'col'})"> | ||
| <b-table-column field="externalReferences" v-slot="props" :th-attrs="(column) => ({scope:'col'})"> |
There was a problem hiding this comment.
Wouldn't this field be something like showDetails?
There was a problem hiding this comment.
Based on discussion with Tim, confusion resolved by removing the field as it is unneeded here.
| v-bind:germplasmUUID="Pedigree.parsePedigreeString(germplasm.additionalInfo.pedigreeByUUID).femaleParent" | ||
| v-bind:germplasmGID="Pedigree.parsePedigreeString(germplasm.pedigree).femaleParent" | ||
| > </GermplasmLink> | ||
| <template v-if="Pedigree.parsePedigreeString(germplasm.pedigree).maleParent"> |
There was a problem hiding this comment.
Ah gotcha, I missed the /. No need to change anything, thanks for the explanation!
Description
Story: BI-1375 - Make GIDs clickable links
Added GermplasmLink.vue component for germplasm GID links
Updated GermplasmDetails.vue to make parent GIDs clickable links (but not the current germplasm GID as it would be redundant)
Updated GermplasmTable.vue to make all GIDs clickable links
Changed germplasmUUID in GermplasmDetails.vue to a computed property in order to enable load of new germplasm information on clicking a parent GID
Dependencies
bi-api/feature/BI-1375
Testing
Checklist: