spree_cm_commissioner 1.18.0.pre.pre2 → 1.18.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60a9ca64e7401f96f8cb7e220a28a12ca89d7bc84ce724b0e7751e1c0abf1d0e
|
4
|
+
data.tar.gz: cb4e4fbfd87c785a73c23ee8fd3a02fadacf864d5c905df5a654c56069a79769
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0db6f0473e7663f28e179e51cc68034c6b96315d402a38bb49fef0669ba23ae46cc615d7ee350ec551b1c7fd1686a724a1aef0057ce2b4f637913766c8cdd8c9
|
7
|
+
data.tar.gz: bf5d35d082edc126bcead686c1d1de3e74f2a2bed22a1cbdd62e60dea23679c007ff1fb523f0a3447a3b598b1e3c66838b28f35e408b82024de877c5da237657
|
data/Gemfile.lock
CHANGED
@@ -34,7 +34,7 @@ GIT
|
|
34
34
|
PATH
|
35
35
|
remote: .
|
36
36
|
specs:
|
37
|
-
spree_cm_commissioner (1.18.
|
37
|
+
spree_cm_commissioner (1.18.1)
|
38
38
|
activerecord-multi-tenant
|
39
39
|
activerecord_json_validator (~> 2.1, >= 2.1.3)
|
40
40
|
aws-sdk-cloudfront
|
@@ -572,6 +572,10 @@ GEM
|
|
572
572
|
nokogiri (1.15.4)
|
573
573
|
mini_portile2 (~> 2.8.2)
|
574
574
|
racc (~> 1.4)
|
575
|
+
nokogiri (1.15.4-x86_64-darwin)
|
576
|
+
racc (~> 1.4)
|
577
|
+
nokogiri (1.15.4-x86_64-linux)
|
578
|
+
racc (~> 1.4)
|
575
579
|
noticed (1.6.3)
|
576
580
|
http (>= 4.0.0)
|
577
581
|
rails (>= 5.2.0)
|
@@ -38,14 +38,25 @@ module Spree
|
|
38
38
|
def update
|
39
39
|
spree_authorize! :update, spree_current_order, order_token
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
41
|
+
begin
|
42
|
+
if guest_params[:guest_dynamic_fields_attributes]
|
43
|
+
resource.guest_dynamic_fields.destroy_all
|
44
|
+
|
45
|
+
guest_params[:guest_dynamic_fields_attributes].each do |attr|
|
46
|
+
field = build_dynamic_field(attr)
|
47
|
+
field.save!
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
resource.assign_attributes(guest_params.except(:guest_dynamic_fields_attributes))
|
52
|
+
|
53
|
+
if resource.save
|
54
|
+
render_serialized_payload { serialize_resource(resource) }
|
55
|
+
else
|
56
|
+
render_error_payload(resource.errors, 400)
|
57
|
+
end
|
58
|
+
rescue ActiveRecord::RecordInvalid => e
|
59
|
+
render_error_payload(e.record.errors, 400)
|
49
60
|
end
|
50
61
|
end
|
51
62
|
|
@@ -84,21 +95,12 @@ module Spree
|
|
84
95
|
)
|
85
96
|
end
|
86
97
|
|
87
|
-
def update_dynamic_fields
|
88
|
-
resource.guest_dynamic_fields.destroy_all
|
89
|
-
|
90
|
-
dynamic_fields_attrs = guest_params[:guest_dynamic_fields_attributes]
|
91
|
-
|
92
|
-
resource.guest_dynamic_fields = dynamic_fields_attrs.map do |attr|
|
93
|
-
build_dynamic_field(attr)
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
98
|
def build_dynamic_field(attr)
|
98
99
|
field = resource.guest_dynamic_fields.build(attr.except(:id))
|
99
100
|
|
100
101
|
if field.dynamic_field.requires_dynamic_field_options?
|
101
|
-
|
102
|
+
option = field.dynamic_field.dynamic_field_options.find_by(id: field.value)
|
103
|
+
field.dynamic_field_option = option if option
|
102
104
|
end
|
103
105
|
|
104
106
|
field
|
@@ -48,7 +48,7 @@ module Spree
|
|
48
48
|
quantity: add_item_params[:quantity],
|
49
49
|
public_metadata: add_item_params[:public_metadata],
|
50
50
|
private_metadata: add_item_params[:private_metadata],
|
51
|
-
options: add_item_params[:options]
|
51
|
+
options: add_item_params[:options]
|
52
52
|
)
|
53
53
|
|
54
54
|
render_order(result)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_cm_commissioner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.18.
|
4
|
+
version: 1.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- You
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree
|
@@ -2673,9 +2673,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2673
2673
|
version: '2.7'
|
2674
2674
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2675
2675
|
requirements:
|
2676
|
-
- - "
|
2676
|
+
- - ">="
|
2677
2677
|
- !ruby/object:Gem::Version
|
2678
|
-
version:
|
2678
|
+
version: '0'
|
2679
2679
|
requirements:
|
2680
2680
|
- none
|
2681
2681
|
rubygems_version: 3.4.1
|