Skip to content

Commit 0763390

Browse files
authored
fix(organizations): use correct teams MMO label in invite feature TASK-1644 (#5561)
### 📣 Summary Fixes an issue where UI text did not use proper MMO label for teams/organizations on the Members page and invite initiation modal.
1 parent 79219c2 commit 0763390

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

jsapp/js/account/organization/InviteModal.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ import { OrganizationUserRole } from './organizationQuery'
88
import userExistence from 'js/users/userExistence.store'
99
import { useField } from '@mantine/form'
1010
import { checkEmailPattern, notify } from 'js/utils'
11+
import envStore from 'jsapp/js/envStore'
12+
import subscriptionStore from 'jsapp/js/account/subscriptionStore'
13+
import { getSimpleMMOLabel } from 'js/account/organization/organization.utils'
1114

1215
export default function InviteModal(props: ModalProps) {
1316
const inviteQuery = useSendMemberInvite()
17+
const mmoLabel = getSimpleMMOLabel(envStore.data, subscriptionStore.activeSubscriptions[0])
1418

1519
const [role, setRole] = useState<string | null>(null)
1620

@@ -68,8 +72,8 @@ export default function InviteModal(props: ModalProps) {
6872
<Stack>
6973
<Text>
7074
{t(
71-
'Enter the username or email address of the person you wish to invite to your team. They will receive an invitation in their inbox.',
72-
)}
75+
'Enter the username or email address of the person you wish to invite to your ##TEAM_OR_ORGANIZATION##. They will receive an invitation in their inbox.',
76+
).replace('##TEAM_OR_ORGANIZATION##', mmoLabel)}
7377
</Text>
7478
<Group align={'flex-start'} w='100%' gap='xs'>
7579
<TextInput

jsapp/js/account/organization/MembersRoute.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ import { Divider, Group, Stack, Text, Title, Box } from '@mantine/core'
1313
import InviteModal from 'js/account/organization/InviteModal'
1414

1515
// Stores, hooks and utilities
16+
import envStore from 'jsapp/js/envStore'
17+
import subscriptionStore from 'jsapp/js/account/subscriptionStore'
1618
import { formatDate } from 'js/utils'
19+
import { getSimpleMMOLabel } from 'js/account/organization/organization.utils'
1720
import { OrganizationUserRole, useOrganizationQuery } from './organizationQuery'
1821
import useOrganizationMembersQuery from './membersQuery'
1922
import { useDisclosure } from '@mantine/hooks'
@@ -30,6 +33,7 @@ import InviteeActionsDropdown from './InviteeActionsDropdown'
3033
export default function MembersRoute() {
3134
const orgQuery = useOrganizationQuery()
3235
const [opened, { open, close }] = useDisclosure(false)
36+
const mmoLabel = getSimpleMMOLabel(envStore.data, subscriptionStore.activeSubscriptions[0])
3337

3438
/**
3539
* Checks whether object should be treated as organization member or invitee.
@@ -197,7 +201,11 @@ export default function MembersRoute() {
197201
<Title fw={600} order={5}>
198202
{t('Invite members')}
199203
</Title>
200-
<Text>{t('Invite more people to join your team or change their role permissions below.')}</Text>
204+
<Text>
205+
{t(
206+
'Invite more people to join your ##TEAM_OR_ORGANIZATION## or change their role permissions below.',
207+
).replace('##TEAM_OR_ORGANIZATION##', mmoLabel)}
208+
</Text>
201209
</Stack>
202210

203211
<Box>

0 commit comments

Comments
 (0)