chatwoot/app/javascript/dashboard/components
Sivin Varghese be6bc88f80
fix: Translation issue in reports table headers on reload (#11793)
# Pull Request Template

## Description

This PR fixes the translation inconsistency in the reports pages, where
table-column headers reverted to English after a page reload.

**Cause**
The components defined the columns array statically, so header labels
were translated only once during component creation. On reload, the
table showed the default system language (English) until the user’s
locale finished loading.

**Solution**
Replaced the static columns array with a computed property and passed it
to `Tanstack useVueTable` via a getter. This makes the headers reactive,
ensuring they automatically update whenever the locale changes and
remain translated after every reload.

Fixes
https://linear.app/chatwoot/issue/CW-4539/translation-issue-in-reports-page-table-header-on-reload

## 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
2025-06-24 12:38:05 +05:30
..
Accordion chore: Remove old buttons from Vue2 design (#11159) 2025-03-31 17:51:38 -07:00
app chore: Update buttons in dashboard (#11145) 2025-03-31 17:21:32 -07:00
base feat: Eslint rules (#9839) 2024-08-05 14:02:16 +05:30
buttons fix: Style issue with conversation header (#11655) 2025-06-03 15:21:30 +05:30
copilot feat: Update UI for Copilot (#11561) 2025-06-02 22:02:03 -05:00
layout feat: Show active Contacts (#8243) 2025-06-04 21:52:13 +05:30
specs chore: Update buttons in dashboard (#11145) 2025-03-31 17:21:32 -07:00
table fix: Translation issue in reports table headers on reload (#11793) 2025-06-24 12:38:05 +05:30
ui feat: Scroll lock on message context menu (#11454) 2025-05-23 16:12:18 +05:30
widgets feat: Add activity messages for linear actions (#11654) 2025-06-13 11:57:11 +05:30
ChannelSelector.vue feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
ChatList.vue fix: Incorrect conversation count shown for filters/folders after idle period (#11770) 2025-06-19 14:05:18 +05:30
ChatListHeader.vue feat: Show conversation count for filters/folders in header (#11698) 2025-06-10 13:59:25 -04:00
Code.vue feat: update colors for v4 (#10660) 2025-01-15 17:13:03 +05:30
ConversationItem.vue feat: Add conversation delete feature (#11677) 2025-06-05 15:53:17 -05:00
CustomAttribute.vue fix: Issues with custom attributes in conversation sidebar (#11476) 2025-05-16 15:22:18 +05:30
CustomBrandPolicyWrapper.vue style: apply fixes for eslint issues [cw-3590] (#10210) 2024-10-03 15:02:12 +05:30
CustomSnoozeModal.vue chore: Update buttons in conversation screens(#11132) 2025-03-21 14:47:28 +05:30
FormSection.vue feat: Eslint rules (#9839) 2024-08-05 14:02:16 +05:30
index.js chore: Remove old buttons from Vue2 design (#11159) 2025-03-31 17:51:38 -07:00
IntersectionObserver.vue feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
Modal.vue chore: Update buttons in conversation screens(#11132) 2025-03-21 14:47:28 +05:30
ModalHeader.vue chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
NetworkNotification.vue chore: Update buttons in conversation screens - 2 (#11134) 2025-03-21 21:54:54 +05:30
policy.vue feat: Add visibility checks for installation types (#10773) 2025-02-21 14:48:31 -08:00
SettingsSection.vue chore: Update styles in settings pages (#11070) 2025-03-18 14:40:02 -07:00
SidemenuIcon.vue chore: Update buttons in dashboard (#11145) 2025-03-31 17:21:32 -07:00
Snackbar.vue fix: Snackbar notifications hidden behind modal dialogs (#11616) 2025-05-29 12:49:38 +05:30
SnackbarContainer.vue fix: Snackbar notifications hidden behind modal dialogs (#11616) 2025-05-29 12:49:38 +05:30