# Pull Request Template ## Description Custom tools is now discoverable on all plans ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? Before: <img width="390" height="446" alt="CleanShot 2026-04-02 at 13 40 11@2x" src="https://github.com/user-attachments/assets/0a751954-f3ad-47d6-85b8-1e2f1476a646" /> After: <img width="392" height="522" alt="CleanShot 2026-04-02 at 13 40 47@2x" src="https://github.com/user-attachments/assets/62a252f6-2551-47a9-b50c-be949f08c456" /> <img width="1826" height="638" alt="CleanShot 2026-04-02 at 13 37 39@2x" src="https://github.com/user-attachments/assets/77dc2a75-3d76-44cf-8579-8d3457879bd0" /> ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published in downstream modules --------- Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
49 lines
1.2 KiB
Vue
49 lines
1.2 KiB
Vue
<script setup>
|
|
import { computed } from 'vue';
|
|
import { useRouter } from 'vue-router';
|
|
import { useMapGetter } from 'dashboard/composables/store';
|
|
import { useAccount } from 'dashboard/composables/useAccount';
|
|
|
|
import BasePaywallModal from 'dashboard/routes/dashboard/settings/components/BasePaywallModal.vue';
|
|
|
|
defineProps({
|
|
featurePrefix: {
|
|
type: String,
|
|
default: 'CAPTAIN',
|
|
},
|
|
});
|
|
|
|
const router = useRouter();
|
|
const currentUser = useMapGetter('getCurrentUser');
|
|
|
|
const isSuperAdmin = computed(() => {
|
|
return currentUser.value.type === 'SuperAdmin';
|
|
});
|
|
const { accountId, isOnChatwootCloud } = useAccount();
|
|
|
|
const i18nKey = computed(() =>
|
|
isOnChatwootCloud.value ? 'PAYWALL' : 'ENTERPRISE_PAYWALL'
|
|
);
|
|
const openBilling = () => {
|
|
router.push({
|
|
name: 'billing_settings_index',
|
|
params: { accountId: accountId.value },
|
|
});
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
class="w-full max-w-5xl mx-auto h-full max-h-[448px] grid place-content-center"
|
|
>
|
|
<BasePaywallModal
|
|
class="mx-auto"
|
|
:feature-prefix="featurePrefix"
|
|
:i18n-key="i18nKey"
|
|
:is-super-admin="isSuperAdmin"
|
|
:is-on-chatwoot-cloud="isOnChatwootCloud"
|
|
@upgrade="openBilling"
|
|
/>
|
|
</div>
|
|
</template>
|