From 4c6e0289d4410b98ca2a2cbf2e1f0ac3e00f4605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Castro?= <36093456+Scroody@users.noreply.github.com> Date: Wed, 17 Jul 2024 14:39:09 -0300 Subject: [PATCH] Fix: [2.7] Breakout room invitation option missing from user dropdown (#20691) * Fix: [2.7] Breakout room invitation option missing from user dropdown * removing unnecessary code * Translation key re-name * modal Change --- .../user-options/component.jsx | 21 +++++++++++++++++-- bigbluebutton-html5/public/locales/en.json | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-options/component.jsx b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-options/component.jsx index 314ec1f936..2ba5eb10e5 100755 --- a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-options/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-options/component.jsx @@ -133,7 +133,11 @@ const intlMessages = defineMessages({ newTab: { id: 'app.modal.newTab', description: 'label used in aria description', - } + }, + invitationLabel: { + id: 'app.userList.userOptions.breakoutRoomInvitationLabel', + description: 'Invitation item', + }, }); const USER_STATUS_ENABLED = Meteor.settings.public.userStatus.enabled; @@ -226,6 +230,10 @@ class UserOptions extends PureComponent { && !hasBreakoutRoom && isBreakoutRoomsEnabled(); + const canInviteUsers = amIModerator + && !meetingIsBreakout + && hasBreakoutRoom + const { locale } = intl; this.menuItems = []; @@ -318,6 +326,15 @@ class UserOptions extends PureComponent { }); } + if (canInviteUsers && isMeteorConnected) { + this.menuItems.push({ + key: this.createBreakoutId, + icon: 'rooms', + label: intl.formatMessage(intlMessages.invitationLabel), + onClick: this.onInvitationUsers, + dataTest: 'inviteBreakoutRooms', + }) +} if (amIModerator && CaptionsService.isCaptionsEnabled()) { this.menuItems.push({ icon: 'closed_caption', @@ -413,7 +430,7 @@ class UserOptions extends PureComponent { }} /> {this.renderModal(isCreateBreakoutRoomModalOpen, this.setCreateBreakoutRoomModalIsOpen, "medium", - CreateBreakoutRoomContainer, {isBreakoutRecordable, isInvitation})} + CreateBreakoutRoomContainer, {isBreakoutRecordable, isInvitation, isUpdate: isInvitation})} {this.renderModal(isGuestPolicyModalOpen, this.setGuestPolicyModalIsOpen, "low", GuestPolicyContainer)} {this.renderModal(isWriterMenuModalOpen, this.setWriterMenuModalIsOpen, "low", diff --git a/bigbluebutton-html5/public/locales/en.json b/bigbluebutton-html5/public/locales/en.json index daa23288f9..3ae55d14e7 100755 --- a/bigbluebutton-html5/public/locales/en.json +++ b/bigbluebutton-html5/public/locales/en.json @@ -177,6 +177,7 @@ "app.userList.userOptions.clearAllLabel": "Clear all status icons", "app.userList.userOptions.clearAllDesc": "Clears all status icons from users", "app.userList.userOptions.clearAllReactionsLabel": "Clear all reactions", + "app.userList.userOptions.breakoutRoomInvitationLabel": "Breakout room invitation", "app.userList.userOptions.clearAllReactionsDesc": "Clears all reaction emojis from users", "app.userList.userOptions.muteAllExceptPresenterLabel": "Mute all users except presenter", "app.userList.userOptions.muteAllExceptPresenterDesc": "Mutes all users in the meeting except the presenter",