chore: Fix flag
This commit is contained in:
@@ -64,7 +64,6 @@ export default {
|
||||
bypassUpgradePage() {
|
||||
return [
|
||||
'billing_settings_index',
|
||||
'billing_settings_v2_index',
|
||||
'settings_inbox_list',
|
||||
'general_settings_index',
|
||||
'agent_list',
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useMapGetter } from 'dashboard/composables/store.js';
|
||||
import Index from './Index.vue';
|
||||
import IndexV2 from '../billing-v2/IndexV2.vue';
|
||||
|
||||
const isStripeBillingV2Enabled = useMapGetter(
|
||||
'globalConfig/isStripeBillingV2Enabled'
|
||||
);
|
||||
|
||||
const currentComponent = computed(() => {
|
||||
return isStripeBillingV2Enabled.value ? IndexV2 : Index;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<component :is="currentComponent" />
|
||||
</template>
|
||||
@@ -26,9 +26,6 @@ const {
|
||||
} = useCaptain();
|
||||
|
||||
const uiFlags = useMapGetter('accounts/getUIFlags');
|
||||
const isStripeBillingV2Enabled = useMapGetter(
|
||||
'globalConfig/isStripeBillingV2Enabled'
|
||||
);
|
||||
const store = useStore();
|
||||
|
||||
const BILLING_REFRESH_ATTEMPTED = 'billing_refresh_attempted';
|
||||
@@ -116,10 +113,6 @@ const onClickBillingPortal = () => {
|
||||
store.dispatch('accounts/checkout');
|
||||
};
|
||||
|
||||
const onClickV2BillingPortal = () => {
|
||||
router.push({ name: 'billing_settings_v2_index' });
|
||||
};
|
||||
|
||||
const onToggleChatWindow = () => {
|
||||
if (window.$chatwoot) {
|
||||
window.$chatwoot.toggle();
|
||||
@@ -151,18 +144,6 @@ onMounted(handleBillingPageLogic);
|
||||
<template #body>
|
||||
<section class="grid gap-4">
|
||||
<BillingCard
|
||||
v-if="isStripeBillingV2Enabled"
|
||||
:title="$t('BILLING_SETTINGS.V2_BILLING_PORTAL.TITLE')"
|
||||
:description="$t('BILLING_SETTINGS.V2_BILLING_PORTAL.DESCRIPTION')"
|
||||
>
|
||||
<template #action>
|
||||
<ButtonV4 sm solid blue @click="onClickV2BillingPortal">
|
||||
{{ $t('BILLING_SETTINGS.V2_BILLING_PORTAL.BUTTON_TXT') }}
|
||||
</ButtonV4>
|
||||
</template>
|
||||
</BillingCard>
|
||||
<BillingCard
|
||||
v-else
|
||||
:title="$t('BILLING_SETTINGS.MANAGE_SUBSCRIPTION.TITLE')"
|
||||
:description="$t('BILLING_SETTINGS.MANAGE_SUBSCRIPTION.DESCRIPTION')"
|
||||
>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { frontendURL } from '../../../../helper/URLHelper';
|
||||
import { INSTALLATION_TYPES } from 'dashboard/constants/installationTypes';
|
||||
import SettingsWrapper from '../SettingsWrapper.vue';
|
||||
import Index from './Index.vue';
|
||||
import BillingWrapper from './BillingWrapper.vue';
|
||||
|
||||
export default {
|
||||
routes: [
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
{
|
||||
path: '',
|
||||
name: 'billing_settings_index',
|
||||
component: Index,
|
||||
component: BillingWrapper,
|
||||
meta: {
|
||||
installationTypes: [INSTALLATION_TYPES.CLOUD],
|
||||
permissions: ['administrator'],
|
||||
|
||||
@@ -12,7 +12,6 @@ import attributes from './attributes/attributes.routes';
|
||||
import automation from './automation/automation.routes';
|
||||
import auditlogs from './auditlogs/audit.routes';
|
||||
import billing from './billing/billing.routes';
|
||||
import billingV2 from './billing-v2/billing-v2.routes';
|
||||
import canned from './canned/canned.routes';
|
||||
import inbox from './inbox/inbox.routes';
|
||||
import integrations from './integrations/integrations.routes';
|
||||
@@ -53,7 +52,6 @@ export default {
|
||||
...automation.routes,
|
||||
...auditlogs.routes,
|
||||
...billing.routes,
|
||||
...billingV2.routes,
|
||||
...canned.routes,
|
||||
...inbox.routes,
|
||||
...integrations.routes,
|
||||
|
||||
Reference in New Issue
Block a user