Add missing text for overage banner.
Этот коммит содержится в:
@@ -78,6 +78,7 @@ const OverageUsersBanner = () => {
|
|||||||
licenseId: license.Id,
|
licenseId: license.Id,
|
||||||
isWarningState: isBetween5PercerntAnd10PercentPurchasedSeats,
|
isWarningState: isBetween5PercerntAnd10PercentPurchasedSeats,
|
||||||
banner: 'global banner',
|
banner: 'global banner',
|
||||||
|
canSelfHostedExpand: canSelfHostedExpand || false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
@@ -113,7 +114,7 @@ const OverageUsersBanner = () => {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const message = (
|
let message = (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='licensingPage.overageUsersBanner.text'
|
id='licensingPage.overageUsersBanner.text'
|
||||||
defaultMessage='Your workspace user count has exceeded your paid license seat count by {seats, number} {seats, plural, one {seat} other {seats}}. Purchase additional seats to remain compliant.'
|
defaultMessage='Your workspace user count has exceeded your paid license seat count by {seats, number} {seats, plural, one {seat} other {seats}}. Purchase additional seats to remain compliant.'
|
||||||
@@ -122,6 +123,17 @@ const OverageUsersBanner = () => {
|
|||||||
}}
|
}}
|
||||||
/>);
|
/>);
|
||||||
|
|
||||||
|
if (canSelfHostedExpand) {
|
||||||
|
message = (
|
||||||
|
<FormattedMessage
|
||||||
|
id='licensingPage.overageUsersBanner.textSelfHostedExpand'
|
||||||
|
defaultMessage='Your workspace user count has exceeded your paid license seat count. Update your seat count to stay compliant.'
|
||||||
|
values={{
|
||||||
|
seats: overageByUsers,
|
||||||
|
}}
|
||||||
|
/>);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AnnouncementBar
|
<AnnouncementBar
|
||||||
type={isBetween5PercerntAnd10PercentPurchasedSeats ? AnnouncementBarTypes.ADVISOR : AnnouncementBarTypes.CRITICAL}
|
type={isBetween5PercerntAnd10PercentPurchasedSeats ? AnnouncementBarTypes.ADVISOR : AnnouncementBarTypes.CRITICAL}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ type UseExpandOverageUsersCheckArgs = {
|
|||||||
shouldRequest: boolean;
|
shouldRequest: boolean;
|
||||||
licenseId?: string;
|
licenseId?: string;
|
||||||
banner: 'global banner' | 'invite modal';
|
banner: 'global banner' | 'invite modal';
|
||||||
|
canSelfHostedExpand: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useExpandOverageUsersCheck = ({
|
export const useExpandOverageUsersCheck = ({
|
||||||
@@ -25,20 +26,31 @@ export const useExpandOverageUsersCheck = ({
|
|||||||
isWarningState,
|
isWarningState,
|
||||||
licenseId,
|
licenseId,
|
||||||
banner,
|
banner,
|
||||||
|
canSelfHostedExpand,
|
||||||
}: UseExpandOverageUsersCheckArgs) => {
|
}: UseExpandOverageUsersCheckArgs) => {
|
||||||
const {formatMessage} = useIntl();
|
const {formatMessage} = useIntl();
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const {getRequestState, is_expandable: isExpandable}: LicenseSelfServeStatusReducer = useSelector((state: GlobalState) => state.entities.cloud.subscriptionStats || {is_expandable: false, getRequestState: 'IDLE'});
|
const {getRequestState, is_expandable: isExpandable}: LicenseSelfServeStatusReducer = useSelector((state: GlobalState) => state.entities.cloud.subscriptionStats || {is_expandable: false, getRequestState: 'IDLE'});
|
||||||
const expandableLink = useSelector(getExpandSeatsLink);
|
const expandableLink = useSelector(getExpandSeatsLink);
|
||||||
|
|
||||||
const cta = useMemo(() => (isExpandable ? formatMessage({
|
const cta = useMemo(() => {
|
||||||
id: 'licensingPage.overageUsersBanner.ctaExpandSeats',
|
if (isExpandable && !canSelfHostedExpand) {
|
||||||
defaultMessage: 'Purchase additional seats',
|
return formatMessage({
|
||||||
}) : formatMessage({
|
id: 'licensingPage.overageUsersBanner.ctaExpandSeats',
|
||||||
id: 'licensingPage.overageUsersBanner.cta',
|
defaultMessage: 'Purchase additional seats',
|
||||||
defaultMessage: 'Contact Sales',
|
});
|
||||||
})
|
} else if (isExpandable && canSelfHostedExpand) {
|
||||||
), [isExpandable]);
|
return formatMessage({
|
||||||
|
id: 'licensingPage.overageUsersBanner.ctaUpdateSeats',
|
||||||
|
defaultMessage: 'Update seat count',
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return formatMessage({
|
||||||
|
id: 'licensingPage.overageUsersBanner.cta',
|
||||||
|
defaultMessage: 'Contact Sales',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, [isExpandable]);
|
||||||
|
|
||||||
const trackEventFn = (cta: 'Contact Sales' | 'Self Serve') => {
|
const trackEventFn = (cta: 'Contact Sales' | 'Self Serve') => {
|
||||||
trackEvent('insights', isWarningState ? 'click_true_up_warning' : 'click_true_up_error', {
|
trackEvent('insights', isWarningState ? 'click_true_up_warning' : 'click_true_up_error', {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user