From 95c83725d70fb3e50e412e32f380464901b30cf4 Mon Sep 17 00:00:00 2001 From: Vishnu Narayanan Date: Fri, 5 Apr 2024 12:11:30 +1100 Subject: [PATCH 1/5] chore: add db_reset make command (#9197) --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 16eb80718..7f2680a2d 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,9 @@ db_migrate: db_seed: RAILS_ENV=$(RAILS_ENV) bundle exec rails db:seed +db_reset: + RAILS_ENV=$(RAILS_ENV) bundle exec rails db:reset + db: RAILS_ENV=$(RAILS_ENV) bundle exec rails db:chatwoot_prepare @@ -49,4 +52,4 @@ debug_worker: docker: docker build -t $(APP_NAME) -f ./docker/Dockerfile . -.PHONY: setup db_create db_migrate db_seed db console server burn docker run force_run debug debug_worker +.PHONY: setup db_create db_migrate db_seed db_reset db console server burn docker run force_run debug debug_worker From 2397f817fbba58484dd3675a7a0270b7f2454e3e Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 5 Apr 2024 10:03:48 +0530 Subject: [PATCH 2/5] fix: add priority in filter keys [CW-3177] (#9179) * fix: ConditionValidationService fails on conversation priority * fix: custom attribute clash in spec --- lib/filters/filter_keys.yml | 6 ++++++ spec/listeners/automation_rule_listener_old_spec.rb | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/filters/filter_keys.yml b/lib/filters/filter_keys.yml index 598ab84d6..902b5f219 100644 --- a/lib/filters/filter_keys.yml +++ b/lib/filters/filter_keys.yml @@ -44,6 +44,12 @@ conversations: - "not_equal_to" - "is_present" - "is_not_present" + priority: + attribute_type: "standard" + data_type: "text" + filter_operators: + - "equal_to" + - "not_equal_to" display_id: attribute_type: "standard" data_type: "Number" diff --git a/spec/listeners/automation_rule_listener_old_spec.rb b/spec/listeners/automation_rule_listener_old_spec.rb index 4394a18bd..5103117cd 100644 --- a/spec/listeners/automation_rule_listener_old_spec.rb +++ b/spec/listeners/automation_rule_listener_old_spec.rb @@ -23,7 +23,7 @@ describe AutomationRuleListener do attribute_display_type: 'list', attribute_values: %w[regular platinum gold]) create(:custom_attribute_definition, - attribute_key: 'priority', + attribute_key: 'priority_level', account: account, attribute_model: 'conversation_attribute', attribute_display_type: 'list', @@ -267,7 +267,7 @@ describe AutomationRuleListener do context 'when rule matches based on custom_attributes' do before do - conversation.update!(custom_attributes: { priority: 'P2' }) + conversation.update!(custom_attributes: { priority_level: 'P2' }) conversation.contact.update!(custom_attributes: { cloud_customer: false }) automation_rule.update!( @@ -276,7 +276,7 @@ describe AutomationRuleListener do description: 'Add labels, assign team after conversation updated', conditions: [ { - attribute_key: 'priority', + attribute_key: 'priority_level', filter_operator: 'equal_to', values: ['P2'], custom_attribute_type: 'conversation_attribute', From 69ebdc63e300f2d7626d3e11299f0347af832ecf Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 5 Apr 2024 11:45:05 +0530 Subject: [PATCH 3/5] feat: better empty state for SLA (#9198) * feat: better empty state * feat: better create CTA * feat: use text-sm --- .../dashboard/i18n/locale/en/sla.json | 9 +++- .../routes/dashboard/settings/sla/Index.vue | 45 ++++++++++++++++--- .../settings/sla/components/SLAHeader.vue | 9 +++- 3 files changed, 54 insertions(+), 9 deletions(-) diff --git a/app/javascript/dashboard/i18n/locale/en/sla.json b/app/javascript/dashboard/i18n/locale/en/sla.json index d9670eb06..34f65c8a9 100644 --- a/app/javascript/dashboard/i18n/locale/en/sla.json +++ b/app/javascript/dashboard/i18n/locale/en/sla.json @@ -2,11 +2,18 @@ "SLA": { "HEADER": "SLA", "ADD_ACTION": "Add SLA", + "ADD_ACTION_LONG": "Create a new SLA Policy", "DESCRIPTION": "Service Level Agreements (SLAs) are contracts that define clear expectations between your team and customers. They establish standards for response and resolution times, creating a framework for accountability and ensures a consistent, high-quality experience.", "LEARN_MORE": "Learn more about SLA", "LOADING": "Fetching SLAs", "LIST": { "404": "There are no SLAs available in this account.", + "EMPTY": { + "TITLE_1": "Enterprise P0", + "DESC_1": "Issues raised by enterprise customers, that require immediate attention.", + "TITLE_2": "Enterprise P1", + "DESC_2": "Issues raised by enterprise customers, that needs to be acknowledged quickly." + }, "BUSINESS_HOURS_ON": "Business hours on", "BUSINESS_HOURS_OFF": "Business hours off", "RESPONSE_TYPES": { @@ -78,4 +85,4 @@ } } } -} +} \ No newline at end of file diff --git a/app/javascript/dashboard/routes/dashboard/settings/sla/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/sla/Index.vue index 278927d33..80b0fbbc1 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/sla/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/sla/Index.vue @@ -4,18 +4,49 @@ :loading-message="$t('SLA.LOADING')" >