spree_cm_commissioner 2.4.3 → 2.5.0.pre.pre2
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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/controllers/spree/api/v2/storefront/popular_route_places_controller.rb +7 -1
- data/app/controllers/spree/api/v2/storefront/route_places_controller.rb +9 -9
- data/app/finders/spree_cm_commissioner/places/find_with_route.rb +10 -10
- data/app/finders/spree_cm_commissioner/routes/find_popular.rb +10 -14
- data/app/models/concerns/spree_cm_commissioner/tenant_preference.rb +3 -0
- data/app/request_schemas/spree_cm_commissioner/popular_route_places_request_schema.rb +12 -0
- data/app/request_schemas/spree_cm_commissioner/route_places_request_schema.rb +5 -0
- data/app/views/spree/admin/tenants/_form.html.erb +18 -0
- data/app/views/spree/admin/tenants/form/_footer.html.erb +31 -0
- data/app/views/spree/admin/tenants/form/_social.html.erb +31 -0
- data/app/views/spree/order_mailer/confirm_email.html.erb +1 -1
- data/app/views/spree_cm_commissioner/layouts/order_mailer.html.erb +1 -1
- data/app/views/spree_cm_commissioner/order_mailer/tenant/_footer.html.erb +13 -6
- data/app/views/spree_cm_commissioner/order_mailer/tenant/_support_contact.html.erb +23 -24
- data/db/migrate/20251209022924_add_contact_fields_to_cm_tenants.rb +9 -0
- data/lib/spree_cm_commissioner/version.rb +1 -1
- metadata +8 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6f64a6d2661d4c1deb862d020b44eca3748d001e0376731881b47de3c1e4965c
|
|
4
|
+
data.tar.gz: 4a11c037dd432001d56d379c73e1cad574971f2a1cd8cc5ef3cbb1585b297c3b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e3de7556ebafefc89a00bbf454f2cb70700ef9dc56b8131b103f9f26f7e3af8341fcf0bc4c0b757a372128fbf56d6ecf967682ba46f97f0b117f0b0319ee979
|
|
7
|
+
data.tar.gz: ea662f3962d01be3d39e11ba4d86611fcc3713c03061ab8e0131c2063acfdb70ade45b77f821a616ad3320637d2ba547389a91a5f14bbe05530d26ac40c692fd
|
data/Gemfile.lock
CHANGED
|
@@ -19,7 +19,8 @@ module Spree
|
|
|
19
19
|
# override
|
|
20
20
|
def collection
|
|
21
21
|
@collection ||= collection_finder.new.execute(
|
|
22
|
-
route_type: params[:route_type]
|
|
22
|
+
route_type: params[:route_type],
|
|
23
|
+
query: params[:query]
|
|
23
24
|
)
|
|
24
25
|
end
|
|
25
26
|
|
|
@@ -51,6 +52,11 @@ module Spree
|
|
|
51
52
|
)
|
|
52
53
|
end
|
|
53
54
|
|
|
55
|
+
# override
|
|
56
|
+
def required_schema
|
|
57
|
+
SpreeCmCommissioner::PopularRoutePlacesRequestSchema
|
|
58
|
+
end
|
|
59
|
+
|
|
54
60
|
def include_vendors?
|
|
55
61
|
resource_includes.include?(:vendors) || false
|
|
56
62
|
end
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
# GET /api/v2/storefront/route_places
|
|
4
4
|
#
|
|
5
5
|
# Finds places (origins or destinations) that are connected to a given place through existing routes.
|
|
6
|
-
# Optionally filters results by
|
|
6
|
+
# Optionally filters results by query or route_type. Supports two modes:
|
|
7
7
|
#
|
|
8
8
|
# Usage 1: Connected places (requires place_id)
|
|
9
9
|
# - Finds places connected to a specific place via routes
|
|
10
10
|
# - Returns origins/destinations that have routes with the specified place
|
|
11
11
|
#
|
|
12
|
-
# Usage 2:
|
|
13
|
-
# - Searches all route places by
|
|
14
|
-
# - Returns all origins/destinations matching the
|
|
12
|
+
# Usage 2: query search (requires query, place_id optional)
|
|
13
|
+
# - Searches all route places by query
|
|
14
|
+
# - Returns all origins/destinations matching the query
|
|
15
15
|
#
|
|
16
16
|
# Query Parameters:
|
|
17
17
|
# - place_type: [String] Required. Type of route place: 'origin' or 'destination'
|
|
18
18
|
# * 'origin': returns origins that have routes TO the specified place (if place_id provided)
|
|
19
19
|
# * 'destination': returns destinations that have routes FROM the specified place (if place_id provided)
|
|
20
20
|
# - place_id: [Integer] Optional. The place ID to find connected places for
|
|
21
|
-
# - query: [String] Optional.
|
|
21
|
+
# - query: [String] Optional. query to filter place names (case-insensitive)
|
|
22
22
|
# - include: Optional comma-separated list (e.g., 'vendors,nearby_places')
|
|
23
23
|
#
|
|
24
24
|
# Response: Collection of places serialized with PlaceSerializer
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
# - Returns empty collection if place_type is invalid
|
|
28
28
|
# - If place_id provided: returns places connected to that place
|
|
29
29
|
# - If place_id blank: returns all origins/destinations
|
|
30
|
-
# - Filters results by
|
|
30
|
+
# - Filters results by query or route_type if provided
|
|
31
31
|
#
|
|
32
32
|
# @example Mode 1: Find destinations connected to origin place ID 123
|
|
33
33
|
# GET /api/v2/storefront/route_places?place_id=123&place_type=destination
|
|
34
34
|
#
|
|
35
|
-
# @example Mode 2: Search all destination places by
|
|
35
|
+
# @example Mode 2: Search all destination places by query
|
|
36
36
|
# GET /api/v2/storefront/route_places?place_type=destination&query=Phnom
|
|
37
37
|
#
|
|
38
|
-
# @example Combined: Find origins connected to place 456, filtered by
|
|
38
|
+
# @example Combined: Find origins connected to place 456, filtered by query
|
|
39
39
|
# GET /api/v2/storefront/route_places?place_id=456&place_type=origin&query=Siem
|
|
40
40
|
module Spree
|
|
41
41
|
module Api
|
|
@@ -49,7 +49,7 @@ module Spree
|
|
|
49
49
|
@collection ||= collection_finder.new(
|
|
50
50
|
place_type: params[:place_type],
|
|
51
51
|
place_id: params[:place_id],
|
|
52
|
-
|
|
52
|
+
query: params[:query],
|
|
53
53
|
route_type: params[:route_type]
|
|
54
54
|
).execute
|
|
55
55
|
end
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
#
|
|
3
3
|
# @param place_type [String] Required. 'origin' or 'destination'
|
|
4
4
|
# @param place_id [Integer] Optional. Filter by connected place ID
|
|
5
|
-
# @param
|
|
5
|
+
# @param query [String] Optional. Filter by place name (case-insensitive)
|
|
6
6
|
# @param route_type [Symbol, String] Optional. Filter by route type from associated trips (e.g., :ferry, :bus)
|
|
7
7
|
#
|
|
8
8
|
# @return [ActiveRecord::Relation<SpreeCmCommissioner::Place>]
|
|
9
9
|
#
|
|
10
10
|
# Modes:
|
|
11
11
|
# - place_id only: returns connected places (origins TO or destinations FROM given place)
|
|
12
|
-
# -
|
|
12
|
+
# - query only: filters by name
|
|
13
13
|
# - route_type only: filters by trip route types on those routes
|
|
14
14
|
# - combinations: connected places filtered by name and/or route type
|
|
15
15
|
# - neither: all origins/destinations in routes
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
# @example Origins with ferry trips to place 123
|
|
18
18
|
# FindWithRoute.new(place_type: 'origin', place_id: 123, route_type: :ferry).execute
|
|
19
19
|
#
|
|
20
|
-
# @example Destinations filtered by
|
|
21
|
-
# FindWithRoute.new(place_type: 'destination',
|
|
20
|
+
# @example Destinations filtered by query and route type
|
|
21
|
+
# FindWithRoute.new(place_type: 'destination', query: 'Phnom', route_type: :bus).execute
|
|
22
22
|
module SpreeCmCommissioner
|
|
23
23
|
module Places
|
|
24
24
|
class FindWithRoute
|
|
25
|
-
attr_reader :place_type, :place_id, :
|
|
25
|
+
attr_reader :place_type, :place_id, :query, :route_type
|
|
26
26
|
|
|
27
|
-
def initialize(place_type:, place_id: nil,
|
|
27
|
+
def initialize(place_type:, place_id: nil, query: nil, route_type: nil)
|
|
28
28
|
@place_type = place_type
|
|
29
29
|
@place_id = place_id
|
|
30
|
-
@
|
|
30
|
+
@query = query
|
|
31
31
|
@route_type = route_type
|
|
32
32
|
end
|
|
33
33
|
|
|
@@ -36,7 +36,7 @@ module SpreeCmCommissioner
|
|
|
36
36
|
return SpreeCmCommissioner::Place.none if place_id.present? && !SpreeCmCommissioner::Place.exists?(place_id)
|
|
37
37
|
|
|
38
38
|
result = scope
|
|
39
|
-
result =
|
|
39
|
+
result = apply_query_filter(result) if query.present?
|
|
40
40
|
result = apply_route_type_filter(result) if route_type.present?
|
|
41
41
|
result
|
|
42
42
|
end
|
|
@@ -57,8 +57,8 @@ module SpreeCmCommissioner
|
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
-
def
|
|
61
|
-
result.where('cm_places.name ILIKE ?', "%#{
|
|
60
|
+
def apply_query_filter(result)
|
|
61
|
+
result.where('cm_places.name ILIKE ?', "%#{query}%")
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
def apply_route_type_filter(result)
|
|
@@ -24,26 +24,22 @@
|
|
|
24
24
|
module SpreeCmCommissioner
|
|
25
25
|
module Routes
|
|
26
26
|
class FindPopular
|
|
27
|
-
def execute(route_type: nil)
|
|
28
|
-
scope(route_type: route_type)
|
|
27
|
+
def execute(route_type: nil, query: nil)
|
|
28
|
+
scope(route_type: route_type, query: query)
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
private
|
|
32
32
|
|
|
33
|
-
def scope(route_type:
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
def scope(route_type:, query:)
|
|
34
|
+
includes_associations = %i[origin_place destination_place]
|
|
35
|
+
includes_associations << :trips if route_type.present?
|
|
36
|
+
result = SpreeCmCommissioner::Route.includes(*includes_associations)
|
|
36
37
|
|
|
37
|
-
if route_type.present?
|
|
38
|
-
# Filter routes that have trips with the specified route_type
|
|
39
|
-
route_scope = SpreeCmCommissioner::Route
|
|
40
|
-
.joins(:trips)
|
|
41
|
-
.where(cm_trips: { route_type: route_type.to_sym })
|
|
42
|
-
result = result.where(id: route_scope.select(:id))
|
|
43
|
-
end
|
|
38
|
+
result = result.joins(:trips).where(cm_trips: { route_type: route_type.to_sym }) if route_type.present?
|
|
44
39
|
|
|
45
|
-
result.
|
|
46
|
-
|
|
40
|
+
result = result.where('cm_routes.route_name ILIKE ?', "%#{query}%") if query.present?
|
|
41
|
+
|
|
42
|
+
result.distinct.order(fulfilled_order_count: :desc, order_count: :desc)
|
|
47
43
|
end
|
|
48
44
|
end
|
|
49
45
|
end
|
|
@@ -12,6 +12,9 @@ module SpreeCmCommissioner
|
|
|
12
12
|
preference :brand_primary_color, :string, default: ''
|
|
13
13
|
preference :redirect_target_host, :string, default: ''
|
|
14
14
|
preference :redirect_excluded_paths, :string, default: ''
|
|
15
|
+
preference :facebook, :string, default: ''
|
|
16
|
+
preference :twitter, :string, default: ''
|
|
17
|
+
preference :instagram, :string, default: ''
|
|
15
18
|
end
|
|
16
19
|
end
|
|
17
20
|
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module SpreeCmCommissioner
|
|
2
|
+
class PopularRoutePlacesRequestSchema < ApplicationRequestSchema
|
|
3
|
+
params do
|
|
4
|
+
optional(:query).maybe(:string)
|
|
5
|
+
optional(:route_type).maybe(:string)
|
|
6
|
+
end
|
|
7
|
+
route_types = SpreeCmCommissioner::RouteType::ROUTE_TYPES.map(&:to_s)
|
|
8
|
+
rule(:route_type) do
|
|
9
|
+
key.failure("Invalid route_type. Use #{route_types}") if value.present? && route_types.exclude?(value)
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -6,6 +6,11 @@ module SpreeCmCommissioner
|
|
|
6
6
|
optional(:place_id).maybe(:integer)
|
|
7
7
|
optional(:route_type).maybe(:string)
|
|
8
8
|
end
|
|
9
|
+
route_types = SpreeCmCommissioner::RouteType::ROUTE_TYPES.map(&:to_s)
|
|
10
|
+
|
|
11
|
+
rule(:route_type) do
|
|
12
|
+
key.failure("Invalid route_type. Use #{route_types}") if value.present? && route_types.exclude?(value)
|
|
13
|
+
end
|
|
9
14
|
|
|
10
15
|
rule(:place_type) do
|
|
11
16
|
key.failure('Invalid place_type. Use origin or destination') unless %w[origin destination].include?(value)
|
|
@@ -74,6 +74,8 @@
|
|
|
74
74
|
<%= content_tag :div, nil, style: "background-color: #{@object.preferred_brand_primary_color}; width: 60px; height: 60px; border: 1px solid #ccc; box-sizing: border-box; display: block;" %>
|
|
75
75
|
</div>
|
|
76
76
|
</div>
|
|
77
|
+
|
|
78
|
+
<!-- Assetlinks Field -->
|
|
77
79
|
<div class="col-12">
|
|
78
80
|
<%= f.field_container :preferred_assetlinks do %>
|
|
79
81
|
<%= f.label :preferred_assetlinks, raw(Spree.t(:assetlinks)) %>
|
|
@@ -182,6 +184,22 @@
|
|
|
182
184
|
</div>
|
|
183
185
|
</div>
|
|
184
186
|
|
|
187
|
+
<!-- ======================== Footer ======================== -->
|
|
188
|
+
<div class="card mb-4">
|
|
189
|
+
<div class="card-body">
|
|
190
|
+
<div data-hook="admin_tenant_form_fields" class="row mt-4">
|
|
191
|
+
<div class="col-12 mb-4">
|
|
192
|
+
<h4>Footer <span class="text-muted" style="font-size: 1rem; font-weight: normal;">(Footer is for customer support details and tenant address)</span></h4>
|
|
193
|
+
</div>
|
|
194
|
+
<!-- Footer Field -->
|
|
195
|
+
<div class="col-12">
|
|
196
|
+
<%= render partial: 'spree/admin/tenants/form/footer', locals: { f: f } %>
|
|
197
|
+
<%= render partial: 'spree/admin/tenants/form/social', locals: { f: f } %>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
|
|
185
203
|
<!-- ======================== Redirect Settings ======================== -->
|
|
186
204
|
<div class="card mb-4">
|
|
187
205
|
<div class="card-body">
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<div data-hook="admin_tenant_support_fields" class="row">
|
|
2
|
+
<div class="col-6">
|
|
3
|
+
<%= f.field_container :customer_support_email do %>
|
|
4
|
+
<%= f.label :customer_support_email, 'Customer support email' %>
|
|
5
|
+
<%= f.email_field :customer_support_email, class: 'form-control', placeholder: 'support@example.com' %>
|
|
6
|
+
<% if f.object.errors[:customer_support_email].any? %>
|
|
7
|
+
<div class="error text-danger"><%= f.object.errors[:customer_support_email].join(', ') %></div>
|
|
8
|
+
<% end %>
|
|
9
|
+
<% end %>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="col-6">
|
|
13
|
+
<%= f.field_container :contact_phone do %>
|
|
14
|
+
<%= f.label :contact_phone, 'Contact phone' %>
|
|
15
|
+
<%= f.telephone_field :contact_phone, class: 'form-control', placeholder: '+855 12 345 678' %>
|
|
16
|
+
<% if f.object.errors[:contact_phone].any? %>
|
|
17
|
+
<div class="error text-danger"><%= f.object.errors[:contact_phone].join(', ') %></div>
|
|
18
|
+
<% end %>
|
|
19
|
+
<% end %>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="col-12 mt-3">
|
|
23
|
+
<%= f.field_container :address do %>
|
|
24
|
+
<%= f.label :address, 'Address' %>
|
|
25
|
+
<%= f.text_area :address, class: 'form-control', rows: 3, placeholder: 'Store address' %>
|
|
26
|
+
<% if f.object.errors[:address].any? %>
|
|
27
|
+
<div class="error text-danger"><%= f.object.errors[:address].join(', ') %></div>
|
|
28
|
+
<% end %>
|
|
29
|
+
<% end %>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<div data-hook="admin_tenant_social_fields" class="row">
|
|
2
|
+
<div class="col-4">
|
|
3
|
+
<%= f.field_container :preferred_facebook do %>
|
|
4
|
+
<%= f.label :preferred_facebook, 'Facebook URL' %>
|
|
5
|
+
<%= f.url_field :preferred_facebook, class: 'form-control', placeholder: 'https://facebook.com/yourpage' %>
|
|
6
|
+
<% if f.object.errors[:preferred_facebook].any? %>
|
|
7
|
+
<div class="error text-danger"><%= f.object.errors[:preferred_facebook].join(', ') %></div>
|
|
8
|
+
<% end %>
|
|
9
|
+
<% end %>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="col-4">
|
|
13
|
+
<%= f.field_container :preferred_twitter do %>
|
|
14
|
+
<%= f.label :preferred_twitter, 'Twitter URL' %>
|
|
15
|
+
<%= f.url_field :preferred_twitter, class: 'form-control', placeholder: 'https://twitter.com/yourhandle' %>
|
|
16
|
+
<% if f.object.errors[:preferred_twitter].any? %>
|
|
17
|
+
<div class="error text-danger"><%= f.object.errors[:preferred_twitter].join(', ') %></div>
|
|
18
|
+
<% end %>
|
|
19
|
+
<% end %>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="col-4">
|
|
23
|
+
<%= f.field_container :preferred_instagram do %>
|
|
24
|
+
<%= f.label :preferred_instagram, 'Instagram URL' %>
|
|
25
|
+
<%= f.url_field :preferred_instagram, class: 'form-control', placeholder: 'https://instagram.com/youraccount' %>
|
|
26
|
+
<% if f.object.errors[:preferred_instagram].any? %>
|
|
27
|
+
<div class="error text-danger"><%= f.object.errors[:preferred_instagram].join(', ') %></div>
|
|
28
|
+
<% end %>
|
|
29
|
+
<% end %>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<%= render 'spree_cm_commissioner/order_mailer/order_total', order: @order %>
|
|
22
22
|
<%= render 'spree_cm_commissioner/order_mailer/your_booking', order: @order, show_booking_header: true %>
|
|
23
23
|
<%= render 'spree_cm_commissioner/order_mailer/tenant/customer_info', order: @order %>
|
|
24
|
-
<%= render 'spree_cm_commissioner/order_mailer/tenant/support_contact' %>
|
|
24
|
+
<%= render 'spree_cm_commissioner/order_mailer/tenant/support_contact', order: @order, name: @name%>
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
<% end %>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<% if @order.tenant.nil? %>
|
|
27
27
|
<%= render 'spree_cm_commissioner/order_mailer/footer', store: @order.store %>
|
|
28
28
|
<% else %>
|
|
29
|
-
<%= render 'spree_cm_commissioner/order_mailer/tenant/footer',
|
|
29
|
+
<%= render 'spree_cm_commissioner/order_mailer/tenant/footer', tenant: @order.tenant %>
|
|
30
30
|
<% end %>
|
|
31
31
|
</td>
|
|
32
32
|
</tr>
|
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
<div class="email-footer_inner">
|
|
2
|
-
<div class="mb-24"><%=
|
|
3
|
-
<div class="mb-24 f-14"><%=
|
|
2
|
+
<div class="mb-24"><%= tenant&.description %></div>
|
|
3
|
+
<div class="mb-24 f-14"><%= tenant&.address %></div>
|
|
4
4
|
<h2 class="mb-24">Connect with us</h2>
|
|
5
5
|
<table class="mb-24 social_icons">
|
|
6
6
|
<tbody>
|
|
7
7
|
<tr>
|
|
8
|
-
<% if
|
|
8
|
+
<% if tenant&.preferred_facebook.present? %>
|
|
9
9
|
<td class="social_icon">
|
|
10
|
-
<%= link_to
|
|
10
|
+
<%= link_to tenant.preferred_facebook, target: :_blank do %>
|
|
11
11
|
<%= image_tag "mailer/facebook.png", class: "mail-icon"%>
|
|
12
12
|
<% end %>
|
|
13
13
|
</td>
|
|
14
14
|
<% end %>
|
|
15
|
-
<% if
|
|
15
|
+
<% if tenant&.preferred_instagram.present? %>
|
|
16
16
|
<td class="social_icon">
|
|
17
|
-
<%= link_to
|
|
17
|
+
<%= link_to tenant.preferred_instagram, target: :_blank do %>
|
|
18
18
|
<%= image_tag "mailer/instagram.png", class: "mail-icon"%>
|
|
19
19
|
<% end %>
|
|
20
20
|
</td>
|
|
21
21
|
<% end %>
|
|
22
|
+
<% if tenant&.preferred_twitter.present? %>
|
|
23
|
+
<td class="social_icon">
|
|
24
|
+
<%= link_to tenant.preferred_twitter, target: :_blank do %>
|
|
25
|
+
<%= image_tag "mailer/twitter.png", class: "mail-icon"%>
|
|
26
|
+
<% end %>
|
|
27
|
+
</td>
|
|
28
|
+
<% end %>
|
|
22
29
|
</tr>
|
|
23
30
|
</tbody>
|
|
24
31
|
</table>
|
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
<div class="content-cell">
|
|
2
|
-
<div class="container">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
<div class="container">
|
|
3
|
+
<h2><%= name %> Support</h2>
|
|
4
|
+
<div class="flex two-columns">
|
|
5
|
+
<div class="two-columns-item">
|
|
6
|
+
<div class="flex two-columns-item_detail">
|
|
7
|
+
<div class="two-columns_icon"><%= image_tag "mailer/tenant_phone.png", class: "mail-icon"%></div>
|
|
8
|
+
<div class="two-columns_text-container">
|
|
9
|
+
<p class="two-columns_title">Contact</p>
|
|
10
|
+
<% if order&.tenant&.contact_phone&.present? %>
|
|
11
|
+
<p class="two-columns_description">
|
|
12
|
+
<%= link_to order.tenant.contact_phone, "tel:#{order.tenant.contact_phone}" %>
|
|
13
|
+
</p>
|
|
14
|
+
<% end %>
|
|
15
|
+
</div>
|
|
15
16
|
</div>
|
|
16
17
|
</div>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<p class="two-columns_title">Email</p>
|
|
18
|
+
<div class="vertical-separater"></div>
|
|
19
|
+
<div class="two-columns-item">
|
|
20
|
+
<div class="flex two-columns-item_detail">
|
|
21
|
+
<div class="two-columns_icon"><%= image_tag "mailer/mail.png", class: "mail-icon"%></div>
|
|
22
|
+
<div class="two-columns_text-container">
|
|
23
|
+
<p class="two-columns_title">Email</p>
|
|
24
24
|
<p class="two-columns_description">
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
<%= order&.tenant&.customer_support_email.present? ? link_to(order.tenant.customer_support_email, "mailto:#{order.tenant.customer_support_email}") : "N/A" %>
|
|
26
|
+
</p>
|
|
27
|
+
</div>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
|
-
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
class AddContactFieldsToCmTenants < ActiveRecord::Migration[7.0]
|
|
2
|
+
def change
|
|
3
|
+
add_column :cm_tenants, :customer_support_email, :string, if_not_exists: true
|
|
4
|
+
add_column :cm_tenants, :address, :text, if_not_exists: true
|
|
5
|
+
add_column :cm_tenants, :contact_phone, :string, if_not_exists: true
|
|
6
|
+
add_index :cm_tenants, :customer_support_email, if_not_exists: true
|
|
7
|
+
add_index :cm_tenants, :contact_phone, if_not_exists: true
|
|
8
|
+
end
|
|
9
|
+
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.
|
|
4
|
+
version: 2.5.0.pre.pre2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- You
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-12-
|
|
11
|
+
date: 2025-12-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: spree
|
|
@@ -1771,6 +1771,7 @@ files:
|
|
|
1771
1771
|
- app/request_schemas/spree_cm_commissioner/intercity_taxi_draft_order_schema.rb
|
|
1772
1772
|
- app/request_schemas/spree_cm_commissioner/intercity_taxi_draft_order_update_schema.rb
|
|
1773
1773
|
- app/request_schemas/spree_cm_commissioner/inventory_item_schema.rb
|
|
1774
|
+
- app/request_schemas/spree_cm_commissioner/popular_route_places_request_schema.rb
|
|
1774
1775
|
- app/request_schemas/spree_cm_commissioner/profile_image_request_schema.rb
|
|
1775
1776
|
- app/request_schemas/spree_cm_commissioner/route_places_request_schema.rb
|
|
1776
1777
|
- app/request_schemas/spree_cm_commissioner/seat_layout_schema.rb
|
|
@@ -2196,6 +2197,8 @@ files:
|
|
|
2196
2197
|
- app/views/spree/admin/tenants/_form.html.erb
|
|
2197
2198
|
- app/views/spree/admin/tenants/_tabs.html.erb
|
|
2198
2199
|
- app/views/spree/admin/tenants/edit.html.erb
|
|
2200
|
+
- app/views/spree/admin/tenants/form/_footer.html.erb
|
|
2201
|
+
- app/views/spree/admin/tenants/form/_social.html.erb
|
|
2199
2202
|
- app/views/spree/admin/tenants/index.html.erb
|
|
2200
2203
|
- app/views/spree/admin/tenants/new.html.erb
|
|
2201
2204
|
- app/views/spree/admin/user_events/_events.html.erb
|
|
@@ -2895,6 +2898,7 @@ files:
|
|
|
2895
2898
|
- db/migrate/20251009073929_add_lock_version_to_cm_vendor_routes.rb
|
|
2896
2899
|
- db/migrate/20251113081853_add_index_to_spree_orders_updated_at.rb
|
|
2897
2900
|
- db/migrate/20251119093000_add_tenant_id_to_cm_vendor_places.rb
|
|
2901
|
+
- db/migrate/20251209022924_add_contact_fields_to_cm_tenants.rb
|
|
2898
2902
|
- docker-compose.yml
|
|
2899
2903
|
- docs/api/scoped-access-token-endpoints.md
|
|
2900
2904
|
- docs/option_types/attr_types.md
|
|
@@ -3065,9 +3069,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
3065
3069
|
version: '2.7'
|
|
3066
3070
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
3067
3071
|
requirements:
|
|
3068
|
-
- - "
|
|
3072
|
+
- - ">"
|
|
3069
3073
|
- !ruby/object:Gem::Version
|
|
3070
|
-
version:
|
|
3074
|
+
version: 1.3.1
|
|
3071
3075
|
requirements:
|
|
3072
3076
|
- none
|
|
3073
3077
|
rubygems_version: 3.4.1
|