Update partner packages, copy, and demo switcher
This commit is contained in:
@@ -174,13 +174,19 @@ export function formatPackageLimit(value: number | null | undefined, t: Translat
|
||||
export function getPackageLimitEntries(
|
||||
limits: Record<string, unknown> | null,
|
||||
t: Translate,
|
||||
usageOverrides: LimitUsageOverrides = {}
|
||||
usageOverrides: LimitUsageOverrides = {},
|
||||
options: { packageType?: string | null } = {}
|
||||
): PackageLimitEntry[] {
|
||||
if (!limits) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return LIMIT_LABELS.map(({ key, labelKey, fallback }) => ({
|
||||
const labels =
|
||||
options.packageType === 'reseller'
|
||||
? LIMIT_LABELS.filter(({ key }) => key === 'max_events_per_year')
|
||||
: LIMIT_LABELS;
|
||||
|
||||
return labels.map(({ key, labelKey, fallback }) => ({
|
||||
key,
|
||||
label: t(labelKey, fallback),
|
||||
value: formatLimitWithRemaining(
|
||||
@@ -231,11 +237,11 @@ export function collectPackageFeatures(pkg: TenantPackageSummary): string[] {
|
||||
}
|
||||
});
|
||||
|
||||
if (pkg.branding_allowed) {
|
||||
if (pkg.package_type !== 'reseller' && pkg.branding_allowed) {
|
||||
features.add('branding_allowed');
|
||||
}
|
||||
|
||||
if (pkg.watermark_allowed) {
|
||||
if (pkg.package_type !== 'reseller' && pkg.watermark_allowed) {
|
||||
features.add('watermark_allowed');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user