workarea-admin 3.4.26 → 3.4.27

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: e0e2c945703ac548dfcc945ed6d711dbe855fba3de6a8cf8c672fbf6339b363f
4
- data.tar.gz: 1b73600f15eea6c0f1cdfbd5bed3c7fa883aa9d7c72ea00e18875bd0b7e31acd
3
+ metadata.gz: 4bb83fb982468b7096266c1fead527458334ed164aec727c6376c73348d92d66
4
+ data.tar.gz: 729571edf5310fcab460513795bc64b70ecae6b6b7ca791d9e85fa53687ece81
5
5
  SHA512:
6
- metadata.gz: 52c65ec95398243e4293bd332886daf477e665f7a6926cdf480045a8f16905a33ea723c28b2c440bb98f107416b016c32403049c9498a2b8f5499d2df42d87fd
7
- data.tar.gz: 462354f06eb560655beebdbb993b055b6da194fb3d7cecbb7796a3912df845bda5c51bdc77b9dd8a7e526b544f3a1f28218389d5b370011975a3aab5ca384a8e
6
+ metadata.gz: 2f0947f2b9ec42924c63e23fbc1eedca69aba17b80700520177f025b2320b70e9606660c1d5c7f6314de5356f9650d4478bc88c45a655faaba467b75e3c10b91
7
+ data.tar.gz: 075dc9b989988f3dd34848a5bb1e6e2b95504ab0b446627a3193c0128efddfe54bacc25c4b85ee90c17544c6868bd592c453260f079dc5e4aba4561ec5c56f18
@@ -34,9 +34,10 @@ module Workarea
34
34
  end
35
35
 
36
36
  def options_for_category(category_id)
37
- return nil unless category_id.present?
37
+ model = Catalog::Category.where(id: category_id).first
38
+
39
+ return '' unless model.present?
38
40
 
39
- model = Catalog::Category.find(category_id)
40
41
  options_for_select({ model.name => model.id }, model.id)
41
42
  end
42
43
 
@@ -1,4 +1,4 @@
1
- - @page_title = t('workarea.admin.content_pages.index.page_title')
1
+ - @page_title = t('workarea.admin.navigation_menus.index.page_title')
2
2
 
3
3
 
4
4
  .view
@@ -112,6 +112,7 @@
112
112
  %th
113
113
  %span.data-pairs__name= t('workarea.admin.orders.attributes.totals.subtotal')
114
114
  %td= number_to_currency @order.subtotal_price
115
+ = append_partials('admin.order_attributes_subtotal', order: @order)
115
116
  %tr
116
117
  %th
117
118
  %span.data-pairs__name= t('workarea.admin.orders.attributes.totals.shipping')
@@ -25,6 +25,10 @@
25
25
  = label_tag 'service_tax_code', t('workarea.admin.fields.tax_code'), class: 'property__name'
26
26
  = text_field_tag 'service[tax_code]', @service.tax_code, class: 'text-box'
27
27
 
28
+ .property
29
+ = label_tag 'service_service_code', t('workarea.admin.fields.service_code'), class: 'property__name'
30
+ = text_field_tag 'service[service_code]', @service.service_code, class: 'text-box'
31
+
28
32
  .property
29
33
  = label_tag 'service_country', t('workarea.admin.fields.country'), class: 'property__name'
30
34
  = select_tag "service[country]", options_for_select(country_options, @service.country.try(:alpha2)), prompt: t('workarea.admin.shipping_services.options.not_specified')
@@ -25,6 +25,10 @@
25
25
  = label_tag 'service_tax_code', t('workarea.admin.fields.tax_code'), class: 'property__name'
26
26
  = text_field_tag 'service[tax_code]', @service.tax_code, class: 'text-box'
27
27
 
28
+ .property
29
+ = label_tag 'service_service_code', t('workarea.admin.fields.service_code'), class: 'property__name'
30
+ = text_field_tag 'service[service_code]', @service.service_code, class: 'text-box'
31
+
28
32
  .property
29
33
  = label_tag 'service_country', t('workarea.admin.fields.country'), class: 'property__name'
30
34
  = select_tag "service[country]", options_for_select(country_options, @service.country.try(:alpha2)), prompt: t('workarea.admin.shipping_services.options.not_specified')
@@ -1646,6 +1646,7 @@ en:
1646
1646
  searches: Searches
