web/satellite: fix for billing screen

Fixed old billing layout to show new billing layout.
There was a routing issue when navigating from account dropdown.

Change-Id: I65d91681b2891ec347a6729ae3db4cd0e6073161
This commit is contained in:
Vitalii 2022-08-17 17:43:21 +03:00 committed by Vitalii Shpital
parent 286f68a0bd
commit 9dcef77639

View File

@ -74,6 +74,7 @@ import TierBadgePro from '@/../static/images/navigation/tierBadgePro.svg';
import { AnalyticsHttpApi } from '@/api/analytics';
import { AnalyticsEvent } from '@/utils/constants/analyticsEventNames';
import { APP_STATE_MUTATIONS } from '@/store/mutationConstants';
import { MetaUtils } from '@/utils/meta';
// @vue/component
@Component({
@ -105,7 +106,11 @@ export default class AccountArea extends Vue {
*/
public navigateToBilling(): void {
this.closeDropdown();
this.$router.push(RouteConfig.Account.with(RouteConfig.Billing).with(RouteConfig.BillingOverview).path);
if (this.$route.path.includes(RouteConfig.Billing.path)) return;
this.isNewBillingScreen ?
this.$router.push(RouteConfig.Account.with(RouteConfig.Billing).with(RouteConfig.BillingOverview).path) :
this.$router.push(RouteConfig.Account.with(RouteConfig.Billing).path);
}
/**
@ -169,6 +174,14 @@ export default class AccountArea extends Vue {
this.$store.dispatch(APP_STATE_ACTIONS.CLOSE_POPUPS);
}
/**
* Indicates if tabs options are hidden.
*/
public get isNewBillingScreen(): boolean {
const isNewBillingScreen = MetaUtils.getMetaContent('new-billing-screen');
return isNewBillingScreen === "true";
}
/**
* Returns bottom and left position of dropdown.
*/