Skip to content

Commit

Permalink
fix(organizations): use correct teams MMO label in invite feature TAS…
Browse files Browse the repository at this point in the history
…K-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.
  • Loading branch information
jamesrkiger authored Mar 3, 2025
1 parent 79219c2 commit 0763390
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
8 changes: 6 additions & 2 deletions jsapp/js/account/organization/InviteModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ import { OrganizationUserRole } from './organizationQuery'
import userExistence from 'js/users/userExistence.store'
import { useField } from '@mantine/form'
import { checkEmailPattern, notify } from 'js/utils'
import envStore from 'jsapp/js/envStore'
import subscriptionStore from 'jsapp/js/account/subscriptionStore'
import { getSimpleMMOLabel } from 'js/account/organization/organization.utils'

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

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

Expand Down Expand Up @@ -68,8 +72,8 @@ export default function InviteModal(props: ModalProps) {
<Stack>
<Text>
{t(
'Enter the username or email address of the person you wish to invite to your team. They will receive an invitation in their inbox.',
)}
'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.',
).replace('##TEAM_OR_ORGANIZATION##', mmoLabel)}
</Text>
<Group align={'flex-start'} w='100%' gap='xs'>
<TextInput
Expand Down
10 changes: 9 additions & 1 deletion jsapp/js/account/organization/MembersRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { Divider, Group, Stack, Text, Title, Box } from '@mantine/core'
import InviteModal from 'js/account/organization/InviteModal'

// Stores, hooks and utilities
import envStore from 'jsapp/js/envStore'
import subscriptionStore from 'jsapp/js/account/subscriptionStore'
import { formatDate } from 'js/utils'
import { getSimpleMMOLabel } from 'js/account/organization/organization.utils'
import { OrganizationUserRole, useOrganizationQuery } from './organizationQuery'
import useOrganizationMembersQuery from './membersQuery'
import { useDisclosure } from '@mantine/hooks'
Expand All @@ -30,6 +33,7 @@ import InviteeActionsDropdown from './InviteeActionsDropdown'
export default function MembersRoute() {
const orgQuery = useOrganizationQuery()
const [opened, { open, close }] = useDisclosure(false)
const mmoLabel = getSimpleMMOLabel(envStore.data, subscriptionStore.activeSubscriptions[0])

/**
* Checks whether object should be treated as organization member or invitee.
Expand Down Expand Up @@ -197,7 +201,11 @@ export default function MembersRoute() {
<Title fw={600} order={5}>
{t('Invite members')}
</Title>
<Text>{t('Invite more people to join your team or change their role permissions below.')}</Text>
<Text>
{t(
'Invite more people to join your ##TEAM_OR_ORGANIZATION## or change their role permissions below.',
).replace('##TEAM_OR_ORGANIZATION##', mmoLabel)}
</Text>
</Stack>

<Box>
Expand Down

0 comments on commit 0763390

Please sign in to comment.