diff --git a/backend/internal/handler/api/v1/conversation_handler.go b/backend/internal/handler/api/v1/conversation_handler.go index f7739c45..76ee3667 100644 --- a/backend/internal/handler/api/v1/conversation_handler.go +++ b/backend/internal/handler/api/v1/conversation_handler.go @@ -79,6 +79,15 @@ func (h *ConversationHandler) List(c *gin.Context) { response.AbortWithStatusError(c, http.StatusBadRequest, response.ErrValidation, err.Error()) return } + // Merge labels[] array params into Labels (comma-separated) for backward compat. + // Chatwoot frontend sends labels[]=xxx as separate query params. + if len(params.LabelsArr) > 0 { + if params.Labels != "" { + params.Labels = params.Labels + "," + strings.Join(params.LabelsArr, ",") + } else { + params.Labels = strings.Join(params.LabelsArr, ",") + } + } result, svcErr := h.conversationSvc.ListWithFinder(c.Request.Context(), accountID, getUserID(c), params, p.Offset, p.PerPage) if svcErr != nil { @@ -522,6 +531,13 @@ func (h *ConversationHandler) Search(c *gin.Context) { response.AbortWithStatusError(c, http.StatusBadRequest, response.ErrValidation, err.Error()) return } + if len(params.LabelsArr) > 0 { + if params.Labels != "" { + params.Labels = params.Labels + "," + strings.Join(params.LabelsArr, ",") + } else { + params.Labels = strings.Join(params.LabelsArr, ",") + } + } result, svcErr := h.conversationSvc.ListWithFinder(c.Request.Context(), accountID, getUserID(c), params, p.Offset, p.PerPage) if svcErr != nil { diff --git a/backend/internal/service/conversation_service.go b/backend/internal/service/conversation_service.go index 9693fbe2..62249a37 100644 --- a/backend/internal/service/conversation_service.go +++ b/backend/internal/service/conversation_service.go @@ -782,7 +782,8 @@ type FilterParams struct { InboxIDs []uint `json:"inbox_ids,omitempty" form:"inbox_ids"` // multi-inbox filtering (Chatwoot: inbox_id can be array) TeamID *uint `json:"team_id,omitempty" form:"team_id"` Labels string `json:"labels,omitempty" form:"labels"` - Tags string `json:"tags,omitempty" form:"tags"` // custom tags (Chatwoot: same as labels via ActsAsTaggableOn) + LabelsArr []string `json:"labels_arr,omitempty" form:"labels[]"` // Chatwoot frontend sends labels[] array params + Tags string `json:"tags,omitempty" form:"tags"` // custom tags (Chatwoot: same as labels via ActsAsTaggableOn) ConversationType string `json:"conversation_type,omitempty" form:"conversation_type" validate:"omitempty,oneof=mention participating unattended"` SortBy string `json:"sort_by,omitempty" form:"sort_by" validate:"omitempty,oneof=last_activity_at_asc last_activity_at_desc created_at_asc created_at_desc priority_asc priority_desc waiting_since_asc waiting_since_desc priority_desc_created_at_asc latest sort_on_created_at sort_on_priority sort_on_waiting_since"` UpdatedWithin *int `json:"updated_within,omitempty" form:"updated_within"` // seconds diff --git a/frontend/app/javascript/dashboard/routes/dashboard/settings/security/security.routes.js b/frontend/app/javascript/dashboard/routes/dashboard/settings/security/security.routes.js index 6abba2dc..93d26e8c 100644 --- a/frontend/app/javascript/dashboard/routes/dashboard/settings/security/security.routes.js +++ b/frontend/app/javascript/dashboard/routes/dashboard/settings/security/security.routes.js @@ -1,20 +1,35 @@ import { frontendURL } from '../../../../helper/URLHelper'; import SettingsWrapper from '../SettingsWrapper.vue'; +const SecurityIndex = { + render() { + return null; + }, +}; + export default { - routes: [ - { - path: frontendURL('accounts/:accountId/settings/security'), - meta: { - permissions: ['administrator'], - }, - component: SettingsWrapper, - props: { - headerTitle: 'SECURITY_SETTINGS.TITLE', - icon: 'i-lucide-shield', - showNewButton: false, - }, - children: [], - }, - ], + routes: [ + { + path: frontendURL('accounts/:accountId/settings/security'), + meta: { + permissions: ['administrator'], + }, + component: SettingsWrapper, + props: { + headerTitle: 'SECURITY_SETTINGS.TITLE', + icon: 'i-lucide-shield', + showNewButton: false, + }, + children: [ + { + path: '', + name: 'security_settings_index', + component: SecurityIndex, + meta: { + permissions: ['administrator'], + }, + }, + ], + }, + ], };