From 2ddef1664a68b6686b4090c5c3147946c995c44d Mon Sep 17 00:00:00 2001 From: JacquesLarique <134954692+JacquesLarique@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:00:22 +0100 Subject: [PATCH] fix(billing): fixed redirection to hosting mx plan resiliation page (#14820) ref: MANAGER-16668 Signed-off-by: Jacques Larique --- .../actions/terminateEmail/email.routing.js | 12 ++++++++---- .../actions/terminateEmail/email.routing.js | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/manager/modules/billing/src/autoRenew/actions/terminateEmail/email.routing.js b/packages/manager/modules/billing/src/autoRenew/actions/terminateEmail/email.routing.js index 51b6b861d0fc..53efda2aafc5 100644 --- a/packages/manager/modules/billing/src/autoRenew/actions/terminateEmail/email.routing.js +++ b/packages/manager/modules/billing/src/autoRenew/actions/terminateEmail/email.routing.js @@ -11,11 +11,15 @@ export default /* @ngInject */ ($stateProvider, $urlRouterProvider) => { email: /* @ngInject */ (BillingAutoRenew, name) => BillingAutoRenew.getEmailInfos(name), isHosting: /* @ngInject */ (email) => /hosting/.test(email.offer), - redirection: /* @ngInject */ ($q, isHosting, email) => { + redirection: /* @ngInject */ ($q, coreURLBuilder, isHosting, email) => { if (isHosting) { - window.location.href = `/web/#/hosting/${encodeURIComponent( - email.domain, - )}/terminateEmail?tab=GENERAL_INFORMATIONS`; + window.location.href = coreURLBuilder.buildURL( + 'web', + `#/hosting/${encodeURIComponent(email.domain)}/terminateEmail`, + { + tab: 'GENERAL_INFORMATIONS', + }, + ); return $q.defer().promise; } return $q.when(); diff --git a/packages/manager/modules/new-billing/src/autoRenew/actions/terminateEmail/email.routing.js b/packages/manager/modules/new-billing/src/autoRenew/actions/terminateEmail/email.routing.js index 5a851af18903..743b2dae4218 100644 --- a/packages/manager/modules/new-billing/src/autoRenew/actions/terminateEmail/email.routing.js +++ b/packages/manager/modules/new-billing/src/autoRenew/actions/terminateEmail/email.routing.js @@ -11,11 +11,15 @@ export default /* @ngInject */ ($stateProvider, $urlRouterProvider) => { email: /* @ngInject */ (BillingAutoRenew, name) => BillingAutoRenew.getEmailInfos(name), isHosting: /* @ngInject */ (email) => /hosting/.test(email.offer), - redirection: /* @ngInject */ ($q, isHosting, email) => { + redirection: /* @ngInject */ ($q, coreURLBuilder, isHosting, email) => { if (isHosting) { - window.location.href = `/web/#/hosting/${encodeURIComponent( - email.domain, - )}/terminateEmail?tab=GENERAL_INFORMATIONS`; + window.location.href = coreURLBuilder.buildURL( + 'web', + `#/hosting/${encodeURIComponent(email.domain)}/terminateEmail`, + { + tab: 'GENERAL_INFORMATIONS', + }, + ); return $q.defer().promise; } return $q.when();