feat: Add ability to create a new conversation if the previous conversation is resolved (#2512)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Muhsin Keloth
2021-06-30 21:09:44 +05:30
committed by GitHub
parent e6e9916fdb
commit f0f66c7da6
13 changed files with 119 additions and 16 deletions

View File

@@ -113,7 +113,11 @@ export default {
},
},
data() {
return { isOnCollapsedView: false, showAttachmentError: false };
return {
isOnCollapsedView: false,
showAttachmentError: false,
isOnNewConversation: false,
};
},
computed: {
...mapGetters({
@@ -130,7 +134,10 @@ export default {
if (this.conversationSize) {
return 'messageView';
}
if (this.preChatFormEnabled && !currentUserEmail) {
if (
this.isOnNewConversation ||
(this.preChatFormEnabled && !currentUserEmail)
) {
return 'preChatFormView';
}
return 'messageView';
@@ -163,6 +170,10 @@ export default {
this.showAttachmentError = false;
}, 3000);
});
bus.$on(BUS_EVENTS.START_NEW_CONVERSATION, () => {
this.isOnCollapsedView = true;
this.isOnNewConversation = true;
});
},
methods: {
startConversation() {