feat(inboxes): add inbox disable toggle
This commit is contained in:
@@ -170,8 +170,14 @@ export default {
|
||||
instagramInbox
|
||||
);
|
||||
},
|
||||
isInboxDisabled() {
|
||||
return this.inbox.active === false;
|
||||
},
|
||||
|
||||
replyWindowBannerMessage() {
|
||||
if (this.isInboxDisabled) {
|
||||
return this.$t('CONVERSATION.INBOX_DISABLED');
|
||||
}
|
||||
if (this.isAWhatsAppChannel) {
|
||||
return this.$t('CONVERSATION.TWILIO_WHATSAPP_CAN_REPLY');
|
||||
}
|
||||
@@ -194,6 +200,9 @@ export default {
|
||||
return this.$t('CONVERSATION.CANNOT_REPLY');
|
||||
},
|
||||
replyWindowLink() {
|
||||
if (this.isInboxDisabled) {
|
||||
return '';
|
||||
}
|
||||
if (this.isAFacebookInbox || this.isAnInstagramChannel) {
|
||||
return REPLY_POLICY.FACEBOOK;
|
||||
}
|
||||
@@ -209,6 +218,9 @@ export default {
|
||||
return '';
|
||||
},
|
||||
replyWindowLinkText() {
|
||||
if (this.isInboxDisabled) {
|
||||
return '';
|
||||
}
|
||||
if (
|
||||
this.isAWhatsAppChannel ||
|
||||
this.isAFacebookInbox ||
|
||||
@@ -455,7 +467,7 @@ export default {
|
||||
>
|
||||
<div ref="topBannerRef">
|
||||
<Banner
|
||||
v-if="!currentChat.can_reply"
|
||||
v-if="isInboxDisabled || !currentChat.can_reply"
|
||||
color-scheme="alert"
|
||||
class="mx-2 mt-2 overflow-hidden rounded-lg"
|
||||
:banner-message="replyWindowBannerMessage"
|
||||
|
||||
@@ -208,6 +208,9 @@ export default {
|
||||
},
|
||||
messagePlaceHolder() {
|
||||
if (this.isEditorDisabled) {
|
||||
if (this.inbox.active === false) {
|
||||
return this.$t('CONVERSATION.FOOTER.MESSAGING_RESTRICTED_INBOX');
|
||||
}
|
||||
if (this.isAWhatsAppChannel) {
|
||||
return this.$t('CONVERSATION.FOOTER.MESSAGING_RESTRICTED_WHATSAPP');
|
||||
}
|
||||
@@ -438,6 +441,10 @@ export default {
|
||||
return !this.showAudioRecorderEditor && !this.copilot.isActive.value;
|
||||
},
|
||||
isEditorDisabled() {
|
||||
if (this.inbox.active === false) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (
|
||||
(this.isAWhatsAppChannel || this.isAPIInbox) &&
|
||||
!this.isOnPrivateNote &&
|
||||
|
||||
Reference in New Issue
Block a user