diff --git a/app/javascript/dashboard/components-next/NewConversation/ComposeConversation.vue b/app/javascript/dashboard/components-next/NewConversation/ComposeConversation.vue index 485fe46a4..dbd34800a 100644 --- a/app/javascript/dashboard/components-next/NewConversation/ComposeConversation.vue +++ b/app/javascript/dashboard/components-next/NewConversation/ComposeConversation.vue @@ -104,6 +104,7 @@ const hasGroupInboxes = computed(() => groupCreationInboxes.value.length > 0); const isGroupsDisabled = computed( () => !globalConfig.value.baileysWhatsappGroupsEnabled ); +const isSuperAdmin = computed(() => currentUser.value.type === 'SuperAdmin'); const resetContacts = () => { contacts.value = []; @@ -475,6 +476,7 @@ useKeyboardEvents(keyboardEvents); :inboxes="groupCreationInboxes" :is-creating="groupUiFlags.isCreating" :is-groups-disabled="isGroupsDisabled" + :is-super-admin="isSuperAdmin" @create-group="createGroup" @discard="discardCompose" /> diff --git a/app/javascript/dashboard/components-next/NewConversation/components/ComposeNewGroupForm.vue b/app/javascript/dashboard/components-next/NewConversation/components/ComposeNewGroupForm.vue index beaedb8f0..93ae63901 100644 --- a/app/javascript/dashboard/components-next/NewConversation/components/ComposeNewGroupForm.vue +++ b/app/javascript/dashboard/components-next/NewConversation/components/ComposeNewGroupForm.vue @@ -13,6 +13,7 @@ const props = defineProps({ inboxes: { type: Array, default: () => [] }, isCreating: { type: Boolean, default: false }, isGroupsDisabled: { type: Boolean, default: false }, + isSuperAdmin: { type: Boolean, default: false }, }); const emit = defineEmits(['createGroup', 'discard']); @@ -169,7 +170,7 @@ defineExpose({ resetForm }); class="flex items-center gap-2 mx-4 mt-3 px-3 py-2 rounded-lg text-sm text-n-amber-11 bg-n-amber-2" > - + {{ t('GROUP.CREATE.GROUPS_DISABLED') }} + + {{ t('GROUP.CREATE.GROUPS_DISABLED_NON_ADMIN') }} +
+