feat: Use display_name instead of name of the agent (#1097)
* feat: Use display_name instead of name of the agent
This commit is contained in:
@@ -58,12 +58,12 @@
|
||||
<div class="current-user" @click.prevent="showOptions()">
|
||||
<thumbnail
|
||||
:src="currentUser.avatar_url"
|
||||
:username="currentUser.name"
|
||||
:username="currentUserAvailableName"
|
||||
:status="currentUser.availability_status"
|
||||
/>
|
||||
<div class="current-user--data">
|
||||
<h3 class="current-user--name">
|
||||
{{ currentUser.name }}
|
||||
{{ currentUserAvailableName }}
|
||||
</h3>
|
||||
<h5 class="current-user--role">
|
||||
{{ currentRole }}
|
||||
@@ -202,6 +202,10 @@ export default {
|
||||
uiFlags: 'agents/getUIFlags',
|
||||
accountLabels: 'labels/getLabelsOnSidebar',
|
||||
}),
|
||||
currentUserAvailableName() {
|
||||
const { available_name: availableName } = this.currentUser;
|
||||
return availableName;
|
||||
},
|
||||
showChangeAccountOption() {
|
||||
if (this.globalConfig.createNewAccountFromDashboard) {
|
||||
return true;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<multiselect
|
||||
v-model="currentChat.meta.assignee"
|
||||
:options="agentList"
|
||||
label="name"
|
||||
label="available_name"
|
||||
:allow-empty="true"
|
||||
deselect-label="Remove"
|
||||
placeholder="Select Agent"
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
return [
|
||||
{
|
||||
confirmed: true,
|
||||
name: 'None',
|
||||
available_name: 'None',
|
||||
id: 0,
|
||||
role: 'agent',
|
||||
account_id: 0,
|
||||
|
||||
@@ -95,10 +95,13 @@ export default {
|
||||
: false;
|
||||
},
|
||||
sentByMessage() {
|
||||
return this.data.message_type === 1 &&
|
||||
!this.isHovered &&
|
||||
this.data.sender !== undefined
|
||||
? { content: `Sent by: ${this.data.sender.name}`, classes: 'top' }
|
||||
const { sender } = this.data;
|
||||
|
||||
return this.data.message_type === 1 && !this.isHovered && sender
|
||||
? {
|
||||
content: `Sent by: ${sender.available_name || sender.name}`,
|
||||
classes: 'top',
|
||||
}
|
||||
: false;
|
||||
},
|
||||
wrapClass() {
|
||||
|
||||
Reference in New Issue
Block a user