feat: Add a pre-chat form on widget (#1769)

This commit is contained in:
Pranav Raj S
2021-02-16 00:14:13 +05:30
committed by GitHub
parent 5f2bf7dfd2
commit 037ffc7419
31 changed files with 604 additions and 200 deletions

View File

@@ -24,6 +24,16 @@ export default {
replyTime() {
return window.chatwootWebChannel.replyTime;
},
preChatFormEnabled() {
return window.chatwootWebChannel.preChatFormEnabled;
},
preChatFormOptions() {
const options = window.chatwootWebChannel.preChatFormOptions || {};
return {
requireEmail: options.require_email,
preChatMessage: options.pre_chat_message,
};
},
replyTimeStatus() {
switch (this.replyTime) {
case 'in_a_few_minutes':