spree_cm_commissioner 2.5.0 → 2.5.1.pre.pre1
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: 161198a81f4cf2dff359256d58c277e0c493602378c854a7e8c937803b1c32fa
|
|
4
|
+
data.tar.gz: 71c19403432925ce94cdde05447d7f64766a7f7dec3a6e6637c06fd4e0e83990
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dab6644c7af312064a7bb5779306048b3b8984cc33caa50e369d4a5a63ee4ce6bce0534435096cfaebabcae924a3eca7c14ab47fae728059c2700092e6a1e5e8
|
|
7
|
+
data.tar.gz: 5e15d12cfa4f27ff55bd03f0d415d2862839d6f0fac91d3e9c233f2bb3af18d60819b20d6ae776d31115f437c71c7ae3029c306e1d58a9ae5268004b9f4d162d
|
data/Gemfile.lock
CHANGED
|
@@ -27,16 +27,41 @@ module Spree
|
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
def dynamic_field_key_value(guest)
|
|
31
|
+
guest.guest_dynamic_fields
|
|
32
|
+
.includes(:dynamic_field)
|
|
33
|
+
.to_h do |gdf|
|
|
34
|
+
label = gdf.dynamic_field.label.to_s.strip
|
|
35
|
+
key =
|
|
36
|
+
if label.ascii_only?
|
|
37
|
+
label.parameterize(separator: '_')
|
|
38
|
+
else
|
|
39
|
+
label
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
value = gdf.value.strip
|
|
43
|
+
|
|
44
|
+
[key, value]
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
30
48
|
def serialize_resource(guest)
|
|
31
49
|
order = guest.line_item.order
|
|
32
50
|
|
|
33
|
-
{
|
|
51
|
+
base_payload = {
|
|
34
52
|
token: guest.token,
|
|
35
53
|
first_name: guest.first_name,
|
|
36
54
|
last_name: guest.last_name,
|
|
37
55
|
dob: guest.dob,
|
|
38
56
|
gender: guest.gender,
|
|
39
57
|
age: guest.age,
|
|
58
|
+
nationality_id: guest.nationality_id,
|
|
59
|
+
emergency_contact: guest.emergency_contact,
|
|
60
|
+
guest_phone_number: guest.phone_number,
|
|
61
|
+
guest_contact: guest.contact,
|
|
62
|
+
guest_social_contact: guest.social_contact,
|
|
63
|
+
address: guest.address,
|
|
64
|
+
guest_id_card: guest.id_card,
|
|
40
65
|
occupation: guest.occupation&.name || guest.other_occupation,
|
|
41
66
|
entry_type: guest.entry_type,
|
|
42
67
|
organization: guest.other_organization,
|
|
@@ -51,8 +76,13 @@ module Spree
|
|
|
51
76
|
checked_in_at: guest.check_in&.confirmed_at,
|
|
52
77
|
qr_data: guest.qr_data,
|
|
53
78
|
order_qr_data: order.qr_data,
|
|
54
|
-
country_code: guest.country_code
|
|
79
|
+
country_code: guest.country_code,
|
|
80
|
+
line_item_id: guest.line_item_id,
|
|
81
|
+
order_token: order.token,
|
|
82
|
+
bib: guest.formatted_bib_number
|
|
55
83
|
}
|
|
84
|
+
|
|
85
|
+
base_payload.merge(dynamic_field_key_value(guest))
|
|
56
86
|
end
|
|
57
87
|
end
|
|
58
88
|
end
|
|
@@ -45,7 +45,7 @@ module SpreeCmCommissioner
|
|
|
45
45
|
|
|
46
46
|
accepts_nested_attributes_for :trip_stops, :product, :seat_layout, allow_destroy: true
|
|
47
47
|
|
|
48
|
-
self.whitelisted_ransackable_associations = %w[product vehicle]
|
|
48
|
+
self.whitelisted_ransackable_associations = %w[product vehicle vehicle_type]
|
|
49
49
|
self.whitelisted_ransackable_attributes = %w[origin_place_id destination_place_id]
|
|
50
50
|
|
|
51
51
|
def changed_route_attributes?
|
|
@@ -8,6 +8,8 @@ module SpreeCmCommissioner
|
|
|
8
8
|
# The ID is automatically updated whenever the seat_layout is saved.
|
|
9
9
|
store_public_metadata :preload_seat_layout_id, :integer
|
|
10
10
|
|
|
11
|
+
attr_accessor :enable_seat_layout
|
|
12
|
+
|
|
11
13
|
belongs_to :vendor, class_name: 'Spree::Vendor'
|
|
12
14
|
|
|
13
15
|
has_one :primary_photo, -> { order(position: :asc) }, class_name: 'SpreeCmCommissioner::VehiclePhoto', as: :viewable, dependent: :destroy
|
|
@@ -24,5 +26,9 @@ module SpreeCmCommissioner
|
|
|
24
26
|
validates :name, uniqueness: { scope: :vendor_id }, presence: true
|
|
25
27
|
|
|
26
28
|
self.whitelisted_ransackable_attributes = %w[name kind]
|
|
29
|
+
|
|
30
|
+
def seat_layout?
|
|
31
|
+
preload_seat_layout_id.present?
|
|
32
|
+
end
|
|
27
33
|
end
|
|
28
34
|
end
|
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: 2.5.
|
|
4
|
+
version: 2.5.1.pre.pre1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- You
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: spree
|
|
@@ -3155,9 +3155,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
3155
3155
|
version: '2.7'
|
|
3156
3156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
3157
3157
|
requirements:
|
|
3158
|
-
- - "
|
|
3158
|
+
- - ">"
|
|
3159
3159
|
- !ruby/object:Gem::Version
|
|
3160
|
-
version:
|
|
3160
|
+
version: 1.3.1
|
|
3161
3161
|
requirements:
|
|
3162
3162
|
- none
|
|
3163
3163
|
rubygems_version: 3.4.1
|