workarea-admin 3.5.15 → 3.5.20
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/assets/javascripts/jquery_ujs/insert.js +30 -0
- data/app/assets/javascripts/workarea/admin/application.js.erb +1 -0
- data/app/assets/javascripts/workarea/admin/modules/remote_selects.js +13 -1
- data/app/assets/stylesheets/workarea/admin/components/_toggle_button.scss +4 -0
- data/app/assets/stylesheets/workarea/admin/components/_workflow_bar.scss +5 -0
- data/app/controllers/workarea/admin/bulk_variant_saving.rb +2 -1
- data/app/controllers/workarea/admin/configurations_controller.rb +2 -0
- data/app/controllers/workarea/admin/impersonations_controller.rb +1 -1
- data/app/view_models/workarea/admin/product_view_model.rb +6 -9
- data/app/view_models/workarea/admin/variant_view_model.rb +5 -1
- data/app/views/layouts/workarea/admin/application.html.haml +3 -1
- data/app/views/workarea/admin/bulk_action_sequential_product_edits/product.html.haml +1 -1
- data/app/views/workarea/admin/catalog_product_images/edit.html.haml +1 -1
- data/app/views/workarea/admin/catalog_products/_cards.html.haml +1 -1
- data/app/views/workarea/admin/catalog_variants/edit.html.haml +0 -5
- data/app/views/workarea/admin/catalog_variants/index.html.haml +1 -1
- data/app/views/workarea/admin/catalog_variants/new.html.haml +2 -5
- data/app/views/workarea/admin/changesets/index.html.haml +3 -1
- data/app/views/workarea/admin/content/_edit.html.haml +1 -1
- data/app/views/workarea/admin/content_assets/index.html.haml +2 -0
- data/app/views/workarea/admin/fulfillment_skus/edit.html.haml +3 -1
- data/app/views/workarea/admin/fulfillment_skus/new.html.haml +3 -1
- data/app/views/workarea/admin/inventory_skus/_cards.html.haml +3 -0
- data/app/views/workarea/admin/inventory_skus/edit.html.haml +3 -1
- data/app/views/workarea/admin/inventory_skus/index.html.haml +2 -0
- data/app/views/workarea/admin/inventory_skus/new.html.haml +3 -1
- data/app/views/workarea/admin/navigation_menus/_summary.html.haml +1 -1
- data/app/views/workarea/admin/pricing_discount_code_lists/promo_codes.html.haml +2 -2
- data/app/views/workarea/admin/pricing_discount_code_lists/show.html.haml +1 -1
- data/app/views/workarea/admin/pricing_discounts/properties/_product_attribute.html.haml +1 -1
- data/app/views/workarea/admin/releases/show.html.haml +4 -4
- data/app/views/workarea/admin/segments/index.html.haml +1 -1
- data/app/views/workarea/admin/shared/_toggle_button.html.haml +1 -1
- data/app/views/workarea/admin/tax_categories/_cards.html.haml +1 -1
- data/app/views/workarea/admin/tax_rates/edit.html.haml +3 -3
- data/app/views/workarea/admin/tax_rates/index.html.haml +3 -3
- data/app/views/workarea/admin/tax_rates/new.html.haml +3 -3
- data/app/views/workarea/admin/toolbar/show.html.haml +3 -0
- data/app/views/workarea/admin/users/permissions.html.haml +1 -1
- data/app/views/workarea/admin/users/show.html.haml +2 -2
- data/config/locales/en.yml +6 -10
- data/test/integration/workarea/admin/impersonations_integration_test.rb +8 -1
- data/test/integration/workarea/admin/jump_to_integration_test.rb +4 -1
- data/test/system/workarea/admin/assets_system_test.rb +1 -1
- data/test/system/workarea/admin/bookmarks_system_test.rb +2 -2
- data/test/system/workarea/admin/bulk_actions_system_test.rb +5 -5
- data/test/system/workarea/admin/comments_system_test.rb +1 -1
- data/test/system/workarea/admin/content_system_test.rb +1 -1
- data/test/system/workarea/admin/dashboard_system_test.rb +1 -1
- data/test/system/workarea/admin/impersonation_system_test.rb +1 -4
- data/test/system/workarea/admin/inventory_skus_system_test.rb +1 -1
- data/test/system/workarea/admin/menus_system_test.rb +1 -1
- data/test/system/workarea/admin/pricing_sku_prices_system_test.rb +3 -3
- data/test/system/workarea/admin/recommendations_system_test.rb +2 -2
- data/test/system/workarea/admin/releases_system_test.rb +6 -6
- data/test/system/workarea/admin/tax_categories_system_test.rb +6 -5
- data/test/system/workarea/admin/taxonomy_system_test.rb +2 -2
- data/test/system/workarea/admin/trash_system_test.rb +1 -1
- data/test/view_models/workarea/admin/product_view_model_test.rb +2 -2
- metadata +7 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a607bf3907ae033b463b4ea975e63e3baa64fb962d657df6cf0441071b815660
|
|
4
|
+
data.tar.gz: df1ead081c2c5fe988c3f982ee90aaf27c98f45e7d1b3834e5586c1edd6059c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 201839f44d3f88443143a796a34c6062d9b6ed0abc417ae2e1c54ae661ef767d5d288bd6a3f540c0ecebb464970a6750b550082f7617b1083c8ab8432551d8cd
|
|
7
|
+
data.tar.gz: 114f7ae013a9df030ddac85460e6e3c689c44243726698a0de307678aeee2d707cef52d7d5d9195f9577121416588007423f09a2a0a7300e48ed117fa0664f7a
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Add data-insert to an element. When that element is also data-remote, the
|
|
3
|
+
* server's response will be appended into the element matching the value of
|
|
4
|
+
* the data-insert attribute. (with WORKAREA modules initialized). If that
|
|
5
|
+
* element is also insert-before or insert-after, the response will instead
|
|
6
|
+
* be inserted before or after, respectively, the matching element.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
$(document).on('ajax:success', function (event, response) {
|
|
10
|
+
var $element = $(event.target),
|
|
11
|
+
targetSelector = $element.data('insert'),
|
|
12
|
+
$target,
|
|
13
|
+
$content;
|
|
14
|
+
|
|
15
|
+
if (! $element.is('[data-insert]')) { return; }
|
|
16
|
+
if (_.isEmpty(targetSelector)) { return; }
|
|
17
|
+
|
|
18
|
+
$target = $(targetSelector);
|
|
19
|
+
$content = $(response);
|
|
20
|
+
|
|
21
|
+
if ($element.is('[data-insert-after]')) {
|
|
22
|
+
$content.insertAfter($target);
|
|
23
|
+
} else if ($element.is('[data-insert-before]')) {
|
|
24
|
+
$content.insertBefore($target);
|
|
25
|
+
} else {
|
|
26
|
+
$target.append($content);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
WORKAREA.initModules($content);
|
|
30
|
+
});
|
|
@@ -31,9 +31,14 @@ WORKAREA.registerModule('remoteSelects', (function () {
|
|
|
31
31
|
$(select).data('remoteSelect').options
|
|
32
32
|
);
|
|
33
33
|
|
|
34
|
+
|
|
34
35
|
settings.ajax.url = $(select).data('remoteSelect').source;
|
|
35
36
|
settings.templateResult = formatOption;
|
|
36
37
|
|
|
38
|
+
if (settings.dropdownParent) {
|
|
39
|
+
settings.dropdownParent = $(settings.dropdownParent);
|
|
40
|
+
}
|
|
41
|
+
|
|
37
42
|
return settings;
|
|
38
43
|
},
|
|
39
44
|
|
|
@@ -73,9 +78,16 @@ WORKAREA.registerModule('remoteSelects', (function () {
|
|
|
73
78
|
},
|
|
74
79
|
|
|
75
80
|
initSelect2 = function (index, select) {
|
|
81
|
+
var config = getConfig(select);
|
|
82
|
+
|
|
76
83
|
injectHiddenInput(index, select);
|
|
84
|
+
$(select).select2(config);
|
|
77
85
|
|
|
78
|
-
|
|
86
|
+
if (config.autoSubmit) {
|
|
87
|
+
$(select).on('select2:select', function () {
|
|
88
|
+
$(this).parents('form').submit();
|
|
89
|
+
});
|
|
90
|
+
}
|
|
79
91
|
|
|
80
92
|
if ($(select).is('[multiple]')) {
|
|
81
93
|
initSortable(select);
|
|
@@ -20,6 +20,10 @@ $toggle-button-status-negative-color: $red !default;
|
|
|
20
20
|
display: inline-block;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
.toggle-button--disabled {
|
|
24
|
+
opacity: 0.5;
|
|
25
|
+
}
|
|
26
|
+
|
|
23
27
|
/**
|
|
24
28
|
* 1. provides positiioning context for `.toggle-button__label`
|
|
25
29
|
* 2. height + vertical margin = `.text-box` height
|
|
@@ -117,3 +117,8 @@ $workflow-bar-button-confirm-delete-hover-bg-color: $bright-red !default;
|
|
|
117
117
|
background-color: $workflow-bar-button-confirm-delete-hover-bg-color;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
+
|
|
121
|
+
.workflow-bar__button--disabled {
|
|
122
|
+
opacity: $forms-disabled-opacity;
|
|
123
|
+
cursor: not-allowed;
|
|
124
|
+
}
|
|
@@ -21,8 +21,9 @@ module Workarea
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
if attributes[:inventory].present?
|
|
24
|
-
inventory = Inventory::Sku.
|
|
24
|
+
inventory = Inventory::Sku.find_or_initialize_by(id: variant.sku)
|
|
25
25
|
inventory.available = attributes[:inventory]
|
|
26
|
+
inventory.policy = 'standard' if inventory.new_record?
|
|
26
27
|
inventory.save!
|
|
27
28
|
end
|
|
28
29
|
end
|
|
@@ -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
|
|
|
@@ -75,7 +75,7 @@ module Workarea
|
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
def available_inventory
|
|
78
|
-
@available_inventory ||= Inventory.
|
|
78
|
+
@available_inventory ||= Inventory::Collection.new(model.skus).available_to_sell
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
def ignore_inventory?
|
|
@@ -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
|
|
@@ -183,7 +183,9 @@
|
|
|
183
183
|
%li.menu__item= link_to t('workarea.admin.layout.log_out'), storefront.logout_path, data: { method: 'delete' }, class: 'menu__link'
|
|
184
184
|
|
|
185
185
|
.page-content
|
|
186
|
-
#main.page-content__main{ role: 'main' }
|
|
186
|
+
#main.page-content__main{ role: 'main' }
|
|
187
|
+
= append_partials('admin.page_content_top')
|
|
188
|
+
= yield
|
|
187
189
|
|
|
188
190
|
%p.visually-hidden= link_to t('workarea.admin.layout.top_of_page'), '#top'
|
|
189
191
|
= yield :javascript
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
%td
|
|
207
207
|
= text_field_tag 'variants[][tax_code]', variant.tax_code, placeholder: 'Tax Code', class: 'text-box text-box--small', autocomplete: 'off', id: dom_id(variant, 'variant_tax_code')
|
|
208
208
|
%td
|
|
209
|
-
= number_field_tag 'variants[][inventory]', variant.
|
|
209
|
+
= number_field_tag 'variants[][inventory]', variant.inventory.available, placeholder: '0', class: 'text-box text-box--small', id: dom_id(variant, 'variant_inventory')
|
|
210
210
|
|
|
211
211
|
%tr{ data: { cloneable_row: '' } }
|
|
212
212
|
%td
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
.product-images__image-group
|
|
26
26
|
.product-images__image
|
|
27
27
|
.product-images__image-summary
|
|
28
|
-
.product-images__image-summary-container= image_tag product_image_url(@image, :small), alt: "#{@image.option} #{t('workarea.admin.catalog_product_images.edit.image')}",
|
|
28
|
+
.product-images__image-summary-container= image_tag product_image_url(@image, :small), alt: "#{@image.option} #{t('workarea.admin.catalog_product_images.edit.image')}", class: 'product-images__image-summary-image'
|
|
29
29
|
|
|
30
30
|
.section
|
|
31
31
|
%h2= t('workarea.admin.catalog_product_images.edit.edit_image')
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
%p.align-center= t('workarea.admin.fields.inventory')
|
|
109
109
|
|
|
110
110
|
%span.heading.heading--3.heading--no-margin.align-center
|
|
111
|
-
= model.
|
|
111
|
+
= model.variant_details.keys.to_sentence
|
|
112
112
|
%p.align-center= t('workarea.admin.fields.options')
|
|
113
113
|
|
|
114
114
|
= link_to catalog_product_variants_path(model), class: 'card__button' do
|
|
@@ -63,11 +63,6 @@
|
|
|
63
63
|
.property
|
|
64
64
|
= text_field_tag 'new_details[]', nil, id: nil, class: 'text-box text-box--i18n', title: t('workarea.admin.catalog_variants.edit.options.new_attribute_value'), placeholder: t('workarea.admin.catalog_variants.edit.options.new_attribute_value_placeholder')
|
|
65
65
|
%span.property__note= t('workarea.admin.catalog_variants.edit.options.new_attribute_value_note')
|
|
66
|
-
%span.property__note
|
|
67
|
-
= t('workarea.admin.catalog_variants.edit.options.new_attribute_value_csv')
|
|
68
|
-
= link_to '#csv-help', data: { tooltip: '' } do
|
|
69
|
-
= inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.catalog_variants.edit.options.learn_more'))
|
|
70
|
-
= render 'workarea/admin/shared/csv_formatting_tooltip'
|
|
71
66
|
%td.align-center -
|
|
72
67
|
|
|
73
68
|
= append_partials('admin.additional_variant_information_fields', variant: @variant)
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
%td= link_to variant.fulfillment_policy, fulfillment_sku_path(variant.sku)
|
|
46
46
|
%td.align-center
|
|
47
47
|
= link_to inventory_sku_path(variant.sku) do
|
|
48
|
-
= variant.
|
|
48
|
+
= variant.available_to_sell_inventory
|
|
49
49
|
%td.align-right
|
|
50
50
|
= link_to pricing_sku_path(variant.sku) do
|
|
51
51
|
= number_to_currency variant.pricing.sell_price
|
|
@@ -55,13 +55,10 @@
|
|
|
55
55
|
.property
|
|
56
56
|
= text_field_tag 'new_details[]', nil, id: nil, class: 'text-box text-box--i18n', title: t('workarea.admin.catalog_variants.new.options.new_attribute_value'), placeholder: t('workarea.admin.catalog_variants.new.options.new_attribute_value_placeholder')
|
|
57
57
|
%span.property__note= t('workarea.admin.catalog_variants.new.options.new_attribute_value_note')
|
|
58
|
-
%span.property__note
|
|
59
|
-
= t('workarea.admin.catalog_variants.new.options.new_attribute_value_csv')
|
|
60
|
-
= link_to '#csv-help', data: { tooltip: '' } do
|
|
61
|
-
= inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.catalog_variants.new.options.learn_more'))
|
|
62
|
-
= render 'workarea/admin/shared/csv_formatting_tooltip'
|
|
63
58
|
%td.align-center -
|
|
64
59
|
|
|
60
|
+
= append_partials('admin.additional_variant_information_fields', variant: @variant)
|
|
61
|
+
|
|
65
62
|
.workflow-bar
|
|
66
63
|
.grid.grid--auto.grid--right.grid--middle
|
|
67
64
|
.grid__cell= render 'workarea/admin/shared/activate_select', name: 'variant[activate_with]'
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
= render_cards_for(@release, :planned_changes)
|
|
15
15
|
|
|
16
16
|
- if @release.changesets_with_releasable.blank?
|
|
17
|
-
|
|
17
|
+
.section.align-center
|
|
18
|
+
%p.heading.heading--3= t('workarea.admin.changesets.no_changesets')
|
|
19
|
+
%p.heading.heading--3= link_to t('workarea.admin.changesets.plan_some_changes'), release_releasables_path(@release)
|
|
18
20
|
|
|
19
21
|
.grid.grid--center
|
|
20
22
|
.grid__cell.grid__cell--80-at-medium
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
.grid.grid--middle
|
|
8
8
|
.grid__cell.grid__cell--50
|
|
9
9
|
- if content.show_areas?
|
|
10
|
-
%span
|
|
10
|
+
%span #{t('workarea.admin.content.edit.current_area')}:
|
|
11
11
|
= inline_svg('workarea/admin/icons/navigate_next.svg', class: 'svg-icon svg-icon--small svg-icon--white')
|
|
12
12
|
= form_tag request.path, method: 'get', class: 'content-editor__area-select-form' do
|
|
13
13
|
= select_tag 'area_id', options_for_select(content.area_options, content.current_area), data: { form_submitting_control: '' }
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
%h1.heading--no-margin= t('workarea.admin.content_assets.index.title')
|
|
10
10
|
%p= t('workarea.admin.content_assets.index.description')
|
|
11
11
|
|
|
12
|
+
= append_partials('admin.content_assets_index_view_heading')
|
|
13
|
+
|
|
12
14
|
.view__container
|
|
13
15
|
- if s3?
|
|
14
16
|
.direct-upload{ data: { direct_upload: { type: 'asset' }.to_json, unsaved_changes: '' } }
|
|
@@ -31,7 +31,9 @@
|
|
|
31
31
|
= inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.fields.policy'))
|
|
32
32
|
|
|
33
33
|
#policy-info.tooltip-content
|
|
34
|
-
%p
|
|
34
|
+
%p
|
|
35
|
+
= t('workarea.admin.fulfillment_skus.edit.policy_info_html')
|
|
36
|
+
= append_partials('admin.fulfillment_sku_policy_info')
|
|
35
37
|
= select_tag 'sku[policy]', options_for_select(fulfillment_policies, @sku.policy.optionize)
|
|
36
38
|
|
|
37
39
|
.property
|
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
= inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.fields.policy'))
|
|
30
30
|
|
|
31
31
|
#policy-info.tooltip-content
|
|
32
|
-
%p
|
|
32
|
+
%p
|
|
33
|
+
= t('workarea.admin.fulfillment_skus.edit.policy_info_html')
|
|
34
|
+
= append_partials('admin.fulfillment_sku_policy_info')
|
|
33
35
|
= select_tag 'sku[policy]', options_for_select(fulfillment_policies, @sku.policy.optionize)
|
|
34
36
|
|
|
35
37
|
.property
|
|
@@ -32,7 +32,9 @@
|
|
|
32
32
|
= link_to '#tracking-policy-info', data: { tooltip: '' } do
|
|
33
33
|
= inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.inventory_skus.edit.tracking_policy'))
|
|
34
34
|
#tracking-policy-info.tooltip-content
|
|
35
|
-
%p
|
|
35
|
+
%p
|
|
36
|
+
= t('workarea.admin.inventory_skus.edit.tracking_policy_info_html')
|
|
37
|
+
= append_partials('admin.inventory_sku_policy_info')
|
|
36
38
|
= select_tag 'sku[policy]', options_for_select(inventory_policies, @sku.policy.optionize)
|
|
37
39
|
|
|
38
40
|
.grid.grid--huge
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
= check_box_tag 'select_all', nil, false, id: 'select_all', class: 'checkbox__input', data: { bulk_action_select_all: '' }
|
|
47
47
|
= label_tag 'select_all', t('workarea.admin.bulk_actions.select_all'), class: 'checkbox__label'
|
|
48
48
|
%th= t('workarea.admin.fields.sku')
|
|
49
|
+
%th.align-center= t('workarea.admin.fields.sellable')
|
|
49
50
|
%th.align-center= t('workarea.admin.fields.available')
|
|
50
51
|
%th.align-center= t('workarea.admin.fields.sold')
|
|
51
52
|
%th.align-center= t('workarea.admin.fields.backordered_units')
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
%td
|
|
63
64
|
= link_to result.id, inventory_sku_path(result)
|
|
64
65
|
= upcoming_changesets_icon_for(result)
|
|
66
|
+
%td.align-center= result.sellable
|
|
65
67
|
%td.align-center= result.available
|
|
66
68
|
%td.align-center= result.purchased
|
|
67
69
|
%td.align-center= result.backordered
|
|
@@ -28,7 +28,9 @@
|
|
|
28
28
|
= link_to '#tracking-policy-info', data: { tooltip: '' } do
|
|
29
29
|
= inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.inventory_skus.edit.tracking_policy'))
|
|
30
30
|
#tracking-policy-info.tooltip-content
|
|
31
|
-
%p
|
|
31
|
+
%p
|
|
32
|
+
= t('workarea.admin.inventory_skus.edit.tracking_policy_info_html')
|
|
33
|
+
= append_partials('admin.inventory_sku_policy_info')
|
|
32
34
|
= select_tag 'sku[policy]', options_for_select(inventory_policies, @sku.policy.optionize)
|
|
33
35
|
|
|
34
36
|
.property
|
|
@@ -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')
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
.grid__cell= link_to t('workarea.admin.shared.bulk_actions.import'), new_data_file_import_path(model_type: Workarea::Pricing::Discount::GeneratedPromoCode, return_to: pricing_discount_code_list_path(@code_list)), class: 'workflow-bar__button'
|
|
44
44
|
.grid__cell= link_to t('workarea.admin.shared.bulk_actions.export'), new_data_file_export_path(model_type: Workarea::Pricing::Discount::GeneratedPromoCode, query_id: generic_admin_search_query_id(model_type: Workarea::Pricing::Discount::GeneratedPromoCode, query_params: { code_list_id: @code_list.id }), return_to: pricing_discount_code_list_path(@code_list)), class: 'workflow-bar__button workflow-bar__button--left-divide'
|
|
45
45
|
- else
|
|
46
|
-
.grid__cell= link_to t('workarea.admin.shared.bulk_actions.import'), '#disabled-info', disabled: 'disabled', class: 'workflow-bar__button', data: { tooltip: '' }
|
|
47
|
-
.grid__cell= link_to t('workarea.admin.shared.bulk_actions.export'), '#disabled-info', disabled: 'disabled', class: 'workflow-bar__button
|
|
46
|
+
.grid__cell= link_to t('workarea.admin.shared.bulk_actions.import'), '#disabled-info', disabled: 'disabled', class: 'workflow-bar__button workflow-bar__button--disabled', data: { tooltip: '' }
|
|
47
|
+
.grid__cell= link_to t('workarea.admin.shared.bulk_actions.export'), '#disabled-info', disabled: 'disabled', class: 'workflow-bar__button workflow-bar__button--left-divide workflow-bar__button--disabled', data: { tooltip: '' }
|
|
48
48
|
|
|
49
49
|
#disabled-info.tooltip-content
|
|
50
50
|
%p= t('workarea.admin.pricing_discount_code_lists.show.disabled_info')
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
- if @code_list.generation_complete?
|
|
26
26
|
.grid__cell= link_to t('workarea.admin.actions.delete'), pricing_discount_code_list_path(@code_list), class: 'workflow-bar__button workflow-bar__button--delete', data: { method: 'delete', confirm: t('workarea.admin.actions.delete_confirmation') }
|
|
27
27
|
- else
|
|
28
|
-
.grid__cell= link_to t('workarea.admin.actions.delete'), '#disabled-info', disabled: 'disabled', class: 'workflow-bar__button workflow-bar__button--delete', data: { tooltip: '' }
|
|
28
|
+
.grid__cell= link_to t('workarea.admin.actions.delete'), '#disabled-info', disabled: 'disabled', class: 'workflow-bar__button workflow-bar__button--delete workflow-bar__button--disabled', data: { tooltip: '' }
|
|
29
29
|
|
|
30
30
|
#disabled-info.tooltip-content
|
|
31
31
|
%p= t('workarea.admin.pricing_discount_code_lists.show.disabled_info')
|
|
@@ -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
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
.grid.grid--auto.grid--right
|
|
22
22
|
- if !@release.has_changes?
|
|
23
23
|
.grid__cell
|
|
24
|
-
= link_to t('workarea.admin.releases.show.visit_storefront_to_preview'), '#no-changes-to-preview-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update'
|
|
24
|
+
= link_to t('workarea.admin.releases.show.visit_storefront_to_preview'), '#no-changes-to-preview-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update workflow-bar__button--disabled'
|
|
25
25
|
#no-changes-to-preview-info.tooltip-content
|
|
26
26
|
%p= t('workarea.admin.releases.show.no_changes_to_preview')
|
|
27
27
|
|
|
28
28
|
.grid__cell
|
|
29
|
-
= link_to t('workarea.admin.releases.show.publish_now'), '#no-changes-to-publish-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update'
|
|
29
|
+
= link_to t('workarea.admin.releases.show.publish_now'), '#no-changes-to-publish-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update workflow-bar__button--disabled'
|
|
30
30
|
#no-changes-to-publish-info.tooltip-content
|
|
31
31
|
%p= t('workarea.admin.releases.show.no_changes_to_publish')
|
|
32
32
|
|
|
33
33
|
- else
|
|
34
34
|
.grid__cell
|
|
35
35
|
- if @release.published? && !@release.scheduled?
|
|
36
|
-
= link_to t('workarea.admin.releases.show.visit_storefront_to_preview'), '#cannot-preview-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update'
|
|
36
|
+
= link_to t('workarea.admin.releases.show.visit_storefront_to_preview'), '#cannot-preview-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update workflow-bar__button--disabled'
|
|
37
37
|
#cannot-preview-info.tooltip-content
|
|
38
38
|
%p= t('workarea.admin.releases.show.unscheduled_republish_preview_info')
|
|
39
39
|
- elsif current_release.try(:id) == @release.id
|
|
@@ -50,6 +50,6 @@
|
|
|
50
50
|
= form_tag publish_release_path(@release), method: :patch do
|
|
51
51
|
= button_tag publish_text, value: 'publish', class: 'workflow-bar__button workflow-bar__button--update'
|
|
52
52
|
- else
|
|
53
|
-
= link_to publish_text, '#cannot-publish-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update'
|
|
53
|
+
= link_to publish_text, '#cannot-publish-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update workflow-bar__button--disabled'
|
|
54
54
|
#cannot-publish-info.tooltip-content
|
|
55
55
|
%p= t('workarea.admin.releases.show.user_cannot_publish_info')
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
.grid__cell.grid__cell--50.align-right
|
|
58
58
|
- if segments.size >= 15
|
|
59
|
-
= link_to t('workarea.admin.segments.index.add_custom'), '#max-segments-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--create'
|
|
59
|
+
= link_to t('workarea.admin.segments.index.add_custom'), '#max-segments-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--create workflow-bar__button--disabled'
|
|
60
60
|
#max-segments-info.tooltip-content
|
|
61
61
|
%p= t('workarea.admin.segments.index.max_segments')
|
|
62
62
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.toggle-button{ data: data }
|
|
1
|
+
.toggle-button{ data: data, class: disabled ? 'toggle-button--disabled' : nil }
|
|
2
2
|
.toggle-button__switch
|
|
3
3
|
= radio_button_tag input_name, true, condition, disabled: disabled, class: 'toggle-button__input toggle-button__input--positive', title: title_true, id: "#{dom_id}_true"
|
|
4
4
|
= label_tag "#{dom_id}_false", label_true, class: 'toggle-button__label toggle-button__label--positive', id: "#{dom_id}_false_label"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
%ul.list-reset
|
|
38
38
|
- model.newest_rates.each do |rate|
|
|
39
39
|
%li
|
|
40
|
-
%strong= number_to_percentage(rate.percentage * 100,
|
|
40
|
+
%strong= number_to_percentage(rate.percentage * 100, strip_insignificant_zeros: true)
|
|
41
41
|
|
|
42
42
|
- if rate.tier_min.present? && rate.tier_max.present?
|
|
43
43
|
#{number_to_currency(rate.tier_min)} - #{number_to_currency(rate.tier_max)},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
.grid__cell.grid__cell--50
|
|
22
22
|
.property
|
|
23
23
|
= label_tag 'rate_country_percentage', t('workarea.admin.tax_rates.index.table.country_percentage'), class: 'property__name'
|
|
24
|
-
= number_field_tag 'rate[country_percentage]', @rate.country_percentage * 100, min: 0, max: 100, step: 0.
|
|
24
|
+
= number_field_tag 'rate[country_percentage]', @rate.country_percentage.to_f * 100, min: 0, max: 100, step: '0.001', class: 'text-box text-box--i18n'
|
|
25
25
|
|
|
26
26
|
.grid__cell.grid__cell--50
|
|
27
27
|
.property
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
.grid__cell.grid__cell--50
|
|
32
32
|
.property
|
|
33
33
|
= label_tag 'rate_region_percentage', t('workarea.admin.tax_rates.index.table.region_percentage'), class: 'property__name'
|
|
34
|
-
= number_field_tag 'rate[region_percentage]', @rate.region_percentage * 100, min: 0, max: 100, step: 0.
|
|
34
|
+
= number_field_tag 'rate[region_percentage]', @rate.region_percentage.to_f * 100, min: 0, max: 100, step: '0.001', class: 'text-box text-box--i18n'
|
|
35
35
|
|
|
36
36
|
.grid__cell.grid__cell--50
|
|
37
37
|
.property
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
.grid__cell.grid__cell--50
|
|
42
42
|
.property
|
|
43
43
|
= label_tag 'rate_postal_code_percentage', t('workarea.admin.tax_rates.index.table.postal_code_percentage'), class: 'property__name'
|
|
44
|
-
= number_field_tag 'rate[postal_code_percentage]', @rate.postal_code_percentage * 100, min: 0, max: 100, step: 0.
|
|
44
|
+
= number_field_tag 'rate[postal_code_percentage]', @rate.postal_code_percentage.to_f * 100, min: 0, max: 100, step: '0.001', class: 'text-box text-box--i18n'
|
|
45
45
|
|
|
46
46
|
.grid__cell.grid__cell--33
|
|
47
47
|
.property
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
%td.align-center= rate.country.try(&:alpha2) || '-'
|
|
57
57
|
%td.align-center= rate.region || '-'
|
|
58
58
|
%td.align-center= rate.postal_code.presence || '-'
|
|
59
|
-
%td.align-center= number_to_percentage(rate.country_percentage * 100,
|
|
60
|
-
%td.align-center= number_to_percentage(rate.region_percentage * 100,
|
|
61
|
-
%td.align-center= number_to_percentage(rate.postal_code_percentage * 100,
|
|
59
|
+
%td.align-center= number_to_percentage(rate.country_percentage.to_f * 100, strip_insignificant_zeros: true)
|
|
60
|
+
%td.align-center= number_to_percentage(rate.region_percentage.to_f * 100, strip_insignificant_zeros: true)
|
|
61
|
+
%td.align-center= number_to_percentage(rate.postal_code_percentage.to_f * 100, strip_insignificant_zeros: true)
|
|
62
62
|
%td.align-center= rate.tier_min.present? ? number_to_currency(rate.tier_min) : t('workarea.admin.tax_rates.index.not_applicable')
|
|
63
63
|
%td.align-center= rate.tier_max.present? ? number_to_currency(rate.tier_max) : t('workarea.admin.tax_rates.index.not_applicable')
|
|
64
64
|
%td.align-center= rate.charge_on_shipping ? t('workarea.admin.true') : t('workarea.admin.false')
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
.grid__cell.grid__cell--50
|
|
20
20
|
.property
|
|
21
21
|
= label_tag 'rate_country_percentage', t('workarea.admin.tax_rates.index.table.country_percentage'), class: 'property__name'
|
|
22
|
-
= number_field_tag 'rate[country_percentage]', @rate.country_percentage * 100, min: 0, max: 100, step: 0.
|
|
22
|
+
= number_field_tag 'rate[country_percentage]', @rate.country_percentage.to_f * 100, min: 0, max: 100, step: '0.001', class: 'text-box'
|
|
23
23
|
|
|
24
24
|
.grid__cell.grid__cell--50
|
|
25
25
|
.property
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
.grid__cell.grid__cell--50
|
|
30
30
|
.property
|
|
31
31
|
= label_tag 'rate_region_percentage', t('workarea.admin.tax_rates.index.table.region_percentage'), class: 'property__name'
|
|
32
|
-
= number_field_tag 'rate[region_percentage]', @rate.region_percentage * 100, min: 0, max: 100, step: 0.
|
|
32
|
+
= number_field_tag 'rate[region_percentage]', @rate.region_percentage.to_f * 100, min: 0, max: 100, step: '0.001', class: 'text-box'
|
|
33
33
|
|
|
34
34
|
.grid__cell.grid__cell--50
|
|
35
35
|
.property
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
.grid__cell.grid__cell--50
|
|
40
40
|
.property
|
|
41
41
|
= label_tag 'rate_postal_code_percentage', t('workarea.admin.tax_rates.index.table.postal_code_percentage'), class: 'property__name'
|
|
42
|
-
= number_field_tag 'rate[postal_code_percentage]', @rate.postal_code_percentage * 100, min: 0, max: 100, step: 0.
|
|
42
|
+
= number_field_tag 'rate[postal_code_percentage]', @rate.postal_code_percentage.to_f * 100, min: 0, max: 100, step: '0.001', class: 'text-box'
|
|
43
43
|
|
|
44
44
|
.grid__cell.grid__cell--33
|
|
45
45
|
.property
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
= search_field_tag :q, nil, placeholder: t('workarea.admin.toolbar.search_placeholder'), title: t('workarea.admin.toolbar.search_title'), class: 'search-form__input', data: { categorized_autocomplete_field: '' }, id: 'admin_search', aria: { label: t('workarea.admin.toolbar.search_title') }
|
|
33
33
|
= submit_tag t('workarea.admin.toolbar.search'), class: 'search-form__button', value: 'search_admin'
|
|
34
34
|
|
|
35
|
+
= append_partials('admin.toolbar_header')
|
|
36
|
+
|
|
35
37
|
- if @model.present?
|
|
36
38
|
- unless @model.active?
|
|
37
39
|
.header__alert
|
|
@@ -79,6 +81,7 @@
|
|
|
79
81
|
= link_to current_impersonation.email, user_path(current_impersonation)
|
|
80
82
|
%br
|
|
81
83
|
= form_tag impersonations_path, method: 'delete', data: { disable_delete_confirmation: '' } do
|
|
84
|
+
= hidden_field_tag :return_to, return_to
|
|
82
85
|
= button_tag t('workarea.admin.toolbar.stop_impersonation'), class: 'text-button text-button--destroy'
|
|
83
86
|
|
|
84
87
|
- if allow_pricing_override?
|
|
@@ -136,6 +136,6 @@
|
|
|
136
136
|
|
|
137
137
|
.workflow-bar
|
|
138
138
|
.grid.grid--auto.grid--right.grid--middle
|
|
139
|
-
= append_partials('admin.user_permissions_workflow_bar')
|
|
139
|
+
= append_partials('admin.user_permissions_workflow_bar', user: @user)
|
|
140
140
|
- button_styles = @user.super_admin? ? 'workflow-bar__button' : 'workflow-bar__button workflow-bar__button--update'
|
|
141
141
|
.grid__cell= button_tag t('workarea.admin.users.permissions.button'), value: 'save_permissions', class: button_styles, disabled: @user.super_admin?
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
.grid.grid--auto.grid--right.grid--middle.grid--flush
|
|
25
25
|
- if @user == current_user
|
|
26
26
|
.grid__cell
|
|
27
|
-
= link_to t('workarea.admin.users.show.impersonate'), '#impersonate-yourself-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update'
|
|
27
|
+
= link_to t('workarea.admin.users.show.impersonate'), '#impersonate-yourself-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update workflow-bar__button--disabled'
|
|
28
28
|
#impersonate-yourself-info.tooltip-content
|
|
29
29
|
%p= t('workarea.admin.users.show.cant_impersonate_yourself')
|
|
30
30
|
|
|
31
31
|
- elsif @user.admin?
|
|
32
32
|
.grid__cell
|
|
33
|
-
= link_to t('workarea.admin.users.show.impersonate'), '#impersonate-other-admins-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update'
|
|
33
|
+
= link_to t('workarea.admin.users.show.impersonate'), '#impersonate-other-admins-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update workflow-bar__button--disabled'
|
|
34
34
|
#impersonate-other-admins-info.tooltip-content
|
|
35
35
|
%p= t('workarea.admin.users.show.cant_impersonate_other_administrators')
|
|
36
36
|
|
data/config/locales/en.yml
CHANGED
|
@@ -502,7 +502,6 @@ en:
|
|
|
502
502
|
new_attribute_name_note: 'Example: Material'
|
|
503
503
|
new_attribute_name_placeholder: New Attribute Name
|
|
504
504
|
new_attribute_value: New Attribute Value
|
|
505
|
-
new_attribute_value_csv: 'Comma separated: just, like, this'
|
|
506
505
|
new_attribute_value_note: 'Example: Cotton'
|
|
507
506
|
new_attribute_value_placeholder: New Attribute Value
|
|
508
507
|
remove: Remove
|
|
@@ -541,7 +540,6 @@ en:
|
|
|
541
540
|
new_attribute_name_note: 'Example: Material'
|
|
542
541
|
new_attribute_name_placeholder: New Attribute Name
|
|
543
542
|
new_attribute_value: New Attribute Value
|
|
544
|
-
new_attribute_value_csv: 'Comma separated: just, like, this'
|
|
545
543
|
new_attribute_value_note: 'Example: Cotton'
|
|
546
544
|
new_attribute_value_placeholder: New Attribute Value
|
|
547
545
|
remove: Remove
|
|
@@ -579,6 +577,8 @@ en:
|
|
|
579
577
|
flash_messages:
|
|
580
578
|
removed: These changes have been removed
|
|
581
579
|
no_activity: No activity to show
|
|
580
|
+
no_changesets: There aren't any planned changes for this release.
|
|
581
|
+
plan_some_changes: Go plan some changes!
|
|
582
582
|
planned_changes_for: Planned Changes For
|
|
583
583
|
published_on: Published On
|
|
584
584
|
publishes_on: Publishes On
|
|
@@ -703,6 +703,7 @@ en:
|
|
|
703
703
|
loading: Loading...
|
|
704
704
|
preview: Preview
|
|
705
705
|
title: Content for %{content}
|
|
706
|
+
current_area: 'Current Area'
|
|
706
707
|
form:
|
|
707
708
|
all_blocks: All blocks
|
|
708
709
|
cancel: Cancel
|
|
@@ -1770,6 +1771,7 @@ en:
|
|
|
1770
1771
|
searches: Searches
|
|
1771
1772
|
segments: Segments
|
|
1772
1773
|
sell_price: Sell Price
|
|
1774
|
+
sellable: Sellable Units
|
|
1773
1775
|
send_account_creation_email: Notify Them by Email
|
|
1774
1776
|
service: Service
|
|
1775
1777
|
service_code: Service Code
|
|
@@ -1863,7 +1865,7 @@ en:
|
|
|
1863
1865
|
policy: 'Policy:'
|
|
1864
1866
|
file: 'File:'
|
|
1865
1867
|
edit:
|
|
1866
|
-
policy_info_html: "<p><strong>
|
|
1868
|
+
policy_info_html: "<p><strong>Shipping:</strong> Item requires shipping. System does nothing automatically for this SKU.</p><p><strong>Download:</strong> Generates a unique URL token that grants the customer access to attached file through a download link in the order summary.</p>"
|
|
1867
1869
|
page_title: Edit Fulfillment SKU %{sku}
|
|
1868
1870
|
save_sku: Save SKU
|
|
1869
1871
|
flash_messages:
|
|
@@ -2278,12 +2280,6 @@ en:
|
|
|
2278
2280
|
aux_navigation:
|
|
2279
2281
|
view_pricing: View Pricing
|
|
2280
2282
|
view_product: View Product
|
|
2281
|
-
cards:
|
|
2282
|
-
available: 'Available:'
|
|
2283
|
-
backordered: 'Backordered:'
|
|
2284
|
-
policy: 'Policy:'
|
|
2285
|
-
purchased: 'Purchased:'
|
|
2286
|
-
reserve: 'Reserve:'
|
|
2287
2283
|
edit:
|
|
2288
2284
|
available_quantity: Available Quantity
|
|
2289
2285
|
backordered_quantity: Backordered Quantity
|
|
@@ -4028,7 +4024,7 @@ en:
|
|
|
4028
4024
|
changes_saved: Your changes have been saved
|
|
4029
4025
|
saved: Your changes have been saved
|
|
4030
4026
|
started: You are now browsing as %{email}
|
|
4031
|
-
stopped: Impersonation
|
|
4027
|
+
stopped: Impersonation has been stopped, you are now browsing as your account.
|
|
4032
4028
|
created: This account has been created
|
|
4033
4029
|
error: There was an error saving this account
|
|
4034
4030
|
password_reset: Password reset created. User will receive an email shortly.
|
|
@@ -51,7 +51,14 @@ module Workarea
|
|
|
51
51
|
post admin.impersonations_path, params: { user_id: @user.id }
|
|
52
52
|
delete admin.impersonations_path
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
assert_redirected_to(admin.user_path(@user.id))
|
|
55
|
+
assert_equal(previous_user_id, session[:user_id])
|
|
56
|
+
assert(session[:admin_id].blank?)
|
|
57
|
+
|
|
58
|
+
post admin.impersonations_path, params: { user_id: @user.id }
|
|
59
|
+
delete admin.impersonations_path(return_to: '/foo')
|
|
60
|
+
|
|
61
|
+
assert_redirected_to('/foo')
|
|
55
62
|
assert_equal(previous_user_id, session[:user_id])
|
|
56
63
|
assert(session[:admin_id].blank?)
|
|
57
64
|
end
|
|
@@ -110,7 +110,10 @@ module Workarea
|
|
|
110
110
|
|
|
111
111
|
results = JSON.parse(response.body)['results']
|
|
112
112
|
assert_equal(1, results.length)
|
|
113
|
-
assert_equal(
|
|
113
|
+
assert_equal(
|
|
114
|
+
t('workarea.inventory_sku.jump_to_text', id: 'SKU123', count: 4),
|
|
115
|
+
results.first['label']
|
|
116
|
+
)
|
|
114
117
|
assert_equal('Inventory Skus', results.first['type'])
|
|
115
118
|
assert_equal(admin.inventory_sku_path(inventory), results.first['url'])
|
|
116
119
|
|
|
@@ -16,7 +16,7 @@ module Workarea
|
|
|
16
16
|
|
|
17
17
|
find('.message__dismiss-button').click
|
|
18
18
|
find('#shortcuts_menu').hover
|
|
19
|
-
|
|
19
|
+
refute_text('Current Page')
|
|
20
20
|
|
|
21
21
|
find('#shortcuts_menu').hover
|
|
22
22
|
menu_item = all('.menu__item').last
|
|
@@ -24,7 +24,7 @@ module Workarea
|
|
|
24
24
|
find('.menu__delete-link').click
|
|
25
25
|
assert_current_path(admin.root_path)
|
|
26
26
|
assert(page.has_content?('Success'))
|
|
27
|
-
|
|
27
|
+
refute_text('Current Page')
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
end
|
|
@@ -60,7 +60,7 @@ module Workarea
|
|
|
60
60
|
click_link t('workarea.admin.catalog.dashboard_link')
|
|
61
61
|
|
|
62
62
|
visit admin.catalog_products_path
|
|
63
|
-
|
|
63
|
+
refute_text('1 selected')
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
def test_persistence
|
|
@@ -85,7 +85,7 @@ module Workarea
|
|
|
85
85
|
click_button t('workarea.admin.catalog_products.index.edit')
|
|
86
86
|
click_link t('workarea.admin.form.cancel')
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
refute_text('3 selected')
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
def test_select_all
|
|
@@ -95,7 +95,7 @@ module Workarea
|
|
|
95
95
|
assert(page.has_content?("5 #{t('workarea.admin.shared.bulk_actions.selected')}"))
|
|
96
96
|
|
|
97
97
|
uncheck 'select_all'
|
|
98
|
-
|
|
98
|
+
refute_text(t('workarea.admin.shared.bulk_actions.selected'))
|
|
99
99
|
|
|
100
100
|
check 'select_all'
|
|
101
101
|
uncheck "catalog_product_#{@products.fifth.id}"
|
|
@@ -103,14 +103,14 @@ module Workarea
|
|
|
103
103
|
assert(page.has_content?("3 #{t('workarea.admin.shared.bulk_actions.selected')}"))
|
|
104
104
|
|
|
105
105
|
check 'select_all'
|
|
106
|
-
|
|
106
|
+
refute_text(t('workarea.admin.shared.bulk_actions.selected'))
|
|
107
107
|
|
|
108
108
|
check "catalog_product_#{@products.fifth.id}"
|
|
109
109
|
check "catalog_product_#{@products.fourth.id}"
|
|
110
110
|
assert(page.has_content?("2 #{t('workarea.admin.shared.bulk_actions.selected')}"))
|
|
111
111
|
|
|
112
112
|
check 'select_all'
|
|
113
|
-
|
|
113
|
+
refute_text(t('workarea.admin.shared.bulk_actions.selected'))
|
|
114
114
|
end
|
|
115
115
|
|
|
116
116
|
def test_bulk_editing
|
|
@@ -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
|
|
|
@@ -71,9 +71,9 @@ module Workarea
|
|
|
71
71
|
|
|
72
72
|
row = find_all("table tr")[1]
|
|
73
73
|
within(row) do
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
refute_text('$11.00')
|
|
75
|
+
refute_text('$9.99')
|
|
76
|
+
refute_text('1')
|
|
77
77
|
end
|
|
78
78
|
end
|
|
79
79
|
end
|
|
@@ -65,8 +65,8 @@ module Workarea
|
|
|
65
65
|
assert(page.has_content?('Success'))
|
|
66
66
|
|
|
67
67
|
click_link 'Recommendations'
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
refute_selector("option[value='#{product_2.id}']")
|
|
69
|
+
refute_selector("option[value='#{product_3.id}']")
|
|
70
70
|
assert(page.has_ordered_text?('Custom', 'Similar Products', 'Also Purchased'))
|
|
71
71
|
|
|
72
72
|
#
|
|
@@ -49,8 +49,8 @@ module Workarea
|
|
|
49
49
|
click_link 'Published (1)'
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
refute_text('Scheduled Release')
|
|
53
|
+
refute_text('Unscheduled Release')
|
|
54
54
|
assert(page.has_content?('Published Release'))
|
|
55
55
|
end
|
|
56
56
|
|
|
@@ -277,7 +277,7 @@ module Workarea
|
|
|
277
277
|
|
|
278
278
|
click_link t('workarea.admin.releases.calendar.next_week')
|
|
279
279
|
wait_for_xhr
|
|
280
|
-
|
|
280
|
+
refute_text('Foo Release')
|
|
281
281
|
|
|
282
282
|
click_link t('workarea.admin.releases.calendar.previous_week')
|
|
283
283
|
wait_for_xhr
|
|
@@ -285,7 +285,7 @@ module Workarea
|
|
|
285
285
|
|
|
286
286
|
click_link t('workarea.admin.releases.calendar.next_week')
|
|
287
287
|
wait_for_xhr
|
|
288
|
-
|
|
288
|
+
refute_text('Foo Release')
|
|
289
289
|
|
|
290
290
|
click_button t('workarea.admin.releases.calendar.today')
|
|
291
291
|
wait_for_xhr
|
|
@@ -321,8 +321,8 @@ module Workarea
|
|
|
321
321
|
|
|
322
322
|
visit admin.releases_path
|
|
323
323
|
|
|
324
|
-
|
|
325
|
-
|
|
324
|
+
refute_text('Release Five')
|
|
325
|
+
refute_text('Release Six')
|
|
326
326
|
|
|
327
327
|
assert(
|
|
328
328
|
page.has_content?(
|
|
@@ -74,9 +74,9 @@ module Workarea
|
|
|
74
74
|
assert(page.has_content?('PA'))
|
|
75
75
|
assert(page.has_content?('19106'))
|
|
76
76
|
|
|
77
|
-
assert(page.has_content?('6
|
|
78
|
-
assert(page.has_content?('4
|
|
79
|
-
assert(page.has_content?('2
|
|
77
|
+
assert(page.has_content?('6%'))
|
|
78
|
+
assert(page.has_content?('4%'))
|
|
79
|
+
assert(page.has_content?('2%'))
|
|
80
80
|
|
|
81
81
|
assert(page.has_content?("#{Money.default_currency.symbol}5.00"))
|
|
82
82
|
assert(page.has_content?("#{Money.default_currency.symbol}500.00"))
|
|
@@ -91,7 +91,7 @@ module Workarea
|
|
|
91
91
|
click_link t('workarea.admin.actions.edit')
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
-
fill_in 'rate[country_percentage]', with: 0
|
|
94
|
+
fill_in 'rate[country_percentage]', with: 0.005
|
|
95
95
|
fill_in 'rate[region_percentage]', with: 10
|
|
96
96
|
fill_in 'rate[postal_code_percentage]', with: 20.5
|
|
97
97
|
|
|
@@ -100,7 +100,8 @@ module Workarea
|
|
|
100
100
|
assert(page.has_content?('Success'))
|
|
101
101
|
|
|
102
102
|
within '.index-table__row' do
|
|
103
|
-
assert(page.has_content?('
|
|
103
|
+
assert(page.has_content?('0.005%'))
|
|
104
|
+
assert(page.has_content?('10%'))
|
|
104
105
|
assert(page.has_content?('20.5%'))
|
|
105
106
|
end
|
|
106
107
|
|
|
@@ -33,8 +33,8 @@ module Workarea
|
|
|
33
33
|
click_button 'remove_taxon', match: :first
|
|
34
34
|
|
|
35
35
|
assert(page.has_content?('Success'))
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
refute_text('First Taxon')
|
|
37
|
+
refute_text('Second Taxon')
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
end
|
|
@@ -21,7 +21,7 @@ module Workarea
|
|
|
21
21
|
)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
def
|
|
24
|
+
def test_variant_details
|
|
25
25
|
@view_model.variants.build(
|
|
26
26
|
sku: 'SKU1',
|
|
27
27
|
name: 'name',
|
|
@@ -40,7 +40,7 @@ module Workarea
|
|
|
40
40
|
|
|
41
41
|
assert_equal(
|
|
42
42
|
{ 'Color' => ['Red', 'Black', 'White'], 'Size' => ['S', 'M', 'L'] },
|
|
43
|
-
@view_model.
|
|
43
|
+
@view_model.variant_details
|
|
44
44
|
)
|
|
45
45
|
end
|
|
46
46
|
|
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.
|
|
4
|
+
version: 3.5.20
|
|
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-
|
|
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.5.
|
|
19
|
+
version: 3.5.20
|
|
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.
|
|
26
|
+
version: 3.5.20
|
|
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.
|
|
33
|
+
version: 3.5.20
|
|
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.
|
|
40
|
+
version: 3.5.20
|
|
41
41
|
description: Provides site administration functionality for the Workarea Commerce
|
|
42
42
|
Platform.
|
|
43
43
|
email:
|
|
@@ -175,6 +175,7 @@ files:
|
|
|
175
175
|
- app/assets/images/workarea/admin/selected.svg
|
|
176
176
|
- app/assets/images/workarea/admin/valid.svg
|
|
177
177
|
- app/assets/javascripts/jquery_ui/admin/categorized_autocomplete.js
|
|
178
|
+
- app/assets/javascripts/jquery_ujs/insert.js
|
|
178
179
|
- app/assets/javascripts/jquery_ujs/replace.js
|
|
179
180
|
- app/assets/javascripts/workarea/admin/application.js.erb
|
|
180
181
|
- app/assets/javascripts/workarea/admin/config.js.erb
|