chatwoot/app/javascript/dashboard/composables
Sivin Varghese 53fce7be03
fix: Conditionally fetch limits and assistants for enterprise/cloud (#12099)
# Pull Request Template

## Description

### Issue

The Community Edition (CE) dashboard was making API requests to
enterprise-only endpoints, causing 404 errors:

* `/enterprise/api/v1/accounts/1/limits`
* `/api/v1/accounts/1/captain/assistants?page=1`

### Solution

1. Added conditional checks to prevent these calls.
2. Remove unused component
`app/javascript/dashboard/components/app/UpgradeBanner.vue`

Fixes
[CW-4695](https://linear.app/chatwoot/issue/CW-4695/440-ce-dashboard-calls-enterprise-urls),
https://github.com/chatwoot/chatwoot/issues/12023

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Pranav <pranavrajs@gmail.com>
2025-08-04 15:06:58 -07:00
..
chatlist fix: sentry issues (#10695) 2025-01-16 15:49:48 +05:30
commands feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
spec fix: Translate Priority and Messages types in Automations and Macros (#11741) 2025-07-08 12:40:40 +05:30
utils feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
emitter.js feat: Reconnect logic (#9453) 2024-06-03 15:54:19 +05:30
index.js chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
store.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
useAccount.js feat: auto resolve label option and fixes (#11541) 2025-06-04 14:53:24 +05:30
useAdmin.js feat: Replace alertMixin usage with useAlert (#9793) 2024-07-23 16:41:11 +05:30
useAgentsList.js fix: Translate "None" option in agent assignment dropdown (#11060) 2025-03-11 14:49:27 -07:00
useAI.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
useAutomation.js fix: Update inconsistent behaviour of create and edit automation rules (#10197) 2024-10-04 08:06:36 -07:00
useAutomationValues.js fix: Translate Priority and Messages types in Automations and Macros (#11741) 2025-07-08 12:40:40 +05:30
useCaptain.js fix: Conditionally fetch limits and assistants for enterprise/cloud (#12099) 2025-08-04 15:06:58 -07:00
useConfig.js feat: Rewrite configMixin to a composable (#9921) 2024-08-14 12:56:30 +05:30
useConversationLabels.js feat: Rewrite conversation/labelMixin to a composable (#9936) 2024-08-12 17:41:12 +05:30
useDetectKeyboardLayout.js feat: Rewrite keyboardEventListener mixin to a composable (#9831) 2024-08-05 18:59:47 +05:30
useEditableAutomation.js fix: Update inconsistent behaviour of create and edit automation rules (#10197) 2024-10-04 08:06:36 -07:00
useFileUpload.js feat(v4): Compose new conversation without multiple clicks (#10545) 2024-12-05 20:16:29 -08:00
useFontSize.js fix: Update design to fix the crowded header (#11633) 2025-05-29 18:45:28 -06:00
useImageZoom.js chore: Improvements in image attachment viewer (#11040) 2025-03-18 14:01:18 +05:30
useImpersonation.js feat: Prevent saving preferences and status when impersonating (#11164) 2025-05-20 17:34:30 -07:00
useInbox.js feat: Voice channel creation Flow (#11775) 2025-06-25 14:21:03 -07:00
useIntegrationHook.js chore: Repalce Hook Mixin with useHook composable [CW-3454] (#9994) 2024-08-22 16:48:02 +05:30
useKeyboardEvents.js refactor: useKeyboardEvents composable (#9959) 2024-08-22 16:40:55 +05:30
useKeyboardNavigableList.js refactor: useKeyboardEvents composable (#9959) 2024-08-22 16:40:55 +05:30
useLiveRefresh.js feat: Allow users to see heatmap for last 30 days (#10848) 2025-02-19 14:54:15 -08:00
useMacros.js fix: Translate Priority and Messages types in Automations and Macros (#11741) 2025-07-08 12:40:40 +05:30
usePolicy.js feat: show articles in the list only if feature is enabled (#11607) 2025-05-29 14:19:35 +05:30
useReportMetrics.js fix: stale report value shown if summary fetch breaks (#11270) 2025-04-15 20:18:06 +05:30
useTransformKeys.js feat: integrate new bubbles (#10550) 2024-12-19 18:41:55 +05:30
useTranslations.js chore: Improve translation service with HTML and plain text support (#11305) 2025-04-16 17:59:06 +05:30
useUISettings.js feat: Enhance Linear integration UX with multi-issue support and improved placement (#11668) 2025-06-10 15:40:02 -04:00