Commit Graph

4205 Commits

Author SHA1 Message Date
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
7ae09ce1bf feat: Reports filter components (#9204)
* feat: Reports filter components

* Update FilterButton.vue

* Update FilterDropdownSearch.vue

* feat: Adds component level search

* Update FilterDropdownSearch.vue

* chore: Set max height

* feat: Add focus

* chore: Uses picoSearch package
2024-04-08 20:46:08 +10:00
Sivin Varghese
aef4b582db fix: Update the SLA alert styles to match the labels (#9199) 2024-04-05 09:06:52 -07:00
Shivam Mishra
69ebdc63e3 feat: better empty state for SLA (#9198)
* feat: better empty state

* feat: better create CTA

* feat: use text-sm
2024-04-05 11:45:05 +05:30
Shivam Mishra
2397f817fb fix: add priority in filter keys [CW-3177] (#9179)
* fix: ConditionValidationService fails on conversation priority

* fix: custom attribute clash in spec
2024-04-05 10:03:48 +05:30
Vishnu Narayanan
95c83725d7 chore: add db_reset make command (#9197) 2024-04-05 12:11:30 +11:00
Vishnu Narayanan
fa3bc05d3d chore: fix sla email notifications (#9192)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2024-04-04 21:16:49 +05:30
Sojan Jose
18bfda35b3 chore: Fix agent API returning 500 error (#9193)
- We were using the @user object in the view, which wasn't available when using api_access_token.
- Also replaced the object to @agent and added additional specs to confirm the right object

fixes: https://linear.app/chatwoot/issue/CW-3185/agent-create-api-throwing-500-response
ref: https://discord.com/channels/647412545203994635/1219928138163949568/1219928138163949568
2024-04-04 19:44:47 +05:30
Sojan Jose
5c9acfb4e9 chore: Handle duplicate Webhooks from slack (#9187)
* chore: Handle duplicate Webhooks from slack

* chore: fixes

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2024-04-04 17:00:45 +05:30
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
Jaideep Guntupalli
e21d7552d3 feat: extending lock to single conversation to meta inbox (#9104)
This change introduces the ability to lock conversations to a single thread for Instagram and facebook messages within the Meta inbox, mirroring existing functionality in WhatsApp and SMS inboxes.

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2024-04-03 21:33:23 +05:30
Sojan Jose
6b7a707fef chore: Security upgrade omniauth-google-oauth2 from 1.1.1 to 1.1.2 (#9173)
fix: Gemfile & Gemfile.lock to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-RUBY-RACK-1061917

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2024-04-03 20:22:46 +05:30
Muhsin Keloth
727fa67735 feat: SLA reports store (#9185)
- Added sla reports actions, getters and mutations.
2024-04-03 12:53:31 +05:30
Muhsin Keloth
fc25f43448 feat: Add SLA reports overview component (#9167) 2024-04-02 15:08:19 -07:00
Muhsin Keloth
631598b6b6 chore: Fix twilio inbox create transaction rollback (#9181)
chore: Fix twilio create transaction
2024-04-02 15:04:10 +05:30
Sojan Jose
4e28481f27 feat: Conversation API to return applied_sla and sla_events (#9174)
* chore: Add sla_events to push_event_data

* chore: Return SLA details in the API

* chore: feature lock sla push event data

* Update _conversation.json.jbuilder

* chore: rubocop fixes
2024-04-01 23:30:07 +05:30
Vishnu Narayanan
16282f6a66 feat: Add push/email notification support for SLA (#9140)
* feat: update SLA evaluation logic

* Update enterprise/app/services/sla/evaluate_applied_sla_service.rb

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>

* chore: refactor spec to bring down expecations in a single block

* chore: fix process_account_applied_sla spec

* chore: add spec to test multiple nrt misses

* feat: persist sla notifications

* feat: revert persist sla notifications

* feat: add SLA push/email notification support

* chore: refactor sla_status to include active_with_misses

* chore: add support for sla push/email notifications

* chore: refactor

* chore: add liquid templates

* chore: add spec for liquid templates

* chore: add spec for sla email notifications

* chore: add spec for SlaPolicyDrop

* chore: refactor to ee namespace

* chore: set enterprise test type to mailer

* feat: enable sla notification settings only if SLA enabled

* chore: refactor

* chore: fix spec

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2024-03-29 20:27:21 +11:00
Vishnu Narayanan
6956436a76 feat: refactor SLA evaluation logic (#9133)
* feat: update SLA evaluation logic

* chore: handle nrt

* chore: handle applied_sla status

* chore: refactor spec to bring down expecations in a single block

* chore: fix process_account_applied_sla spec

* chore: add spec to test multiple nrt misses

* feat: persist sla notifications

* feat: revert persist sla notifications

* chore: refactor sla_status to include active_with_misses

* chore: refactor spec

* Update evaluate_applied_sla_service.rb

* minor refactors

* clean up

* move notification related spec

* chore: refactor notifications spec to sla_event model

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2024-03-29 02:01:43 +11:00
Shivam Mishra
9a1c54a82d feat: disable automation rules if condition fails multiple times (#9017)
* feat: add email for disabling automation rule

* feat: disable automation rules and notify admin

* feat: reset error count after update

* feat: trigger invalid_condition_error if rule is invalid

* feat: setup error trackable concern

* refactor: use ErrorTrackable in Reauthorizable

* fix: optional argument

* feat: separate reauthorization_required_key

* test: update case to use ERROR_TRACKABLE_COUNT

* Revert "test: update case to use ERROR_TRACKABLE_COUNT"

This reverts commit f439847147556a02759a7597a7fcf1d66091cafc.

* Revert "feat: separate reauthorization_required_key"

This reverts commit f4514fce217b0a2f2c2bf701a15de0a8b47acbc4.

* Revert "fix: optional argument"

This reverts commit 93b4194ec3f10f67e2402388c966c071c4d3b4fd.

* Revert "refactor: use ErrorTrackable in Reauthorizable"

This reverts commit 513c2a522bc782e73ea4b0f5ae34ce01e70e042c.

* Revert "feat: setup error trackable concern"

This reverts commit 278683060cf422f60af5d5c77100aa5272141141.

* feat: use reauthorizable for automation rule

* feat: remove redis key

* test: fix method names

* chore: refactor

---------

Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com>
Co-authored-by: Sojan <sojan@pepalo.com>
2024-03-28 13:14:16 +05:30
Sivin Varghese
3e07320d22 feat: SLA threshold card component (#9163)
- Component to display SLA timer in the conversation card and header
2024-03-27 13:19:51 +05:30
Shivam Kumar
1253264382 fix: Avoid duplicate invitation emails when adding an agent (#9131)
Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2024-03-26 18:58:45 -07:00
dependabot[bot]
2ee911e33a chore(deps): bump express from 4.18.2 to 4.19.2 (#9159)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 15:22:06 -07:00
dependabot[bot]
cdcf02c943 chore(deps): bump follow-redirects from 1.15.3 to 1.15.6 (#9119)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 15:12:39 -07:00
Sojan Jose
3b7694b163 chore(snyk): Security upgrade markdown-it from 13.0.1 to 13.0.2 (#9153)
fix: package.json & yarn.lock to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-MARKDOWNIT-6483324

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2024-03-26 15:12:09 -07:00
Shivam Mishra
d1dd319091 feat: API to download breached conversations (#9150)
* feat: add download conversations endpoint

* feat: template for conversation list download

* feat: setup download API and tests

* chore: revert formatting change

* feat: rename download method

* feat: rename template

* feat: include sla_policy table in download query

* refactor: add nil safety to assignee

* chore: Update en.yml

* fix: remove applied_sla relation
2024-03-26 09:22:49 +05:30
Shivam Mishra
9917cb4273 fix: Convert cached_label_list to text (#9143) 2024-03-25 18:47:08 -07:00
Muhsin Keloth
48452a42f4 feat: Add SLA metrics API (#9132) 2024-03-25 12:24:43 +05:30
Sivin Varghese
6d4551bca2 feat: Update the design for SLA policy management pages (#9136)
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2024-03-22 14:39:09 -07:00
Shivam Mishra
e94b276f64 feat: Add help URLs for features in features.yml (#9134)
Co-authored-by: Pranav <pranav@chatwoot.com>
2024-03-21 10:30:46 -07:00
Sivin Varghese
c51492c674 feat: SLA List Item component (#9135)
- Base settings list and list item components.
- SLA list item component.

Fixes: https://linear.app/chatwoot/issue/CW-3126/create-a-sla-list-item-component-with-the-new-design


Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2024-03-21 19:30:11 +05:30
Ryan Kon
762a39330a fix: use safe nav when downcasing email in from_email (#9139)
Use safe nav when downcasing email in from_email
2024-03-21 18:44:04 +05:30
Sivin Varghese
44956176a1 feat: Add SLA header component (#9129)
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2024-03-20 21:04:44 -07:00
Sojan Jose
1303469087 feat: Ability filter blocked contacts (#9048)
- This PR introduces the ability to filter blocked contacts from the contacts filter UI
2024-03-20 18:11:50 +05:30
Pranav
f78f278e2f fix: Update validations for filter service (#8239)
- Refactor filter service for better readability and maintenance
- Add validations for the following:
   - If an invalid attribute is passed, a custom exception InvalidAttribute will be thrown.
   - If an invalid operator is passed, a custom exception InvalidOperator will be thrown.
   - If an invalid value (currently checking only null check), a custom exception InvalidValue will be thrown.

Fixes: https://linear.app/chatwoot/issue/CW-2702/activerecordstatementinvalid-pginvalidtextrepresentation-error-invalid
Fixes: https://linear.app/chatwoot/issue/CW-2703/activerecordstatementinvalid-pginvaliddatetimeformat-error-invalid
Fixes:  https://linear.app/chatwoot/issue/CW-2700/activerecordstatementinvalid-pgsyntaxerror-error-syntax-error-at-or


Co-authored-by: Sojan <sojan@pepalo.com>
2024-03-20 16:29:36 +05:30
Vishnu Narayanan
b017d05ed9 feat: add sla events table (#9126)
* feat: add sla events table

* chore: refactor to EE namespace

* chore: refactor

* chore: fix spec

* chore: add references to account,inbox,sla_policy

* chore: update specs

* chore: update spec to check backfilling id's

* Update spec/enterprise/models/sla_event_spec.rb
2024-03-20 11:59:37 +05:30
Shivam Mishra
bd97226c95 fix: Locale not correct in root url when accessing help center with custom domain (#9110)
- Ensuring that SwitchLocale concern handles the case of custom domain for portals and set locale according to that

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2024-03-19 18:48:59 +05:30
Sojan
a8b930e351 Merge branch 'release/3.7.0' into develop 2024-03-18 17:27:23 +05:30
Sojan
e1e8857195 Bump version to 3.7.0 2024-03-18 17:26:09 +05:30
Muhsin Keloth
b5c6d90abd chore: Fix CSATMetrics component snap shot spec (#9122)
chore: Fix snapshot specs
2024-03-18 17:02:23 +05:30
Sojan Jose
fd832d7593 chore: Add verbose errors for IMAP email channels (#9116) 2024-03-15 20:53:23 -07:00
Vishnu Narayanan
29e44ac6d0 feat: add option to delete and disable edits for SLA (#9108)
* feat: add delete button for SLA

* chore: remove edit SLA

* chore: remove update related texts from i18n
2024-03-15 12:21:32 +05:30
Sivin Varghese
58ee2e125a fix: Update the error response during changing the password from profile settings (#9114) 2024-03-14 23:07:19 -07:00
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
Sivin Varghese
476077ab84 fix: Update location component to avoid overflow, handle location title from Telegram payload (#9113)
Co-authored-by: Pranav <pranav@chatwoot.com>
2024-03-14 22:53:43 -07:00
Muhsin Keloth
586552013e feat: Update the contact_type when creating or updating the contact (#9107)
* feat: Update location and country code when the contact create/update

* feat: Update the location and country_code when creating or updating the contact.

* chore: improve comments

* feat: Update the contact_type when the contact created/updated

* chore: add more specs

* chore: code cleanups

* chore: code cleanups

* Update contact_spec.rb

* Update inbox.rb

* Update sync_attributes_spec.rb

* chore: build fixes

* chore: check visitor type before update

* chore: review fixes
2024-03-15 10:55:40 +05:30
Sojan Jose
3dae3ff3ad feat: Conversation update API for sla_policy_id (#8973)
- Add an endpoint for updating conversation attributes (priority / sla_policy_id )
- Swagger spec
- minor chores around the conversation API/spec

Fixes: https://linear.app/chatwoot/issue/CW-2100/feat-backend-api-to-update-the-sla-of-a-conversation
2024-03-14 17:22:32 +05:30
Sivin Varghese
29171565ed feat: Add image preview for inline images in vue-letter (#9099)
Co-authored-by: Pranav <pranav@chatwoot.com>
2024-03-13 18:46:35 -07:00
Matheus Rodrigues
55fcbe2dde feat: Add the ability to zoom on chat images (#9093)
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2024-03-13 18:04:42 -07:00
Vishnu Narayanan
7f4b2d66d4 feat: add activity message for SLA (#9100)
* feat: add activity message for SLA

* chore: refactor to reduce method complexity

* chore: refactor

* feat: add spec for SLAactivity message

* chore: move SLA spec to enterprise folder

* chore: move team activity methods to a separate module

* chore: fix typo

* chore: move sla activity message spec to conversation model
2024-03-13 20:05:34 +05:30
Muhsin Keloth
804a42c271 feat: Update the location and country_code when creating or updating the contact (#9106)
* feat: Update the location and country_code when creating or updating the contact.

* chore: improve comments
2024-03-13 16:40:21 +05:30