feat(inboxes): add inbox disable toggle

This commit is contained in:
Muhsin
2026-06-09 21:07:05 +04:00
parent 8a3b129292
commit cbd24dbdb2
49 changed files with 239 additions and 19 deletions
@@ -139,9 +139,19 @@ const openDelete = inbox => {
<ChannelIcon class="size-6 text-n-slate-10" :inbox="inbox" />
</div>
<div class="flex flex-col items-start gap-1">
<span class="block text-heading-3 text-n-slate-12 capitalize">
{{ inbox.name }}
</span>
<div class="flex items-center gap-2 min-w-0">
<span
class="block text-heading-3 text-n-slate-12 capitalize truncate"
>
{{ inbox.name }}
</span>
<span
v-if="inbox.active === false"
class="shrink-0 rounded-md bg-n-ruby-3 px-1.5 py-0.5 text-xs font-medium text-n-ruby-11"
>
{{ $t('INBOX_MGMT.DISABLED') }}
</span>
</div>
<ChannelName
:channel-type="inbox.channel_type"
:medium="inbox.medium"
@@ -91,6 +91,7 @@ export default {
senderNameType: 'friendly',
businessName: '',
locktoSingleConversation: false,
inboxActive: true,
allowMessagesAfterResolved: true,
continuityViaEmail: true,
selectedInboxName: '',
@@ -470,6 +471,7 @@ export default {
this.businessName = this.inbox.business_name;
this.allowMessagesAfterResolved =
this.inbox.allow_messages_after_resolved;
this.inboxActive = this.inbox.active !== false;
this.continuityViaEmail = this.inbox.continuity_via_email;
this.channelWebsiteUrl = this.inbox.website_url;
this.channelWelcomeTitle = this.inbox.welcome_title;
@@ -581,6 +583,7 @@ export default {
const payload = {
id: this.currentInboxId,
name: this.selectedInboxName?.trim(),
active: this.inboxActive,
enable_email_collect: this.emailCollectEnabled,
allow_messages_after_resolved: this.allowMessagesAfterResolved,
greeting_enabled: this.greetingEnabled,
@@ -819,6 +822,15 @@ export default {
/>
</SettingsFieldSection>
<SettingsToggleSection
v-model="inboxActive"
:header="$t('INBOX_MGMT.SETTINGS_POPUP.INBOX_ACTIVE.TITLE')"
:description="
$t('INBOX_MGMT.SETTINGS_POPUP.INBOX_ACTIVE.DESCRIPTION')
"
class="mb-4"
/>
<SettingsFieldSection
v-if="isAWebWidgetInbox"
:label="$t('INBOX_MGMT.ADD.WEBSITE_CHANNEL.CHANNEL_DOMAIN.LABEL')"