diff --git a/.env.development b/.env.development index 9fabf4eb6..873a8c7dc 100644 --- a/.env.development +++ b/.env.development @@ -14,4 +14,4 @@ VUE_APP_BI_API_ROOT=${API_BASE_URL} VUE_APP_LOG_LEVEL=${WEB_LOG_LEVEL} # The reference source -VUE_APP_BI_REFERENCE_SOURCE=breedinginsight.org +VUE_APP_BI_REFERENCE_SOURCE=${BRAPI_REFERENCE_SOURCE} diff --git a/src/components/germplasm/GermplasmLink.vue b/src/components/germplasm/GermplasmLink.vue new file mode 100644 index 000000000..a2ad619ed --- /dev/null +++ b/src/components/germplasm/GermplasmLink.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/src/views/germplasm/GermplasmDetails.vue b/src/views/germplasm/GermplasmDetails.vue index cc65b6bd5..84450ff07 100644 --- a/src/views/germplasm/GermplasmDetails.vue +++ b/src/views/germplasm/GermplasmDetails.vue @@ -35,7 +35,18 @@
  • Breeding Method: {{ germplasm.additionalInfo.breedingMethod }}
  • Source: {{ germplasm.seedSource }}
  • Pedigree: {{ germplasm.additionalInfo.pedigreeByName }}
  • -
  • Pedigree GID(s): {{ germplasm.pedigree }}
  • +
  • Pedigree GID(s): + + +
  • @@ -93,29 +104,35 @@ import {Program} from "@/breeding-insight/model/Program"; import GermplasmBase from "@/components/germplasm/GermplasmBase.vue"; import {Germplasm} from "@/breeding-insight/brapi/model/germplasm"; import {GermplasmService} from "@/breeding-insight/service/GermplasmService"; +import GermplasmLink from '@/components/germplasm/GermplasmLink.vue' +import {Pedigree} from "@/breeding-insight/model/import/germplasm/Pedigree"; import {GermplasmUtils} from '@/breeding-insight/utils/GermplasmUtils'; import { Result } from '@/breeding-insight/model/Result'; @Component({ - components: {}, + components: {GermplasmLink}, computed: { ...mapGetters([ 'activeProgram' ]) }, - data: () => ({GermplasmUtils}) + data: () => ({Pedigree, GermplasmUtils}) }) export default class GermplasmDetails extends GermplasmBase { private activeProgram?: Program; private germplasm?: Germplasm; private germplasmLoading: boolean = true; - private germplasmUUID: string = this.$route.params.germplasmId; mounted() { this.getGermplasm(); } + get germplasmUUID(): string { + return this.$route.params.germplasmId; + } + + @Watch('$route') async getGermplasm() { this.germplasmLoading = true; try { diff --git a/src/views/germplasm/GermplasmTable.vue b/src/views/germplasm/GermplasmTable.vue index 8c7d0f771..5da9e05aa 100644 --- a/src/views/germplasm/GermplasmTable.vue +++ b/src/views/germplasm/GermplasmTable.vue @@ -14,7 +14,11 @@ v-on:sort="paginationController.updateSort($event)" > - {{ props.row.data.accessionNumber }} + + {{ props.row.data.defaultDisplayName }} @@ -26,10 +30,16 @@ {{ props.row.data.seedSource }} - {{ Pedigree.parsePedigreeString(props.row.data.pedigree).femaleParent }} + - {{ Pedigree.parsePedigreeString(props.row.data.pedigree).maleParent }} + {{ props.row.data.additionalInfo.createdDate }} @@ -37,7 +47,7 @@ {{ props.row.data.additionalInfo.createdBy.userName }} - + Show Details @@ -68,11 +78,12 @@ import {Pagination} from "@/breeding-insight/model/BiResponse"; import ExpandableTable from "@/components/tables/expandableTable/ExpandableTable.vue"; import {PaginationController} from "@/breeding-insight/model/view_models/PaginationController"; import {Pedigree} from "@/breeding-insight/model/import/germplasm/Pedigree"; +import GermplasmLink from '@/components/germplasm/GermplasmLink.vue' import {GermplasmUtils} from '@/breeding-insight/utils/GermplasmUtils'; @Component({ mixins: [validationMixin], - components: {ReportTable, ExpandableTable}, + components: {GermplasmLink, ReportTable, ExpandableTable}, computed: { ...mapGetters([ 'activeProgram' diff --git a/vue.config.js b/vue.config.js index 4b8e01e9c..5ab020f8e 100644 --- a/vue.config.js +++ b/vue.config.js @@ -26,6 +26,7 @@ process.env.VUE_APP_BI_API_ROOT = process.env.VUE_APP_BI_API_ROOT || "http://loc process.env.VUE_APP_OPENID_LOGOUT_URL = process.env.VUE_APP_OPENID_LOGOUT_URL || "https://sandbox.orcid.org/userStatus.json?logUserOut=true"; process.env.VUE_APP_BI_API_V1_PATH = process.env.VUE_APP_BI_API_ROOT + "/v1"; process.env.VUE_APP_LOG_LEVEL = process.env.VUE_APP_LOG_LEVEL || 'error'; +process.env.VUE_APP_BI_REFERENCE_SOURCE = process.env.VUE_APP_BI_REFERENCE_SOURCE || 'breedinginsight.org'; module.exports = { devServer: {