From e49ef773d810e3443b8fc8df35015cde268fc7bd Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Thu, 4 Apr 2024 15:46:46 +0530 Subject: [PATCH] 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 --- .../dashboard/components/ChatList.vue | 38 ++--- .../dashboard/components/ui/Label.vue | 4 +- .../widgets/conversation/ConversationCard.vue | 11 +- .../conversation/ConversationHeader.vue | 22 ++- .../conversation/components/SLACardLabel.vue | 122 +++++++++----- .../components/SLAPopoverCard.vue | 45 ++++++ .../conversationCardComponents/CardLabels.vue | 35 ++-- .../widgets/conversation/helpers/SLAHelper.js | 117 ++++++++++++++ .../helpers/specs/SLAHelper.spec.js | 150 ++++++++++++++++++ .../i18n/locale/en/conversation.json | 8 +- .../mixins/conversation/labelMixin.js | 1 + .../store/modules/specs/sla/actions.spec.js | 78 +++++++++ .../store/modules/specs/sla/fixtures.js | 95 +++++++++++ .../store/modules/specs/sla/getters.spec.js | 26 +++ .../store/modules/specs/sla/mutations.spec.js | 34 ++++ .../FluentIcon/dashboard-icons.json | 2 + app/models/concerns/push_data_helper.rb | 15 ++ app/models/conversation.rb | 28 ++-- enterprise/app/models/applied_sla.rb | 12 ++ .../app/models/enterprise/conversation.rb | 5 + .../conversations/event_data_presenter.rb | 3 +- 21 files changed, 745 insertions(+), 106 deletions(-) create mode 100644 app/javascript/dashboard/components/widgets/conversation/components/SLAPopoverCard.vue create mode 100644 app/javascript/dashboard/components/widgets/conversation/helpers/SLAHelper.js create mode 100644 app/javascript/dashboard/components/widgets/conversation/helpers/specs/SLAHelper.spec.js create mode 100644 app/javascript/dashboard/store/modules/specs/sla/actions.spec.js create mode 100644 app/javascript/dashboard/store/modules/specs/sla/fixtures.js create mode 100644 app/javascript/dashboard/store/modules/specs/sla/getters.spec.js create mode 100644 app/javascript/dashboard/store/modules/specs/sla/mutations.spec.js create mode 100644 app/models/concerns/push_data_helper.rb create mode 100644 enterprise/app/models/enterprise/conversation.rb diff --git a/app/javascript/dashboard/components/ChatList.vue b/app/javascript/dashboard/components/ChatList.vue index a75f0c12b..26c057f98 100644 --- a/app/javascript/dashboard/components/ChatList.vue +++ b/app/javascript/dashboard/components/ChatList.vue @@ -1,14 +1,14 @@