workarea-admin 3.4.40 → 3.4.41
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 +4 -4
- data/app/controllers/workarea/admin/impersonations_controller.rb +1 -1
- data/app/view_models/workarea/admin/product_view_model.rb +5 -8
- data/app/views/workarea/admin/catalog_products/_cards.html.haml +1 -1
- data/app/views/workarea/admin/navigation_menus/_summary.html.haml +1 -1
- data/app/views/workarea/admin/pricing_discounts/properties/_product_attribute.html.haml +1 -1
- data/app/views/workarea/admin/toolbar/show.html.haml +1 -0
- data/config/locales/en.yml +1 -1
- data/test/integration/workarea/admin/impersonations_integration_test.rb +8 -1
- data/test/system/workarea/admin/impersonation_system_test.rb +1 -4
- data/test/view_models/workarea/admin/product_view_model_test.rb +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed933df39aba5d5b13faebdf4f3c6332aa85ad0ca50f6051f097d60ea25fba49
|
4
|
+
data.tar.gz: ff1cb5e0520f6d27cdf660bfc417ba883c9a8b091c5a73ca539694f45f265d3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9fd510c48c7e45c668cc0f8e38b9ebcfe9b259886ba01b98d37a52486af906497f81621f1de45f759d6b0135da773529829ad9b9cacc3f9c02526fee4e29596
|
7
|
+
data.tar.gz: 0ecda3e157ed89ea43c75ab5bcc0ad0dedec90ad66eb1238242fa00105588dc9ac9bde9a7d2fbb5ca2364dd95f8e72a61c47acca8a21f0d6c04dcaf0b73cbf12
|
@@ -42,7 +42,7 @@ module Workarea
|
|
42
42
|
def storefront_view_model
|
43
43
|
@storefront_view_model ||= Storefront::ProductViewModel.wrap(
|
44
44
|
model,
|
45
|
-
|
45
|
+
options
|
46
46
|
)
|
47
47
|
end
|
48
48
|
|
@@ -93,16 +93,13 @@ module Workarea
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
96
|
-
def
|
97
|
-
variants.
|
96
|
+
def variant_details
|
97
|
+
variants.each_with_object({}) do |variant, memo|
|
98
98
|
variant.details.each do |name, value|
|
99
99
|
memo[name] ||= []
|
100
|
-
memo[name]
|
101
|
-
memo[name].flatten!
|
100
|
+
memo[name] += Array.wrap(value)
|
102
101
|
memo[name].uniq!
|
103
102
|
end
|
104
|
-
|
105
|
-
memo
|
106
103
|
end
|
107
104
|
end
|
108
105
|
|
@@ -125,7 +122,7 @@ module Workarea
|
|
125
122
|
end
|
126
123
|
|
127
124
|
def insights
|
128
|
-
@insights ||= Insights::ProductViewModel.wrap(model,
|
125
|
+
@insights ||= Insights::ProductViewModel.wrap(model, options)
|
129
126
|
end
|
130
127
|
|
131
128
|
def inventory
|
@@ -110,7 +110,7 @@
|
|
110
110
|
%p.align-center= t('workarea.admin.fields.inventory')
|
111
111
|
|
112
112
|
%span.heading.heading--3.heading--no-margin.align-center
|
113
|
-
= model.
|
113
|
+
= model.variant_details.keys.to_sentence
|
114
114
|
%p.align-center= t('workarea.admin.fields.options')
|
115
115
|
|
116
116
|
= link_to catalog_product_variants_path(model), class: 'card__button' do
|
@@ -6,5 +6,5 @@
|
|
6
6
|
#{local_time_ago(model.updated_at)}
|
7
7
|
- else
|
8
8
|
%span.summary__info-text-inactive= t('workarea.admin.navigation_menus.summary.inactive')
|
9
|
-
%span.summary__info= t('workarea.admin.navigation_menus.summary.content_block', count: model.content
|
9
|
+
%span.summary__info= t('workarea.admin.navigation_menus.summary.content_block', count: model.content&.blocks&.size.to_i)
|
10
10
|
%span.summary__type{ title: t('workarea.admin.navigation_menus.summary.type') }= t('workarea.admin.navigation_menus.summary.type')
|
@@ -5,7 +5,7 @@
|
|
5
5
|
%span.discount__node
|
6
6
|
%span.property.property--inline
|
7
7
|
= text_field_tag 'discount[amount]', @discount.amount, class: 'text-box text-box--small', title: 'Amount of Discount', placeholder: '10', required: true
|
8
|
-
%span.discount__node off
|
8
|
+
%span.discount__node off the item's unit price
|
9
9
|
|
10
10
|
.discount__node-line
|
11
11
|
%p.discount__node-group
|
@@ -67,6 +67,7 @@
|
|
67
67
|
= link_to current_impersonation.email, user_path(current_impersonation)
|
68
68
|
%br
|
69
69
|
= form_tag impersonations_path, method: 'delete', data: { disable_delete_confirmation: '' } do
|
70
|
+
= hidden_field_tag :return_to, return_to
|
70
71
|
= button_tag t('workarea.admin.toolbar.stop_impersonation'), class: 'text-button text-button--destroy'
|
71
72
|
|
72
73
|
- if allow_pricing_override?
|
data/config/locales/en.yml
CHANGED
@@ -3512,7 +3512,7 @@ en:
|
|
3512
3512
|
changes_saved: Your changes have been saved
|
3513
3513
|
saved: Your changes have been saved
|
3514
3514
|
started: You are now browsing as %{email}
|
3515
|
-
stopped: Impersonation
|
3515
|
+
stopped: Impersonation has been stopped, you are now browsing as your account.
|
3516
3516
|
created: This account has been created
|
3517
3517
|
error: There was an error saving this account
|
3518
3518
|
index:
|
@@ -70,7 +70,14 @@ module Workarea
|
|
70
70
|
post admin.impersonations_path, params: { user_id: @user.id }
|
71
71
|
delete admin.impersonations_path
|
72
72
|
|
73
|
-
|
73
|
+
assert_redirected_to(admin.user_path(@user.id))
|
74
|
+
assert_equal(previous_user_id, response_cookies['user_id'])
|
75
|
+
assert(session['admin_id'].blank?)
|
76
|
+
|
77
|
+
post admin.impersonations_path, params: { user_id: @user.id }
|
78
|
+
delete admin.impersonations_path(return_to: '/foo')
|
79
|
+
|
80
|
+
assert_redirected_to('/foo')
|
74
81
|
assert_equal(previous_user_id, response_cookies['user_id'])
|
75
82
|
assert(session['admin_id'].blank?)
|
76
83
|
end
|
@@ -34,12 +34,9 @@ module Workarea
|
|
34
34
|
click_button 'Stop Impersonation'
|
35
35
|
end
|
36
36
|
|
37
|
-
assert_equal(
|
37
|
+
assert_equal(storefront.root_path, current_path)
|
38
38
|
assert(page.has_content?('Success'))
|
39
39
|
|
40
|
-
find('.view').hover # Ensure tooltipster menu isn't open
|
41
|
-
assert(page.has_content?('bcrouse@workarea.com'))
|
42
|
-
|
43
40
|
visit storefront.users_account_path
|
44
41
|
assert(page.has_no_content?('impersonated@workarea.com'))
|
45
42
|
|
@@ -23,7 +23,7 @@ module Workarea
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
26
|
+
def test_variant_details
|
27
27
|
@view_model.variants.build(
|
28
28
|
sku: 'SKU1',
|
29
29
|
name: 'name',
|
@@ -42,7 +42,7 @@ module Workarea
|
|
42
42
|
|
43
43
|
assert_equal(
|
44
44
|
{ 'Color' => ['Red', 'Black', 'White'], 'Size' => ['S', 'M', 'L'] },
|
45
|
-
@view_model.
|
45
|
+
@view_model.variant_details
|
46
46
|
)
|
47
47
|
end
|
48
48
|
|
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.4.
|
4
|
+
version: 3.4.41
|
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-09-
|
11
|
+
date: 2020-09-30 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.4.
|
19
|
+
version: 3.4.41
|
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.4.
|
26
|
+
version: 3.4.41
|
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.4.
|
33
|
+
version: 3.4.41
|
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.4.
|
40
|
+
version: 3.4.41
|
41
41
|
description: Provides site administration functionality for the Workarea Commerce
|
42
42
|
Platform.
|
43
43
|
email:
|