Skip to content

Commit

Permalink
sync: master to develop
Browse files Browse the repository at this point in the history
sync: master to develop
  • Loading branch information
ovh-ux-cds authored Sep 2, 2024
2 parents 592a35e + 6cfb1b4 commit e52ebe8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const ELIGIBLE_FOR_UPGRADE = {
PLAN_NAME: 'RISE-2',
PLANCODE: '24rise02',
SUBSIDIARIES: ['GB'],
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default /* @ngInject */ ($stateProvider) => {

if (isEligible) {
return Server.getUpgradeProductName(
ELIGIBLE_FOR_UPGRADE.PLAN_NAME,
ELIGIBLE_FOR_UPGRADE.PLANCODE,
user.ovhSubsidiary,
).then((upgradeName) => ({
isEligible,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,12 @@ export default class Server {
ovhSubsidiary,
})
.$promise.then(({ addons, plans, products }) => {
const plan = find(plans, { invoiceName: planName });
const plan = plans.find(
(currentPlan) =>
currentPlan.planCode.startsWith(planName) ||
currentPlan.invoiceName === planName,
);
if (!plan) return '';
const cpu = find(products, { name: plan.product });
const memoryPlan = find(plan.addonFamilies, { name: 'memory' });
const memory = find(addons, { planCode: memoryPlan.default });
Expand Down

0 comments on commit e52ebe8

Please sign in to comment.