workarea-admin 3.5.21 → 3.5.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d5ffbe0a96b1231e86d0f29728216cc596c72c111e4c1ea7a7252293feb21af
4
- data.tar.gz: 28f3c44b5d1d1073f8d1a3fb64b366a46a92465e28d60b2f7753387b1d9e7a44
3
+ metadata.gz: 49b01417c356a7e7e1331c06cbc2808d4461fb8d691662862d52b7a8af504472
4
+ data.tar.gz: 3e949f8b1a33ed39104ef1021fab7a675548d2892a62650319f75cd58e8176f5
5
5
  SHA512:
6
- metadata.gz: cb7be08e9798f6cee33c4c86c47993edd95e7487a6d4d9b9d4832857bb5b1bd91f0869af26ab9ed8990a11c3768f4a55251037425dbaa93c8d9d69aa99728f6b
7
- data.tar.gz: ecec8dfca7f38c27d273c245535a2fdb98af8e611e4cb054779a05c8306652189bb2c156181db6c2adf6e7f467854c894f8340f9a660bad29bfe2b045cbf7a51
6
+ metadata.gz: b9ae51c370e0d4dba73b0ccb73c7470b8f74a206867af4ddb7561efd32f66f0ed203457798afb5c628c9a3dbe7d194f5cd1fec25e953485ec087058851eb1f3d
7
+ data.tar.gz: 24cb3f3c286c418ff85a0a2241c1d41eeb8bc7520405960c45a7e9c58da50ba5c9a0371be6d493cc222d5c15b7e0ab79e763f82a883a7b27cc0e16ce03fd96ee
@@ -27,7 +27,8 @@ module Workarea
27
27
  clear_current_order
28
28
 
29
29
  flash[:success] = t('workarea.admin.users.flash_messages.stopped')
30
- redirect_back_or(user_path(previous_user_id))
30
+ referrer = URI.parse(request.referrer).request_uri rescue nil
31
+ redirect_back_or(referrer.presence || user_path(previous_user_id))
31
32
  end
32
33
  end
33
34
  end
@@ -60,6 +60,9 @@
60
60
  .property
61
61
  = label_tag 'category_default_sort', t('workarea.admin.fields.default_sort'), class: 'property__name'
62
62
  = select_tag 'category[default_sort]', options_for_select(@category.sort_options, selected: @category.default_sort)
63
+ - if @category.featured_products?
64
+ %span.property__note
65
+ = t('workarea.admin.catalog_categories.edit.default_sort_note')
63
66
 
64
67
  .property
65
68
  = label_tag 'category_terms_facets_list', t('workarea.admin.fields.terms_facets_list'), class: 'property__name'
@@ -106,6 +106,18 @@
106
106
  = @user.insights.average_order_value_percentile.ordinalize
107
107
  = t('workarea.admin.users.insights.percentile')
108
108
 
109
+ .align-center
110
+ = link_to '#customer-insights-info', data: { tooltip: { side: 'bottom', interactive: true } } do
111
+ = t('workarea.admin.users.insights.customer_insights')
112
+ #customer-insights-info.tooltip-content.align-center
113
+ = t( |
114
+ 'workarea.admin.users.insights.customer_insights_info_html', |
115
+ best_customers_path: insights_report_path(type: Workarea::Insights::BestCustomers), |
116
+ customers_at_risk_path: insights_report_path(type: Workarea::Insights::CustomersAtRisk), |
117
+ repeat_purchase_rate_path: insights_report_path(type: Workarea::Insights::RepeatPurchaseRate), |
118
+ orders_path: orders_user_path(@user) |
119
+ ) |
120
+
109
121
  .section
110
122
  %h2.align-center= t('workarea.admin.users.insights.recently_viewed.title')
111
123
  .grid.grid--center
@@ -303,6 +303,7 @@ en:
303
303
  views: views
304
304
  edit:
305
305
  client_id_note: Identifies the category for product import
306
+ default_sort_note: 'Since this category has featured products, this sort controls the products listed after the selected featured products.'
306
307
  filters_note_html: 'Comma separated: just, like, this. If these fields are blank, the global values will be used from %{search_settings_link}.'
307
308
  page_title: Attributes for %{category}
308
309
  search_settings: search settings
@@ -4067,6 +4068,17 @@ en:
4067
4068
  aov: AOV
4068
4069
  insights_for_this_customer: Insights for this Customer
4069
4070
  percentile: percentile
4071
+ customer_insights: Wondering about how Workarea customer insights work?
4072
+ customer_insights_info_html: >
4073
+ <strong>How are customer metrics tracked?</strong>
4074
+ <p>Workarea's metrics engine saves reporting and insights data based on the customer's email address.
4075
+ This allows for the best tracking of customers for generating helpful insights like
4076
+ <a href="%{best_customers_path}">Best Customers</a>, <a href="%{customers_at_risk_path}">Customers at Risk</a>,
4077
+ and <a href="%{repeat_purchase_rate_path}">Repeat Purchase Rate</a> as accurately as possible across both
4078
+ guest and account checkouts.</p>
4079
+ <strong>Wondering why some numbers don't line up?</strong>
4080
+ <p>Because reporting is tracked by email address, changes in email address and/or having an account
4081
+ can cause mismatch between the <a href="%{orders_path}">Orders</a> card and these insights.</p>
4070
4082
  login:
4071
4083
  never: Never logged in
4072
4084
  time_ago: "%{period} ago"
@@ -50,17 +50,33 @@ module Workarea
50
50
 
51
51
  post admin.impersonations_path, params: { user_id: @user.id }
52
52
  delete admin.impersonations_path
53
+ assert_equal(previous_user_id, session[:user_id])
54
+ assert(session[:admin_id].blank?)
53
55
 
54
- assert_redirected_to(admin.user_path(@user.id))
56
+ post admin.impersonations_path, params: { user_id: @user.id }
57
+ delete admin.impersonations_path
55
58
  assert_equal(previous_user_id, session[:user_id])
56
59
  assert(session[:admin_id].blank?)
60
+ end
61
+
62
+ def test_redirection_after_destroy
63
+ post admin.impersonations_path, params: { user_id: @user.id }
64
+ delete admin.impersonations_path
65
+ assert_redirected_to(admin.user_path(@user.id))
57
66
 
58
67
  post admin.impersonations_path, params: { user_id: @user.id }
59
68
  delete admin.impersonations_path(return_to: '/foo')
69
+ assert_redirected_to('/foo')
60
70
 
71
+ post admin.impersonations_path, params: { user_id: @user.id }
72
+ delete admin.impersonations_path(return_to: '/foo'),
73
+ headers: { 'HTTP_REFERER' => admin.catalog_products_path }
61
74
  assert_redirected_to('/foo')
62
- assert_equal(previous_user_id, session[:user_id])
63
- assert(session[:admin_id].blank?)
75
+
76
+ post admin.impersonations_path, params: { user_id: @user.id }
77
+ delete admin.impersonations_path,
78
+ headers: { 'HTTP_REFERER' => admin.catalog_products_url(host: 'foo.com') }
79
+ assert_redirected_to(admin.catalog_products_path)
64
80
  end
65
81
  end
66
82
  end
@@ -49,7 +49,7 @@ module Workarea
49
49
  click_button 'Stop Impersonation'
50
50
  end
51
51
 
52
- assert_equal(admin.user_path(user), current_path)
52
+ assert_equal(admin.root_path, current_path)
53
53
  assert(page.has_content?('Success'))
54
54
  end
55
55
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.21
4
+ version: 3.5.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Crouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-14 00:00:00.000000000 Z
11
+ date: 2020-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea-core
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.5.21
19
+ version: 3.5.22
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.5.21
26
+ version: 3.5.22
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: workarea-storefront
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.5.21
33
+ version: 3.5.22
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.5.21
40
+ version: 3.5.22
41
41
  description: Provides site administration functionality for the Workarea Commerce
42
42
  Platform.
43
43
  email: