workarea-product_additional_details 2.0.3 → 2.0.35

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: 4d24293b5ecd598ce1e4f81865b0e2a5939f5bf47a9eac646edcbf6c4566c811
4
- data.tar.gz: 1205a137f548433a39144e38d687b31fdcd736beaf969b410112f4631b28a05d
3
+ metadata.gz: 3896657adbfe568f6032326a98a73c78f0d8ca8b2ad9e18b642c02d7bf4cf770
4
+ data.tar.gz: 01e40ddb9369b35b0b850f663c5caedef0428fa093596bbb8c01f2af4f2f5a16
5
5
  SHA512:
6
- metadata.gz: 21774ab5b8904169c5cd6d8647ad0e30ff81f450812f08fd74cc089597eda3db214255a185af211600051fb28b56d7c661ef130083bb5a1dad3f1b441243197d
7
- data.tar.gz: 822bb52bb0bc63d8abf23065c71aaac1f60e761d6f6207784cd9d112838ed2f1205e019c424846bd88ee760fb33171455f692465e4fd2c29356197e8c07373b5
6
+ metadata.gz: d4e9d3107d74f4776619025cf14262f0dcd83e3b5e853994434c15385fb65d00bae569713f0da3fce973cf452ac9926848895cf5379818287e1f4a447dfb8fdd
7
+ data.tar.gz: 5d40149ab3afbdd8de46bd3706b014c5500fbb580aa2384f2f73d7fbe771ccf40d0822e38bf660f0ecab51860b3843aa3cd06ea9c00a08778980591ca6bb9f2e
@@ -17,7 +17,7 @@ module Workarea
17
17
 
18
18
  def set_additional_details
19
19
  @variant.additional_details = HashUpdate.new(
20
- original: @product.additional_details,
20
+ original: @variant.additional_details,
21
21
  adds: params[:new_additional_details],
22
22
  updates: params[:additional_details],
23
23
  removes: params[:additional_details_to_remove]
@@ -0,0 +1,9 @@
1
+ module Workarea
2
+ module Admin
3
+ module DetailsParseHelper
4
+ def parse_details_text(text)
5
+ JSON.parse(text).join(' ') rescue text
6
+ end
7
+ end
8
+ end
9
+ end
@@ -17,7 +17,7 @@
17
17
  %td
18
18
  .property
19
19
  = hidden_field_tag 'additional_details[]', name, id: nil
20
- = text_area_tag 'additional_details[]', value, class: 'text-box text-box--i18n', id: nil
20
+ = text_area_tag 'additional_details[]', parse_details_text(value), class: 'text-box text-box--i18n', id: nil
21
21
  %td.align-center= check_box_tag 'additional_details_to_remove[]', name, false, id: nil, title: "#{t('workarea.admin.actions.delete')}: #{name} #{value}"
22
22
  %tr{ data: { cloneable_row: '' } }
23
23
  %td
@@ -75,7 +75,7 @@
75
75
  = text_field_tag 'additional_details[]', name, class: 'text-box text-box--i18n', title: 'Name', placeholder: 'Name', id: nil
76
76
  %td
77
77
  .property
78
- = text_area_tag 'additional_details[]', hash_editing_value(value), class: 'text-box text-box--i18n', title: 'Value', placeholder: 'Value', id: nil
78
+ = text_area_tag 'additional_details[]', value, class: 'text-box text-box--i18n', title: 'Value', placeholder: 'Value', id: nil
79
79
  %tr{ data: { cloneable_row: '' } }
80
80
  %td
81
81
  .property
@@ -1,3 +1,4 @@
1
1
  Workarea.configure do |config|
2
2
  # Add custom configuration here
3
+ Workarea::Admin::ApplicationController.helper(Workarea::Admin::DetailsParseHelper)
3
4
  end
@@ -1,5 +1,5 @@
1
1
  module Workarea
2
2
  module ProductAdditionalDetails
3
- VERSION = "2.0.3".freeze
3
+ VERSION = "2.0.35"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-product_additional_details
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gunasekaran Raja
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-25 00:00:00.000000000 Z
11
+ date: 2020-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea
@@ -49,6 +49,7 @@ files:
49
49
  - app/controllers/workarea/admin/catalog_variants_controller.decorator
50
50
  - app/controllers/workarea/admin/create_catalog_products_controller.decorator
51
51
  - app/helpers/.keep
52
+ - app/helpers/workarea/admin/details_parse_helper.rb
52
53
  - app/mailers/.keep
53
54
  - app/models/.keep
54
55
  - app/models/workarea/catalog/product.decorator