iachat/spec/controllers/api/v1/accounts
Sojan Jose 2a90652f05
feat: Add draft status for help center locales (#13768)
This adds a draft status for Help Center locales so teams can prepare
localized content in the dashboard without exposing those locales in the
public portal switcher until they are ready to publish.

Fixes: https://github.com/chatwoot/chatwoot/issues/10412
Closes: https://github.com/chatwoot/chatwoot/issues/10412

## Why

Teams need a way to work on locale-specific Help Center content ahead of
launch. The public portal should only show ready locales, while the
admin dashboard should continue to expose every allowed locale for
ongoing article and category work.

## What this change does

- Adds `draft_locales` to portal config as a subset of `allowed_locales`
- Hides drafted locales from the public portal language switchers while
keeping direct locale URLs working
- Keeps drafted locales fully visible in the admin dashboard for article
and category management
- Adds locale actions to move an existing locale to draft, publish a
drafted locale, and keep the default locale protected from drafting
- Adds a status dropdown when creating a locale so new locales can be
created as `Published` or `Draft`
- Returns each admin locale with a `draft` flag so the locale UI can
reflect the public visibility state

## Validation

- Seed a portal with multiple locales, draft one locale, and confirm the
public portal switcher hides it while `/hc/:slug/:locale` still loads
directly
- In the admin dashboard, confirm drafted locales still appear in the
locale list and remain selectable for articles and categories
- Create a new locale with `Draft` status and confirm it stays out of
the public switcher until published
- Move an existing locale back and forth between `Published` and `Draft`
and confirm the public switcher updates accordingly


## Demo 



https://github.com/user-attachments/assets/ba22dc26-c2e7-463a-b1f5-adf1fda1f9be

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2026-03-17 12:45:54 +04:00
..
actions chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
assignment_policies feat: Add assignment policies controllers with jbuilder views (#12199) 2025-08-18 19:15:21 -07:00
captain feat: add global config for captain settings (#13141) 2026-01-12 19:54:19 +05:30
channels chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
contacts feat: API to create HMAC verified conversations (#7209) 2023-05-29 21:57:24 +05:30
conversations feat: validate OpenAPI spec using Skooma (#13623) 2026-03-10 18:33:55 -07:00
google refactor: use state-based authentication (#11690) 2025-06-18 17:39:06 +05:30
inboxes feat: Add assignment policies controllers with jbuilder views (#12199) 2025-08-18 19:15:21 -07:00
instagram feat: Added the ability to create Instagram channel (#11182) 2025-04-03 13:57:14 +05:30
integrations feat: Add user attribution to Linear integration with actor authorization (#11774) 2025-07-01 16:49:26 +05:30
microsoft refactor: use state-based authentication (#11690) 2025-06-18 17:39:06 +05:30
notion feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
tiktok feat(inbox): Enable conversation continuity for social channels (#11079) 2026-02-25 13:56:51 +04:00
twitter chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
whatsapp chore: Enable flexible whatsapp onboarding (Manual + Embedded Signup) options (#12344) 2025-09-15 19:59:56 +05:30
agent_bots_controller_spec.rb feat: Ability to reset api_access_token (#11565) 2025-05-29 14:42:13 +05:30
agents_controller_spec.rb feat: validate OpenAPI spec using Skooma (#13623) 2026-03-10 18:33:55 -07:00
articles_controller_spec.rb feat(help-center): enable drag-and-drop category reordering (#13706) 2026-03-05 12:53:38 +05:30
assignable_agents_controller_spec.rb chore: Add Assignable Agents API (#4722) 2022-05-23 19:24:07 +05:30
assignment_policies_controller_spec.rb feat: Add assignment policies controllers with jbuilder views (#12199) 2025-08-18 19:15:21 -07:00
automation_rules_controller_spec.rb fix: Validate blob before attaching it to a record (#13115) 2025-12-19 19:02:21 -08:00
bulk_actions_controller_spec.rb feat: Bulk delete for contacts (#12778) 2025-11-04 17:47:53 -08:00
callbacks_controller_spec.rb chore: Handle attachments in Whatsapp Channel (#3299) 2021-11-11 13:03:48 +05:30
campaigns_controller_spec.rb chore: Add validations to campaign model 2025-03-19 17:29:08 -07:00
canned_responses_controller_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
categories_controller_spec.rb feat(help-center): enable drag-and-drop category reordering (#13706) 2026-03-05 12:53:38 +05:30
contact_inboxes_controller_spec.rb chore: Add an API to find the contacts using contact inbox sourceId (#8012) 2023-09-28 15:26:28 -07:00
contacts_controller_spec.rb feat: validate OpenAPI spec using Skooma (#13623) 2026-03-10 18:33:55 -07:00
conversations_controller_spec.rb feat: validate OpenAPI spec using Skooma (#13623) 2026-03-10 18:33:55 -07:00
csat_survey_responses_controller_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
custom_attribute_definitions_controller_spec.rb chore: Ability to filter conversations with priority (#10967) 2025-03-03 16:38:22 +05:30
custom_filters_controller_spec.rb chore: Increase custom filter limit from 50 to 1000 per user (#12603) 2025-10-06 10:41:26 -07:00
dashboard_apps_controller_spec.rb fix: validate url for Dashboard Apps [CW-2979] (#8736) 2024-01-18 17:48:30 +05:30
inbox_csat_templates_controller_spec.rb feat(csat): Add WhatsApp utility template analyzer with rewrite guidance (#13575) 2026-02-24 15:11:04 +04:00
inbox_members_controller_spec.rb feat: invalidate cache after inbox members or team members update (#10869) 2025-02-20 21:28:38 -08:00
inboxes_controller_spec.rb feat: validate OpenAPI spec using Skooma (#13623) 2026-03-10 18:33:55 -07:00
labels_controller_spec.rb chore: Update dependencies to the latest versions (#5033) 2022-07-15 09:51:59 +07:00
macros_controller_spec.rb Revert "chore: Upgrade Rails to 7.2.2 and update Gemfile dependencies (#11037)" 2026-02-03 21:09:42 -08:00
notification_settings_controller_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
notifications_controller_spec.rb feat: Update last_snoozed_at after the un-snooze notification (#8943) 2024-02-20 18:55:39 +05:30
portals_controller_spec.rb feat: Add draft status for help center locales (#13768) 2026-03-17 12:45:54 +04:00
search_controller_spec.rb feat: Advanced Search Backend (#12917) 2026-01-07 15:30:49 +05:30
team_members_controller_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
teams_controller_spec.rb feat: validate OpenAPI spec using Skooma (#13623) 2026-03-10 18:33:55 -07:00
webhook_controller_spec.rb feat(webhooks): add name to webhook (#12641) 2025-11-13 13:28:15 +05:30