mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-10 22:50:46 +02:00
a5f38a8663
[web] Change Group SSO radio in admin panel to checkbox GitOrigin-RevId: c4a07400c6f399724be0368108be24ec6df67efa
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { RowLink } from '@/features/subscription/components/dashboard/row-link'
|
|
import { useTranslation } from 'react-i18next'
|
|
import { ManagedGroupSubscription } from '../../../../../../types/subscription/dashboard/subscription'
|
|
|
|
export default function GroupSettingsButton({
|
|
subscription,
|
|
}: {
|
|
subscription: ManagedGroupSubscription
|
|
}) {
|
|
const { t } = useTranslation()
|
|
|
|
const subscriptionHasManagedUsers =
|
|
subscription.features?.managedUsers === true
|
|
const subscriptionHasGroupSSO = subscription.features?.groupSSO === true
|
|
|
|
let groupSettingRowSubText = ''
|
|
if (subscriptionHasGroupSSO && subscriptionHasManagedUsers) {
|
|
groupSettingRowSubText = t('manage_group_settings_subtext')
|
|
} else if (subscriptionHasGroupSSO) {
|
|
groupSettingRowSubText = t('manage_group_settings_subtext_group_sso')
|
|
} else if (subscriptionHasManagedUsers) {
|
|
groupSettingRowSubText = t('manage_group_settings_subtext_managed_users')
|
|
}
|
|
|
|
return (
|
|
<RowLink
|
|
href={`/manage/groups/${subscription._id}/settings`}
|
|
heading={t('manage_group_settings')}
|
|
subtext={groupSettingRowSubText}
|
|
icon="settings"
|
|
/>
|
|
)
|
|
}
|