Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-9364] Copy for Aggregate auto-scaling invoices for Teams and Enterprise customers #9875

Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,25 @@
return this.i18nService.t("subscriptionUpgrade", this.sub.seats.toString());
}
} else if (this.sub.maxAutoscaleSeats === this.sub.seats && this.sub.seats != null) {
return this.i18nService.t("subscriptionMaxReached", this.sub.seats.toString());
const seatAdjustmentMessage = this.sub.plan.isAnnual
? "annualSubscriptionUserSeatsMessage"
: "monthlySubscriptionUserSeatsMessage";
return this.i18nService.t(

Check warning on line 290 in apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts#L290

Added line #L290 was not covered by tests
seatAdjustmentMessage + "subscriptionSeatMaxReached",
this.sub.seats.toString(),
);
} else if (this.userOrg.productTierType === ProductTierType.TeamsStarter) {
return this.i18nService.t("subscriptionUserSeatsWithoutAdditionalSeatsOption", 10);
} else if (this.sub.maxAutoscaleSeats == null) {
return this.i18nService.t("subscriptionUserSeatsUnlimitedAutoscale");
const seatAdjustmentMessage = this.sub.plan.isAnnual
? "annualSubscriptionUserSeatsMessage"
: "monthlySubscriptionUserSeatsMessage";
return this.i18nService.t(seatAdjustmentMessage);

Check warning on line 300 in apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts#L300

Added line #L300 was not covered by tests
} else {
return this.i18nService.t(
"subscriptionUserSeatsLimitedAutoscale",
this.sub.maxAutoscaleSeats.toString(),
);
const seatAdjustmentMessage = this.sub.plan.isAnnual
? "annualSubscriptionUserSeatsMessage"
: "monthlySubscriptionUserSeatsMessage";
return this.i18nService.t(seatAdjustmentMessage, this.sub.maxAutoscaleSeats.toString());

Check notice on line 305 in apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

โ„น Getting worse: Complex Method

OrganizationSubscriptionCloudComponent.getsubscriptionDesc increases in cyclomatic complexity from 11 to 14, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 305 in apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts#L305

Added line #L305 was not covered by tests
}
}

Expand Down
22 changes: 8 additions & 14 deletions apps/web/src/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3626,24 +3626,12 @@
"additionalOptionsDesc": {
"message": "For additional help in managing your subscription, please contact Customer Support."
},
"subscriptionUserSeatsUnlimitedAutoscale": {
"message": "Adjustments to your subscription will result in prorated changes to your billing totals. If newly invited members exceed your subscription seats, you will immediately receive a prorated charge for the additional members."
},
"smStandaloneTrialSeatCountUpdateMessageFragment1": {
"message": "If you want to add additional"
},
"smStandaloneTrialSeatCountUpdateMessageFragment2": {
"message": "seats without the bundled offer, please contact"
},
"subscriptionUserSeatsLimitedAutoscale": {
"message": "Adjustments to your subscription will result in prorated changes to your billing totals. If newly invited members exceed your subscription seats, you will immediately receive a prorated charge for the additional members until your $MAX$ seat limit is reached.",
"placeholders": {
"max": {
"content": "$1",
"example": "50"
}
}
},
"subscriptionUserSeatsWithoutAdditionalSeatsOption": {
"message": "You can invite up to $COUNT$ members for no additional charge. Contact Customer Support to upgrade your plan and invite more members.",
"placeholders": {
Expand Down Expand Up @@ -3680,8 +3668,8 @@
}
}
},
"subscriptionMaxReached": {
"message": "Adjustments to your subscription will result in prorated changes to your billing totals. You cannot invite more than $COUNT$ members without increasing your subscription seats.",
"subscriptionSeatMaxReached": {
"message": "You cannot invite more than $COUNT$ members without increasing your subscription seats.",
"placeholders": {
"count": {
"content": "$1",
Expand Down Expand Up @@ -8489,5 +8477,11 @@
"billingHistoryDescription": {
"message": "Download a CSV to obtain client details for each billing date. Prorated charges are not included in the CSV and may vary from the linked invoice. For the most accurate billing details, refer to your monthly invoices.",
"description": "A paragraph on the Billing History page of the Provider Portal letting users know they can download a CSV report for their invoices that does not include prorations."
},
"monthlySubscriptionUserSeatsMessage": {
"message": "Adjustments to your subscription will result in prorated charges to your billing totals on your next billing period. "
},
"annualSubscriptionUserSeatsMessage": {
"message": "Adjustments to your subscription will result in prorated charges on a monthly billing cycle. "
}
}
Loading