chatwoot/app/javascript/dashboard/components
Shivam Mishra 50efd28d16
feat: Add support for frontend filtering of conversations (#11111)
This pull request includes significant changes to the filtering logic
for conversations in the frontend, here's a summary of the changes

This includes adding a `matchesFilters` method that evaluates a
conversation against the applied filters. It does so by first evaluating
all the conditions, and later converting the results into a JSONLogic
object that can be evaluated according to Postgres operator precedence

### Alignment Specs

To ensure the frontend and backend implementations always align, we've
added tests on both sides with same cases, for anyone fixing any
regressions found in the frontend implementation, they need to ensure
the existing tests always pass.

Test Case | JavaScript Spec | Ruby Spec | Match?
-- | -- | -- | --
**A AND B OR C** | Present | Present | Yes
Matches when all conditions are true | Present | Present | Yes
Matches when first condition is false but third is true | Present |
Present | Yes
Matches when first and second conditions are false but third is true |
Present | Present | Yes
Does not match when all conditions are false | Present | Present | Yes
**A OR B AND C** | Present | Present | Yes
Matches when first condition is true | Present | Present | Yes
Matches when second and third conditions are true | Present | Present |
Yes
**A AND B OR C AND D** | Present | Present | Yes
Matches when first two conditions are true | Present | Present | Yes
Matches when last two conditions are true | Present | Present | Yes
**Mixed Operators (A AND (B OR C) AND D)** | Present | Present | Yes
Matches when all conditions in the chain are true | Present | Present |
Yes
Does not match when the last condition is false | Present | Present |
Yes

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2025-03-24 19:39:04 -07:00
..
Accordion fix: Remove overflow-hidden on accordionItem (#10692) 2025-01-16 01:29:20 +05:30
app style: apply fixes for eslint issues [cw-3590] (#10210) 2024-10-03 15:02:12 +05:30
base feat: Eslint rules (#9839) 2024-08-05 14:02:16 +05:30
buttons refactor: show deprecation warnings in dev only (#10868) 2025-02-11 19:15:46 +05:30
copilot feat: allow copilot use without connecting an inbox (#10992) 2025-02-28 15:20:39 -08:00
layout chore: Add internal feature flags for Chatwoot Cloud (#10902) 2025-02-15 16:21:46 -08:00
specs feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
table feat: Add per-page support for agent and team overview report pagination (#11110) 2025-03-19 16:45:59 +05:30
ui chore: Update buttons in conversation screens(#11132) 2025-03-21 14:47:28 +05:30
widgets feat: Add support for frontend filtering of conversations (#11111) 2025-03-24 19:39:04 -07:00
ChannelSelector.vue feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
ChatList.vue feat: Add support for frontend filtering of conversations (#11111) 2025-03-24 19:39:04 -07:00
ChatListHeader.vue feat: update colors for v4 (#10660) 2025-01-15 17:13:03 +05:30
Code.vue feat: update colors for v4 (#10660) 2025-01-15 17:13:03 +05:30
ConversationItem.vue fix: Usability issues in conversation card context menu (#10971) 2025-02-25 16:48:04 +05:30
CustomAttribute.vue chore: Update buttons in conversation screens(#11132) 2025-03-21 14:47:28 +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 feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
IntersectionObserver.vue feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
MaskedText.vue feat: Eslint rules (#9839) 2024-08-05 14:02:16 +05:30
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 feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
Snackbar.vue feat: Eslint rules (#9839) 2024-08-05 14:02:16 +05:30
SnackbarContainer.vue feat: update notification settings (#10529) 2024-12-05 19:05:04 +05:30