Commit Graph

81 Commits

Author SHA1 Message Date
Pranav
9de8c27368 feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722)
Due to the pattern `**/specs/*.spec.js` defined in CircleCI, none of the
frontend spec in the folders such as
`specs/<domain-name>/getters.spec.js` were not executed in Circle CI.

This PR fixes the issue, along with the following changes: 
- Use vitest instead of jest
- Remove jest dependancies
- Update tests to work with vitest

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2024-07-10 08:32:16 -07:00
Shivam Mishra
9f625715ab fix: Cannot read properties of undefined (reading 'toLowerCase') (#9511)
Tried to replicate the issue, but Sentry didn't have enough information.
`toggleMessageSignature` is a user triggered action in
`ReplyBottomPanel.vue`, the value for `channelType` is provided from
`inboxMixin`. The error will occur if either `inbox` is an empty object
`{}` or `channel_type` in `inbox` object is undefined.

I couldn't find any instance where this could be the case. The PR has a
stop gap solution that ensures that no action is triggered
2024-05-23 12:08:04 +05:30
Sivin Varghese
8fe3c91813 feat: Custom attribute sidebar list UX improvements (#9070)
---------

Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2024-04-08 21:00:49 -07:00
Muhsin Keloth
1038d1500e feat: SLA reports view (#9189)
* feat: SLA report table


* feat: Add SLA popover card

* feat: Update popover position

* feat: Add loader

* Update SLACardLabel.vue

* feat: Update column order

* chore: fix conditions

* Update SLATable.vue

* chore: enable reports in ui

* chore: Revamp report SLA apis

* chore: revert download method

* chore: improve the code

* Update enterprise/app/views/api/v1/accounts/applied_slas/download.csv.erb

Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com>

* chore: style fixes

* chore: fix specs

* feat: Add number of conversations

* chore: review comments

* fix: translation

* Update app/javascript/dashboard/i18n/locale/en/report.json

Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com>

* Update app/javascript/dashboard/i18n/locale/en/report.json

Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com>

* Update app/javascript/dashboard/i18n/locale/en/report.json

Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com>

* Update SLAReportItem.vue

* Update report.json

* Update package.json

* chore: review comments

* chore: remove unused translation

* feat: Add TableHeaderCell component

* chore: more review fixes

* Update app/javascript/dashboard/components/widgets/TableHeaderCell.vue

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>

* Update TableHeaderCell.vue

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com>
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2024-04-09 10:14:36 +10:00
Sivin Varghese
e49ef773d8 feat: UI to show the SLA threshold in chat screen (#9146)
- UI will show the breach in the conversation list.
- UI will show the breach in the conversation header.

Fixes: https://linear.app/chatwoot/issue/CW-3146/update-the-ui-to-show-the-breach-in-the-conversation-list
Fixes: https://linear.app/chatwoot/issue/CW-3144/ui-update-to-show-the-breachgoing-to-breach
2024-04-04 15:46:46 +05:30
Sojan Jose
89d0b2cb6e feat: Add the bot performance reports UI (#9036)
Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2024-03-14 23:04:14 -07:00
Vishnu Narayanan
27ac262a26 feat(ee): Add support for SLA in automation rules (#8910)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2024-02-21 14:45:43 -08:00
Muhsin Keloth
b7a7e5a0d3 feat: Inbox list API integration (#8825)
* feat: Inbox view

* feat: Bind real values

* chore: code cleanup

* feat: add observer

* fix: Inbox icon

* chore: more code cleanup

* chore: Replace conversation id

* chore: Minor fix

* chore: Hide from side bar

* chore: Fix eslint

* chore: Minor fix

* fix: dark mode color

* chore: Minor fix

* feat: Add description for each notification types

* chore: remove commented code

* Update InboxList.vue

* Update InboxView.vue

* chore: fix specs

* fix: specs

* Update InboxView.vue

---------

Co-authored-by: iamsivin <iamsivin@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2024-02-01 12:10:58 +05:30
Surabhi Suman
4b40c61201 feat: Support Regex validation for custom attributes (#7856)
This allows a user to add/update a custom regex and a cue while defining custom attributes(Only applicable for type- text).
While adding/editing custom attributes, the values are validated against the attribute definition regex, and if it is incorrect, a cue message or default error message is shown and restricts invalid values from being saved.

Fixes: #6866
2024-01-23 18:01:57 +04:00
Pranav Raj S
2c7f93978e fix: Update broken specs (#8651)
- Use fakeTimer for time.spec.js
- Use default sort as last_activity_at_desc
- Update specs for getAllConversations getter
2024-01-05 13:09:09 -08:00
Vishnu Narayanan
8a8f325f64 fix: messageTimestamp test (#8644) 2024-01-05 12:36:26 +05:30
Clairton Rodrigo Heinzen
17725e4dd0 fix: Breakage of message pane when Openai integration isn't enabled (#8381)
Error when the Openai integration isn't enabled

fixes: https://github.com/chatwoot/chatwoot/issues/8379
2023-11-18 10:18:55 -08:00
Sojan Jose
7380f0e7ce chore: Making OpenAI label suggestions optional (#8374)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-11-17 19:54:15 -08:00
Shivam Mishra
5d224f2e04 feat: allow inbox specific flags for signature toggle (#8280)
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2023-11-08 10:47:22 +05:30
Sojan Jose
6a07251007 feat: Add the ability to self-assign conversations in macros (#8048)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-10-10 09:38:23 +05:30
Shivam Mishra
a88d155dd7 feat: update tool-chain to latest (#7975)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-09-27 14:02:34 +05:30
Sivin Varghese
b18cac77fb chore: Moved file upload methods to mixin (#7987)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-09-27 11:05:19 +05:30
Sojan Jose
9ba5adfd60 chore: Support multiple values for automation message content (#7871)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-09-19 13:04:58 +05:30
Pranav Raj S
71e9566854 Revert "feat: Ability to send attachment in new conversation (#7698)" (#7903) 2023-09-12 20:57:49 +05:30
Sivin Varghese
8bc2bc6d40 feat: Ability to send attachment in new conversation (#7698)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-09-08 12:12:24 +05:30
Muhsin Keloth
b89c917198 feat: Add CTAs for AI features (#7538) 2023-08-16 08:39:41 +05:30
Shivam Mishra
f8ae6cd95c fix: no method error when conversation is nil (#7566) 2023-07-26 17:40:41 +05:30
Muhsin Keloth
2a6f3356c9 chore: Show error message if the AI process APIs fails (#7560)
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2023-07-24 19:15:34 +05:30
Shivam Mishra
c83105ce4f feat: dismiss label suggestions only for 24 hours (#7579)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-07-24 17:51:09 +05:30
Pranav Raj S
27419eef66 feat: Add report on customer waiting time (#7545) 2023-07-20 12:01:22 -07:00
Pranav Raj S
25ed66edf5 feat: Update reports UI to make it better (#7544) 2023-07-19 12:12:15 -07:00
Muhsin Keloth
91c1061214 feat: Add more AI options (#7502)
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-07-16 12:25:16 -07:00
Shivam Mishra
7c080fa9fa feat: label suggestion UI (#7480) 2023-07-13 09:16:09 +05:30
Muhsin Keloth
9bb455ec2d feat: Ability to choose the custom time for snooze conversation (#7257) 2023-06-19 18:23:35 +05:30
Sivin Varghese
6bd0e074dc feat: Sort agents on availability status (#7174) 2023-05-25 14:49:56 +05:30
Muhsin Keloth
87f758ee1f feat: Order conversations by priority (#7053) 2023-05-11 12:56:43 +05:30
Pranav Raj S
04da8aa8dc fix: Remove duplicates message in WhatsApp Channel (#7003) 2023-04-26 19:57:06 -07:00
Muhsin Keloth
f1fc658a0d feat: Add an action in Macro to change the priority (#6940) 2023-04-24 17:14:30 +05:30
Sivin Varghese
be2356724e fix: Time specs (#6841) 2023-04-06 16:33:31 +05:30
Sivin Varghese
ab6276327a feat: Show year in message timestamp if the message is not from the current year (#6830)
* feat: Shows year in message timestamp if the message is not from the current year

* chore: Naming fix
2023-04-06 15:09:38 +05:30
Tejaswini Chile
6a0ca35de4 Feat: detect language of the message content (#6660) 2023-04-04 08:57:27 +05:30
Sojan Jose
ca1adb9960 feat: conversation participants (#4145)
Fixes #241
Fixes: chatwoot/product#648

Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-02-16 13:35:06 +05:30
Shivam Mishra
ba69f4cd35 test: fix time spec breaking circle CI (#6443) 2023-02-13 18:35:09 +05:30
Tejaswini Chile
7c21cef467 Added event for conversation opened (#6412) 2023-02-08 12:05:22 +05:30
Sivin Varghese
9782f71bdf feat: Shows the last activity, created at timestamp in the same row (#6267) 2023-01-23 21:50:16 +05:30
Sivin Varghese
add33d032c feat: Adds automation view for assigning an agent (#6131)
* feat: Adds automation view for assigning an agent

Co-authored-by: Tejaswini Chile <tejaswini@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-01-10 11:35:56 +05:30
Pranav Raj S
a3e5aad753 fix: Update the logic to show read status for web (#6107) 2022-12-30 13:54:37 -08:00
Sojan Jose
606fc9046a feat: Allow users to mark a conversation as unread (#5924)
Allow users to mark conversations as unread.
Loom video: https://www.loom.com/share/ab70552d3c9c48b685da7dfa64be8bb3

fixes: #5552

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-11-24 10:55:45 +03:00
Fayaz Ahmed
33aacb3401 Add team option in bulk actions (#5885) 2022-11-18 14:44:36 +05:30
Tejaswini Chile
e85f998a08 feat: Remove labels in macro (#5875) 2022-11-17 12:30:47 +05:30
Pranav Raj S
66044a0dc3 feat: Show last non-activity messages in the chat list (#5864) 2022-11-16 15:43:55 -08:00
Tejaswini Chile
826a735cdb fix: Assign agent action changes (#5827) 2022-11-15 13:15:27 +05:30
Fayaz Ahmed
9eb861a3b7 feat: Custom attributes in automations and refactor (#4548)
* Custom attributes

* Custom Attrs Manifest

* Fix dropdown values for custom attributes

* Handle edit mode for custom attributes

* Ported duplicate logic to a mixin

* fix Code climate issue

* Fix Codeclimate complexity warning

* Bug fix - Custom attributes getting duplicated

* Bug fixes and Code Climate issue fix

* Code Climate Issues Breakdown

* Fix test spec

* Add labels for Custom attributes in dropdown

* Refactor

* Refactor Automion mixin

* Refactor Mixin

* Refactor getOperator

* Fix getOperatorType

* File name method refactor

* Refactor appendNewCondition

* spec update

* Refactor methods

* Mixin Spec update

* Automation Mixins Test Specs

* Mixin Spec Rerun

* Automation validations mixin spec

* Automation helper test spec

* Send custom_attr key

* Fix spec fixtures

* fix: Changes for custom attribute type and lower case search

* fix: Specs

* fix: Specs

* fix: Ruby version change

* fix: Ruby version change

* Removes Lowercased values and fix label value in api payload

* Fix specs

* Fixed Query Spec

* Removed disabled labels if no attributes are present

* Code Climate Fixes

* fix: custom attribute with indifferent access

* fix: custom attribute with indifferent access

* Fix specs

* Minor label fix

* REtrigger circle ci build

* Update app/javascript/shared/mixins/specs/automationMixin.spec.js

* Update app/javascript/shared/mixins/specs/automationMixin.spec.js

* fix: Custom attribute case insensitivity search

* Add missing reset action method to input

* Set team_input to single select instead of multiple

* fix: remove value case check for date,boolean and number data type

* fix: cognitive complexity

* fix: cognitive complexity

* fix: Fixed activity message for automation system

* fix: Fixed activity message for automation system

* fix: Fixed activity message for automation system

* fix: codeclimate

* fix: codeclimate

* fix: action cable events for label update

* fix: codeclimate, conversation modela number of methods

* fix: codeclimate, conversation modela number of methods

* fix: codeclimate, conversation modela number of methods

* fix: codeclimate, conversation modela number of methods

* Fix margin bottom for attachment button

* Remove margin bottom to avoid conflict from macros

* Fix automation action query generator using the right key

* fix: not running message created event for activity message

* fix: not running message created event for activity message

* codeclimate fix

* codeclimate fix

* codeclimate fix

* Update app/javascript/dashboard/mixins/automations/methodsMixin.js

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Update app/javascript/shared/mixins/specs/automationHelper.spec.js

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Update app/javascript/dashboard/helper/automationHelper.js

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Update app/javascript/dashboard/mixins/automations/methodsMixin.js

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2022-11-10 10:53:29 +05:30
Tejaswini Chile
7352b928da feat: Add assign agent option in macro (#5821)
Co-authored-by: fayazara <fayazara@gmail.com>
2022-11-09 09:52:48 -08:00
Muhsin Keloth
92724576af fix: Update conversation read status indicator logic (#5777) 2022-10-31 09:35:48 -07:00