Add icon show last reply is from agent on conversation list #997
This commit is contained in:
parent
1b1deb9626
commit
bd87927576
2 changed files with 14 additions and 0 deletions
|
@ -78,6 +78,11 @@
|
||||||
font-size: $font-size-mini;
|
font-size: $font-size-mini;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.message-from-agent {
|
||||||
|
color: $color-gray;
|
||||||
|
font-size: $font-size-mini;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.conversation--meta {
|
.conversation--meta {
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
</span>
|
</span>
|
||||||
</h4>
|
</h4>
|
||||||
<p v-if="lastMessageInChat" class="conversation--message">
|
<p v-if="lastMessageInChat" class="conversation--message">
|
||||||
|
<i v-if="messageByAgent" class="ion-ios-undo message-from-agent"></i>
|
||||||
<span v-if="lastMessageInChat.content">
|
<span v-if="lastMessageInChat.content">
|
||||||
{{ lastMessageInChat.content }}
|
{{ lastMessageInChat.content }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -44,6 +45,8 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import { MESSAGE_TYPE } from 'widget/helpers/constants';
|
||||||
|
|
||||||
import Thumbnail from '../Thumbnail';
|
import Thumbnail from '../Thumbnail';
|
||||||
import conversationMixin from '../../../mixins/conversations';
|
import conversationMixin from '../../../mixins/conversations';
|
||||||
import timeMixin from '../../../mixins/time';
|
import timeMixin from '../../../mixins/time';
|
||||||
|
@ -115,6 +118,12 @@ export default {
|
||||||
lastMessageInChat() {
|
lastMessageInChat() {
|
||||||
return this.lastMessage(this.chat);
|
return this.lastMessage(this.chat);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
messageByAgent() {
|
||||||
|
const lastMessage = this.lastMessageInChat;
|
||||||
|
const { message_type: messageType } = lastMessage;
|
||||||
|
return messageType === MESSAGE_TYPE.OUTGOING;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in a new issue