1647
1647
  send_account_creation_email: Notify Them by Email
1648
1648
  service: Service
1649
+ service_code: Service Code
1649
1650
  services_file: Services File
1650
1651
  shipping: Shipping
1651
1652
  shipping_service_id: Shipping Service
@@ -0,0 +1,17 @@
1
+ require 'test_helper'
2
+
3
+ module Workarea
4
+ module Admin
5
+ class ContentHelperTest < ViewTest
6
+ def test_options_for_category
7
+ category = create_category
8
+ deleted_category = create_category.tap(&:destroy)
9
+ options = %(<option selected="selected" value="#{category.id}">#{category.name}</option>)
10
+
11
+ assert_equal('', options_for_category(nil))
12
+ assert_equal('', options_for_category(deleted_category.id))
13
+ assert_equal(options, options_for_category(category.id))
14
+ end
15
+ end
16
+ end
17
+ end
@@ -6,6 +6,9 @@ module Workarea
6
6
  include Admin::IntegrationTest
7
7
 
8
8
  def test_ensures_cors_policy_for_bulk_upload
9
+ Workarea.s3.expects(:get_bucket_cors).returns(
10
+ mock('Excon::Response', data: { body: { 'CORSConfiguration' => [] } })
11
+ )
9
12
  Workarea.s3.expects(:put_bucket_cors).once
10
13
  get admin.content_assets_path
11
14
  assert(response.ok?)
@@ -9,7 +9,8 @@ module Workarea
9
9
  shipping_service = {
10
10
  name: 'Shipping Service',
11
11
  tax_code: '001',
12
- country: 'US'
12
+ country: 'US',
13
+ service_code: 'FED'
13
14
  }
14
15
  post admin.shipping_services_path,
15
16
  params: { service: shipping_service, new_rates: [{ price: '7.00' }] }
@@ -20,6 +21,7 @@ module Workarea
20
21
  assert_equal('Shipping Service', service.name)
21
22
  assert_equal('001', service.tax_code)
22
23
  assert_equal(Country['US'], service.country)
24
+ assert_equal('FED', service.service_code)
23
25
  end
24
26
 
25
27
  def test_update
@@ -5,7 +5,14 @@ module Workarea
5
5
  class AssetsSystemTest < SystemTest
6
6
  include Admin::IntegrationTest
7
7
 
8
+ def mock_get_bucket_cors
9
+ Workarea.s3.expects(:get_bucket_cors).returns(
10
+ mock('Excon::Response', data: { body: { 'CORSConfiguration' => [] } })
11
+ )
12
+ end
13
+
8
14
  def test_management
15
+ mock_get_bucket_cors
9
16
  visit admin.content_assets_path
10
17
  click_link 'add_asset'
11
18
 
@@ -31,6 +38,7 @@ module Workarea
31
38
  end
32
39
 
33
40
  def test_insertion
41
+ mock_get_bucket_cors
34
42
  asset = create_asset
35
43
 
36
44
  content = create_content(
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.26
4
+ version: 3.4.27
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-01-22 00:00:00.000000000 Z
11
+ date: 2020-02-21 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.26
19
+ version: 3.4.27
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
26
+ version: 3.4.27
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.26
33
+ version: 3.4.27
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.26
40
+ version: 3.4.27
41
41
  description: Provides site administration functionality for the Workarea Commerce
42
42
  Platform.
43
43
  email:
@@ -1182,6 +1182,7 @@ files:
1182
1182
  - test/dummy/script/rails
1183
1183
  - test/dummy/tmp/screenshots/.keep
1184
1184
  - test/helpers/workarea/admin/application_helper_test.rb
1185
+ - test/helpers/workarea/admin/content_helper_test.rb
1185
1186
  - test/helpers/workarea/admin/icons_helper_test.rb
1186
1187
  - test/helpers/workarea/admin/imports_helper_test.rb
1187
1188
  - test/helpers/workarea/admin/insights_helper_test.rb
@@ -1398,7 +1399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1398
1399
  - !ruby/object:Gem::Version
1399
1400
  version: '0'
1400
1401
  requirements: []
1401
- rubygems_version: 3.1.2
1402
+ rubygems_version: 3.0.6
1402
1403
  signing_key:
1403
1404
  specification_version: 4
1404
1405
  summary: Admin for the Workarea Commerce Platform