Skip to content

Commit

Permalink
- CHG: Added germplasm display name based on new database field.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-raubach committed Sep 5, 2024
1 parent fa5f2b3 commit d41e643
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/germplasm/SpecificPassport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ export default {
if (this.germplasmTableData) {
const parts = []
parts.push(this.germplasmTableData.germplasmName)
parts.push(this.germplasmTableData.germplasmDisplayName)
parts.push(this.germplasmTableData.germplasmNumber)
return parts.filter(p => p !== null).join(' / ')
Expand Down
9 changes: 9 additions & 0 deletions src/components/tables/GermplasmTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
<template v-slot:cell(germplasmName)="data">
<router-link :to="{ name: Pages.passport, params: { germplasmId: data.item.germplasmId } }">{{ data.item.germplasmName }}</router-link>
</template>
<!-- Germplasm display name link -->
<template v-slot:cell(germplasmDisplayName)="data">
<router-link :to="{ name: Pages.passport, params: { germplasmId: data.item.germplasmId } }">{{ data.item.germplasmDisplayName }}</router-link>
</template>
<!-- Germplasm GID link -->
<template v-slot:cell(germplasmGid)="data">
<router-link :to="{ name: Pages.passport, params: { germplasmId: data.item.germplasmId } }">{{ data.item.germplasmGid }}</router-link>
Expand Down Expand Up @@ -288,6 +292,11 @@ export default {
sortable: true,
label: this.$t('tableColumnGermplasmName'),
preferredSortingColumn: true
}, {
key: 'germplasmDisplayName',
type: String,
sortable: true,
label: this.$t('tableColumnGermplasmDisplayName')
}, {
key: 'germplasmGid',
type: String,
Expand Down
3 changes: 3 additions & 0 deletions src/const/database-columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ export default {
}, {
name: 'germplasmName',
type: String
}, {
name: 'germplasmDisplayName',
type: String
}, {
name: 'germplasmGid',
type: String
Expand Down
1 change: 1 addition & 0 deletions src/plugins/i18n/en_GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,7 @@
"tableColumnGermplasmImageCount": "Images",
"tableColumnGermplasmLocation": "Location",
"tableColumnGermplasmName": "Germplasm name",
"tableColumnGermplasmDisplayName": "Display name",
"tableColumnGermplasmNumber": "Number",
"tableColumnGermplasmPuid": "PUID",
"tableColumnGroupCount": "Group members",
Expand Down

0 comments on commit d41e643

Please sign in to comment.