# Pull Request Template ## Description **This PR includes,** - Added new pending FAQs view with approve/edit/delete actions for each response. - Implemented banner notification showing pending FAQ count on main approved responses page. - Created dedicated route for pending FAQs review at /captain/responses/pending. - Added automatic pending count updates when switching assistants or routes. - Modified ResponseCard component to show action buttons instead of dropdown in pending view. Fixes https://linear.app/chatwoot/issue/CW-5833/pending-faqs-in-a-different-ux ## Type of change - [x] New feature (non-breaking change which adds functionality) ## How Has This Been Tested? ### Loom video https://www.loom.com/share/5fe8f79b04cd4681b9360c48710b9373 ## 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 - [ ] 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 <pranav@chatwoot.com>
156 lines
4.6 KiB
JavaScript
156 lines
4.6 KiB
JavaScript
import { FEATURE_FLAGS } from 'dashboard/featureFlags';
|
|
import { INSTALLATION_TYPES } from 'dashboard/constants/installationTypes';
|
|
import { frontendURL } from '../../../helper/URLHelper';
|
|
import AssistantIndex from './assistants/Index.vue';
|
|
import AssistantEdit from './assistants/Edit.vue';
|
|
// import AssistantSettings from './assistants/settings/Settings.vue';
|
|
import AssistantInboxesIndex from './assistants/inboxes/Index.vue';
|
|
import AssistantGuardrailsIndex from './assistants/guardrails/Index.vue';
|
|
import AssistantGuidelinesIndex from './assistants/guidelines/Index.vue';
|
|
import AssistantScenariosIndex from './assistants/scenarios/Index.vue';
|
|
import DocumentsIndex from './documents/Index.vue';
|
|
import ResponsesIndex from './responses/Index.vue';
|
|
import ResponsesPendingIndex from './responses/Pending.vue';
|
|
import CustomToolsIndex from './tools/Index.vue';
|
|
|
|
export const routes = [
|
|
{
|
|
path: frontendURL('accounts/:accountId/captain/assistants'),
|
|
component: AssistantIndex,
|
|
name: 'captain_assistants_index',
|
|
meta: {
|
|
permissions: ['administrator', 'agent'],
|
|
featureFlag: FEATURE_FLAGS.CAPTAIN,
|
|
installationTypes: [
|
|
INSTALLATION_TYPES.CLOUD,
|
|
INSTALLATION_TYPES.ENTERPRISE,
|
|
],
|
|
},
|
|
},
|
|
{
|
|
path: frontendURL('accounts/:accountId/captain/assistants/:assistantId'),
|
|
component: AssistantEdit,
|
|
name: 'captain_assistants_edit',
|
|
meta: {
|
|
permissions: ['administrator', 'agent'],
|
|
featureFlag: FEATURE_FLAGS.CAPTAIN,
|
|
installationTypes: [
|
|
INSTALLATION_TYPES.CLOUD,
|
|
INSTALLATION_TYPES.ENTERPRISE,
|
|
],
|
|
},
|
|
},
|
|
{
|
|
path: frontendURL(
|
|
'accounts/:accountId/captain/assistants/:assistantId/inboxes'
|
|
),
|
|
component: AssistantInboxesIndex,
|
|
name: 'captain_assistants_inboxes_index',
|
|
meta: {
|
|
permissions: ['administrator', 'agent'],
|
|
featureFlag: FEATURE_FLAGS.CAPTAIN,
|
|
installationTypes: [
|
|
INSTALLATION_TYPES.CLOUD,
|
|
INSTALLATION_TYPES.ENTERPRISE,
|
|
],
|
|
},
|
|
},
|
|
{
|
|
path: frontendURL(
|
|
'accounts/:accountId/captain/assistants/:assistantId/guardrails'
|
|
),
|
|
component: AssistantGuardrailsIndex,
|
|
name: 'captain_assistants_guardrails_index',
|
|
meta: {
|
|
permissions: ['administrator', 'agent'],
|
|
featureFlag: FEATURE_FLAGS.CAPTAIN,
|
|
installationTypes: [
|
|
INSTALLATION_TYPES.CLOUD,
|
|
INSTALLATION_TYPES.ENTERPRISE,
|
|
],
|
|
},
|
|
},
|
|
{
|
|
path: frontendURL(
|
|
'accounts/:accountId/captain/assistants/:assistantId/scenarios'
|
|
),
|
|
component: AssistantScenariosIndex,
|
|
name: 'captain_assistants_scenarios_index',
|
|
meta: {
|
|
permissions: ['administrator', 'agent'],
|
|
featureFlag: FEATURE_FLAGS.CAPTAIN,
|
|
installationTypes: [
|
|
INSTALLATION_TYPES.CLOUD,
|
|
INSTALLATION_TYPES.ENTERPRISE,
|
|
],
|
|
},
|
|
},
|
|
{
|
|
path: frontendURL(
|
|
'accounts/:accountId/captain/assistants/:assistantId/guidelines'
|
|
),
|
|
component: AssistantGuidelinesIndex,
|
|
name: 'captain_assistants_guidelines_index',
|
|
meta: {
|
|
permissions: ['administrator', 'agent'],
|
|
featureFlag: FEATURE_FLAGS.CAPTAIN,
|
|
installationTypes: [
|
|
INSTALLATION_TYPES.CLOUD,
|
|
INSTALLATION_TYPES.ENTERPRISE,
|
|
],
|
|
},
|
|
},
|
|
{
|
|
path: frontendURL('accounts/:accountId/captain/documents'),
|
|
component: DocumentsIndex,
|
|
name: 'captain_documents_index',
|
|
meta: {
|
|
permissions: ['administrator', 'agent'],
|
|
featureFlag: FEATURE_FLAGS.CAPTAIN,
|
|
installationTypes: [
|
|
INSTALLATION_TYPES.CLOUD,
|
|
INSTALLATION_TYPES.ENTERPRISE,
|
|
],
|
|
},
|
|
},
|
|
{
|
|
path: frontendURL('accounts/:accountId/captain/responses'),
|
|
component: ResponsesIndex,
|
|
name: 'captain_responses_index',
|
|
meta: {
|
|
permissions: ['administrator', 'agent'],
|
|
featureFlag: FEATURE_FLAGS.CAPTAIN,
|
|
installationTypes: [
|
|
INSTALLATION_TYPES.CLOUD,
|
|
INSTALLATION_TYPES.ENTERPRISE,
|
|
],
|
|
},
|
|
},
|
|
{
|
|
path: frontendURL('accounts/:accountId/captain/responses/pending'),
|
|
component: ResponsesPendingIndex,
|
|
name: 'captain_responses_pending',
|
|
meta: {
|
|
permissions: ['administrator', 'agent'],
|
|
featureFlag: FEATURE_FLAGS.CAPTAIN,
|
|
installationTypes: [
|
|
INSTALLATION_TYPES.CLOUD,
|
|
INSTALLATION_TYPES.ENTERPRISE,
|
|
],
|
|
},
|
|
},
|
|
{
|
|
path: frontendURL('accounts/:accountId/captain/tools'),
|
|
component: CustomToolsIndex,
|
|
name: 'captain_tools_index',
|
|
meta: {
|
|
permissions: ['administrator', 'agent'],
|
|
featureFlag: FEATURE_FLAGS.CAPTAIN_V2,
|
|
installationTypes: [
|
|
INSTALLATION_TYPES.CLOUD,
|
|
INSTALLATION_TYPES.ENTERPRISE,
|
|
],
|
|
},
|
|
},
|
|
];
|