chore: deprecate report_v4 feature flag and remove gating logic (#11320)
- deprecated report_v4 feature flag - remove the gating logic so new reports is available by default - make search_with_gin an internal feature flag
This commit is contained in:
@@ -8,7 +8,6 @@ import { useStore } from 'vuex';
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useStorage } from '@vueuse/core';
|
import { useStorage } from '@vueuse/core';
|
||||||
import { useSidebarKeyboardShortcuts } from './useSidebarKeyboardShortcuts';
|
import { useSidebarKeyboardShortcuts } from './useSidebarKeyboardShortcuts';
|
||||||
import { FEATURE_FLAGS } from 'dashboard/featureFlags';
|
|
||||||
|
|
||||||
import Button from 'dashboard/components-next/button/Button.vue';
|
import Button from 'dashboard/components-next/button/Button.vue';
|
||||||
import SidebarGroup from './SidebarGroup.vue';
|
import SidebarGroup from './SidebarGroup.vue';
|
||||||
@@ -37,18 +36,6 @@ const toggleShortcutModalFn = show => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const currentAccountId = useMapGetter('getCurrentAccountId');
|
|
||||||
const isFeatureEnabledonAccount = useMapGetter(
|
|
||||||
'accounts/isFeatureEnabledonAccount'
|
|
||||||
);
|
|
||||||
|
|
||||||
const showV4Routes = computed(() => {
|
|
||||||
return isFeatureEnabledonAccount.value(
|
|
||||||
currentAccountId.value,
|
|
||||||
FEATURE_FLAGS.REPORT_V4
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
useSidebarKeyboardShortcuts(toggleShortcutModalFn);
|
useSidebarKeyboardShortcuts(toggleShortcutModalFn);
|
||||||
|
|
||||||
// We're using localStorage to store the expanded item in the sidebar
|
// We're using localStorage to store the expanded item in the sidebar
|
||||||
@@ -116,32 +103,7 @@ const newReportRoutes = () => [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const oldReportRoutes = () => [
|
const reportRoutes = computed(() => newReportRoutes());
|
||||||
{
|
|
||||||
name: 'Reports Agent',
|
|
||||||
label: t('SIDEBAR.REPORTS_AGENT'),
|
|
||||||
to: accountScopedRoute('agent_reports'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Reports Label',
|
|
||||||
label: t('SIDEBAR.REPORTS_LABEL'),
|
|
||||||
to: accountScopedRoute('label_reports'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Reports Inbox',
|
|
||||||
label: t('SIDEBAR.REPORTS_INBOX'),
|
|
||||||
to: accountScopedRoute('inbox_reports'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Reports Team',
|
|
||||||
label: t('SIDEBAR.REPORTS_TEAM'),
|
|
||||||
to: accountScopedRoute('team_reports'),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const reportRoutes = computed(() =>
|
|
||||||
showV4Routes.value ? newReportRoutes() : oldReportRoutes()
|
|
||||||
);
|
|
||||||
|
|
||||||
const menuItems = computed(() => {
|
const menuItems = computed(() => {
|
||||||
return [
|
return [
|
||||||
|
|||||||
@@ -149,7 +149,8 @@
|
|||||||
enabled: false
|
enabled: false
|
||||||
- name: report_v4
|
- name: report_v4
|
||||||
display_name: Report V4
|
display_name: Report V4
|
||||||
enabled: false
|
enabled: true
|
||||||
|
deprecated: true
|
||||||
- name: contact_chatwoot_support_team
|
- name: contact_chatwoot_support_team
|
||||||
display_name: Contact Chatwoot Support Team
|
display_name: Contact Chatwoot Support Team
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -161,6 +162,7 @@
|
|||||||
- name: search_with_gin
|
- name: search_with_gin
|
||||||
display_name: Search messages with GIN
|
display_name: Search messages with GIN
|
||||||
enabled: false
|
enabled: false
|
||||||
|
chatwoot_internal: true
|
||||||
- name: channel_instagram
|
- name: channel_instagram
|
||||||
display_name: Instagram Channel
|
display_name: Instagram Channel
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
Reference in New Issue
Block a user