workarea-admin 3.5.18 → 3.5.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6b46068c998bbe814822add9ab5e2cc9036905b1fff4051093c2d8312f2d959
4
- data.tar.gz: 586a0e6ec7cc56a6fec6bb5bedcb5a1f3472f687b62c8185b585b264bb5ea6a6
3
+ metadata.gz: 2fa740ba48b4fdf3285077508f27e804b4d04dce69d08981d4e3d72174bdae82
4
+ data.tar.gz: 51da60eac496d3e4133ad3667f9c2e72b4a541ebff5e5f397f603d0f7e6e45b7
5
5
  SHA512:
6
- metadata.gz: f12e56f8d1f0013c1f63da5aa37880f28da03fa746a9f8926574b1889ebbd8910e76dd7a6f63aeeaf41a1831ea388df9aacc74833a7b0e7f21423d6ec4d3f5e4
7
- data.tar.gz: 518be2e9744c165d0dcbc31eaba2e4f31f531dba8adc977b11fab3c64cce694e4c36a8e1f2e8ab473fb5b48ff104cbb6dfb73bdefcd387d190b5fb0a39831379
6
+ metadata.gz: 869f45549bf0f404dca21df06c01bed3de546d2d7203a99138e83ca82bfac2098990fc99c379ed5e08837e277c6e16945abf2eb8ed37aaf19ea9e49a66849cb6
7
+ data.tar.gz: 06eadc8f2a5f7be3d4a24b76d57e9bee8b66a31d7c5a060c86700782b24b617518e6820c9f063242efae9ce97148212dac8fa3aa16009b47cfb8b471b6000987
@@ -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
@@ -75,7 +75,7 @@ module Workarea
75
75
  end
76
76
 
77
77
  def available_inventory
78
- @available_inventory ||= Inventory.total_available(*model.skus)
78
+ @available_inventory ||= Inventory::Collection.new(model.skus).available_to_sell
79
79
  end
80
80
 
81
81
  def ignore_inventory?
@@ -12,7 +12,7 @@ module Workarea
12
12
  end
13
13
 
14
14
  def available_inventory
15
- inventory.available
15
+ inventory.available_to_sell
16
16
  end
17
17
 
18
18
  def available_to_sell_inventory
@@ -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.available_inventory, placeholder: '0', class: 'text-box text-box--small', id: dom_id(variant, 'variant_inventory')
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')}", id: @image.option.parameterize, class: 'product-images__image-summary-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')
@@ -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)
@@ -55,11 +55,6 @@
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
 
65
60
  = append_partials('admin.additional_variant_information_fields', variant: @variant)
@@ -11,6 +11,9 @@
11
11
  %li
12
12
  %strong= t('workarea.admin.fields.policy')
13
13
  = model.policy.titleize.presence
14
+ %li
15
+ %strong= t('workarea.admin.fields.sellable')
16
+ = model.sellable
14
17
  %li
15
18
  %strong= t('workarea.admin.fields.available')
16
19
  = model.available
@@ -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
@@ -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"
@@ -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
@@ -1773,6 +1771,7 @@ en:
1773
1771
  searches: Searches
1774
1772
  segments: Segments
1775
1773
  sell_price: Sell Price
1774
+ sellable: Sellable Units
1776
1775
  send_account_creation_email: Notify Them by Email
1777
1776
  service: Service
1778
1777
  service_code: Service Code
@@ -2281,12 +2280,6 @@ en:
2281
2280
  aux_navigation:
2282
2281
  view_pricing: View Pricing
2283
2282
  view_product: View Product
2284
- cards:
2285
- available: 'Available:'
2286
- backordered: 'Backordered:'
2287
- policy: 'Policy:'
2288
- purchased: 'Purchased:'
2289
- reserve: 'Reserve:'
2290
2283
  edit:
2291
2284
  available_quantity: Available Quantity
2292
2285
  backordered_quantity: Backordered Quantity
@@ -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('SKU123 (4 available)', results.first['label'])
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
 
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.18
4
+ version: 3.5.19
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-01 00:00:00.000000000 Z
11
+ date: 2020-09-16 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.18
19
+ version: 3.5.19
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.18
26
+ version: 3.5.19
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.18
33
+ version: 3.5.19
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.18
40
+ version: 3.5.19
41
41
  description: Provides site administration functionality for the Workarea Commerce
42
42
  Platform.
43
43
  email: