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;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.message-from-agent {
|
||||
color: $color-gray;
|
||||
font-size: $font-size-mini;
|
||||
}
|
||||
}
|
||||
|
||||
.conversation--meta {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
</span>
|
||||
</h4>
|
||||
<p v-if="lastMessageInChat" class="conversation--message">
|
||||
<i v-if="messageByAgent" class="ion-ios-undo message-from-agent"></i>
|
||||
<span v-if="lastMessageInChat.content">
|
||||
{{ lastMessageInChat.content }}
|
||||
</span>
|
||||
|
@ -44,6 +45,8 @@
|
|||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MESSAGE_TYPE } from 'widget/helpers/constants';
|
||||
|
||||
import Thumbnail from '../Thumbnail';
|
||||
import conversationMixin from '../../../mixins/conversations';
|
||||
import timeMixin from '../../../mixins/time';
|
||||
|
@ -115,6 +118,12 @@ export default {
|
|||
lastMessageInChat() {
|
||||
return this.lastMessage(this.chat);
|
||||
},
|
||||
|
||||
messageByAgent() {
|
||||
const lastMessage = this.lastMessageInChat;
|
||||
const { message_type: messageType } = lastMessage;
|
||||
return messageType === MESSAGE_TYPE.OUTGOING;
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
Loading…
Reference in a new issue