iachat/app/javascript/dashboard/store/modules
Shivam Mishra e0ef007047
fix: Fix Sentry issues from Vite migration (#10262)
Fixes the following issues

- https://chatwoot-p3.sentry.io/issues/5966466083
- https://chatwoot-p3.sentry.io/issues/5966497518
- https://chatwoot-p3.sentry.io/issues/5966555379

For the first one, I am not sure if the fix is 100% correct, since I was
not able to reproduce, but I am confident it will work.

For both, 1st and 2nd issues, the problem came from the fact that we set
individual records to `undefined` when the intent was to remove it,
explicitly using delete fixes the issue.

### Whats up with the store changes?

Glad you asked, this comes down to Vue reactivity, previously Vue didn't
track undefined strictly, it just kinda ignored it, in Vue 3, the
reactivity changed significantly when they introduced ES6 proxies. The
Proxy tracks all property changes, including those set to undefined, so
properties remain enumerable.

So to delete a record, we actually have to the delete it using the
delete keyword, or replace the parent object with a new object splicing
the object to be deleted out.

I am assuming it worked earlier because VueX 3 reactivity was using
Object.defineProperty. Setting it to undefined might have "deleted" it
earlier

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
2024-10-14 10:44:59 -07:00
..
contacts fix: Fix Sentry issues from Vite migration (#10262) 2024-10-14 10:44:59 -07:00
conversations feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
helpCenterArticles chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
helpCenterCategories feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
helpCenterPortals feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
notifications fix: Fix Sentry issues from Vite migration (#10262) 2024-10-14 10:44:59 -07:00
specs chore: Custom Roles to manage permissions [ UI ] (#9865) 2024-09-17 11:40:11 -07:00
teams feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
accounts.js feat: Replace rtlMixin to a composable (#9924) 2024-08-12 15:50:21 +05:30
agentBots.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
agents.js fix: Update the relevant agent presence only (#5220) 2022-08-09 12:32:09 +05:30
attributes.js feat: Custom fields in pre-chat form (#4189) 2022-04-19 12:47:29 +05:30
auditlogs.js feat: audit logs UI (#6803) 2023-04-17 19:11:05 +05:30
auth.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
automations.js feat: Update the design for automation (#10002) 2024-08-22 16:22:54 +05:30
bulkActions.js feat: Adds support for all snooze option in bulk actions (#9361) 2024-05-09 19:27:31 +05:30
campaigns.js feat: more events tracking for SaaS (#6234) 2023-01-17 21:53:40 -08:00
cannedResponse.js feat: Update the design for canned responses (#9903) 2024-08-07 09:43:47 -07:00
contactConversations.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
contactLabels.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
contactNotes.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
conversationLabels.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
conversationMetadata.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
conversationPage.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
conversationSearch.js fix: Search improvements and bug fixes [CW-1604] (#6985) 2023-04-27 13:20:29 +05:30
conversationStats.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
conversationTypingStatus.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
conversationWatchers.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
csat.js feat: more CSAT filters (#7038) 2023-05-18 22:50:46 +05:30
customRole.js chore: Custom Roles to manage permissions [ UI ] (#9865) 2024-09-17 11:40:11 -07:00
customViews.js feat: Split reconnect logic PR (store) (#9520) 2024-05-30 12:29:55 +05:30
dashboardApps.js feat: Add the ability to create dashboard apps from the UI (#4924) 2022-07-08 15:55:32 +07:00
draftMessages.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
inboxAssignableAgents.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
inboxes.js fix: Show error messages from response (#10173) 2024-09-26 20:16:39 -07:00
inboxMembers.js Chore: Inbox Members API improvements (#3008) 2021-09-14 11:55:02 +05:30
integrations.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
labels.js feat: multiple UX improvements to labels (#7358) 2023-06-25 18:49:49 +05:30
macros.js feat: Add API module and Vuex store for Macros (#5603) 2022-10-11 22:54:17 -07:00
reports.js feat: Add the bot performance reports UI (#9036) 2024-03-14 23:04:14 -07:00
sla.js feat: add option to delete and disable edits for SLA (#9108) 2024-03-15 12:21:32 +05:30
SLAReports.js feat: Download SLA reports (#9201) 2024-04-08 20:51:34 -07:00
teamMembers.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
userNotificationSettings.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
webhooks.js feat: Add event subscription option to webhooks (#4540) 2022-04-25 17:44:42 +05:30