Skip to content

Commit

Permalink
Merge pull request #3689 from DeNic0la/reuse-display-name-function-#3501
Browse files Browse the repository at this point in the history
reuse campCollaborationDisplayName according to comment in #3501
  • Loading branch information
usu authored Aug 14, 2023
2 parents 95fa58a + 1c3f097 commit f6ebbbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions frontend/src/components/collaborator/CollaboratorEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ import PromptCollaboratorDeactivate from '@/components/collaborator/PromptCollab
import { errorToMultiLineToast } from '@/components/toast/toasts.js'
import CollaboratorListItem from '@/components/collaborator/CollaboratorListItem.vue'
import PromptEntityDelete from '@/components/prompt/PromptEntityDelete.vue'
import campCollaborationDisplayName from '../../../../common/helpers/campCollaborationDisplayName'
export default {
name: 'CollaboratorEdit',
Expand Down Expand Up @@ -179,9 +180,7 @@ export default {
return this.$store.state.auth.user?.id === this.collaborator.user().id
},
name() {
return this.collaborator.user
? this.collaborator.user().displayName
: this.collaborator.inviteEmail
return campCollaborationDisplayName(this.collaborator, this.$tc.bind(this), false)
},
},
watch: {
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/components/collaborator/CollaboratorListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<script>
import UserAvatar from '@/components/user/UserAvatar.vue'
import ButtonEdit from '@/components/buttons/ButtonEdit.vue'
import campCollaborationDisplayName from '../../../../common/helpers/campCollaborationDisplayName'
export default {
name: 'CollaboratorListItem',
Expand Down Expand Up @@ -73,9 +74,7 @@ export default {
}),
computed: {
name() {
return this.collaborator.user
? this.collaborator.user().displayName
: this.collaborator.inviteEmail
return campCollaborationDisplayName(this.collaborator, this.$tc.bind(this), false)
},
},
}
Expand Down

0 comments on commit f6ebbbf

Please sign in to comment.