spree_cm_commissioner 1.21.0 → 2.0.0.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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -5
  3. data/app/assets/images/mailer/mail.png +0 -0
  4. data/app/assets/images/mailer/tenant_phone.png +0 -0
  5. data/app/assets/images/mailer/tenant_user.png +0 -0
  6. data/app/controllers/spree/api/v2/operator/pie_chart_events_controller.rb +46 -0
  7. data/app/controllers/spree/api/v2/storefront/guests_controller.rb +13 -13
  8. data/app/factory/spree_cm_commissioner/invite_guest_claimed_telegram_message_factory.rb +28 -38
  9. data/app/interactors/spree_cm_commissioner/create_ticket.rb +6 -5
  10. data/app/interactors/spree_cm_commissioner/create_vendor.rb +44 -0
  11. data/app/mailers/spree/order_mailer_decorator.rb +18 -3
  12. data/app/models/concerns/spree_cm_commissioner/line_item_durationable.rb +18 -0
  13. data/app/models/concerns/spree_cm_commissioner/tenant_preference.rb +1 -0
  14. data/app/models/concerns/spree_cm_commissioner/variant_options_concern.rb +4 -2
  15. data/app/models/spree_cm_commissioner/chart_type.rb +10 -0
  16. data/app/models/spree_cm_commissioner/dynamic_field.rb +20 -0
  17. data/app/models/spree_cm_commissioner/guest.rb +56 -0
  18. data/app/models/spree_cm_commissioner/guest_dynamic_field.rb +41 -1
  19. data/app/models/spree_cm_commissioner/product_decorator.rb +22 -0
  20. data/app/models/spree_cm_commissioner/user_decorator.rb +6 -0
  21. data/app/models/spree_cm_commissioner/vendor_decorator.rb +3 -0
  22. data/app/queries/spree_cm_commissioner/pie_chart_event_queries.rb +179 -0
  23. data/app/serializables/spree_cm_commissioner/pie_chart_event.rb +11 -0
  24. data/app/serializers/spree_cm_commissioner/v2/operator/chart_type_serializer.rb +10 -0
  25. data/app/serializers/spree_cm_commissioner/v2/storefront/dynamic_field_serializer.rb +1 -1
  26. data/app/views/spree/admin/tenant_vendors/index.html.erb +9 -2
  27. data/app/views/spree/admin/tenants/_form.html.erb +9 -0
  28. data/app/views/spree/admin/tenants/edit.html.erb +2 -1
  29. data/app/views/spree/admin/tenants/index.html.erb +7 -1
  30. data/app/views/spree/admin/vendors/_form.html.erb +14 -0
  31. data/app/views/spree/order_mailer/confirm_email.html.erb +27 -16
  32. data/app/views/spree_cm_commissioner/layouts/order_mailer.html.erb +5 -1
  33. data/app/views/spree_cm_commissioner/order_mailer/_mailer_stylesheets.html.erb +41 -4
  34. data/app/views/spree_cm_commissioner/order_mailer/tenant/_customer_info.html.erb +42 -0
  35. data/app/views/spree_cm_commissioner/order_mailer/tenant/_footer.html.erb +25 -0
  36. data/app/views/spree_cm_commissioner/order_mailer/tenant/_greeting.html.erb +19 -0
  37. data/app/views/spree_cm_commissioner/order_mailer/tenant/_support_contact.html.erb +33 -0
  38. data/config/locales/en.yml +5 -1
  39. data/config/routes.rb +1 -0
  40. data/db/migrate/20250709073455_add_email_fields_to_spree_vendors.rb +6 -0
  41. data/db/migrate/20250718071620_add_data_fill_stage_to_dynamic_fields.rb +5 -0
  42. data/lib/spree_cm_commissioner/version.rb +1 -1
  43. metadata +19 -4
@@ -0,0 +1,179 @@
1
+ module SpreeCmCommissioner
2
+ class PieChartEventQueries
3
+ attr_reader :taxon_id, :chart_type, :refreshed
4
+
5
+ # chart_type: 'participation | gender | entry_type' taxon_id: taxon_id, refreshed: false
6
+ def initialize(taxon_id:, chart_type:, refreshed: false)
7
+ @taxon_id = taxon_id
8
+ @chart_type = chart_type || 'participation'
9
+ @refreshed = refreshed
10
+ end
11
+
12
+ def call
13
+ cache_key = "#{chart_type}-#{taxon_id}"
14
+ Rails.cache.delete(cache_key) if refreshed
15
+
16
+ product_charts = Rails.cache.fetch(cache_key, expires_in: 30.minutes) do
17
+ pie_chart || []
18
+ end
19
+
20
+ SpreeCmCommissioner::PieChartEvent.new(
21
+ id: taxon_id,
22
+ chart_type: chart_type,
23
+ product_charts: product_charts
24
+ )
25
+ end
26
+
27
+ def pie_chart
28
+ case chart_type
29
+ when 'participation' then participation_pie_chart
30
+ when 'entry_type' then entry_type_pie_chart
31
+ when 'guest_gender' then gender_pie_chart
32
+ when 'guest_occupation' then occupation_pie_chart
33
+ when 'guest_nationality' then nationality_pie_chart
34
+ end
35
+ end
36
+
37
+ private
38
+
39
+ def base_joins
40
+ query = SpreeCmCommissioner::Guest
41
+ join_type = chart_type.in?(%w[participation occupation nationality]) ? 'LEFT' : 'INNER'
42
+
43
+ query
44
+ .joins("#{join_type} JOIN cm_check_ins ON cm_check_ins.guest_id = cm_guests.id")
45
+ .joins('INNER JOIN spree_line_items ON spree_line_items.id = cm_guests.line_item_id')
46
+ .joins('INNER JOIN spree_variants ON spree_variants.id = spree_line_items.variant_id')
47
+ .joins('INNER JOIN spree_orders ON spree_orders.id = spree_line_items.order_id')
48
+ .joins('INNER JOIN spree_products ON spree_products.id = spree_variants.product_id')
49
+ .joins('INNER JOIN spree_products_taxons ON spree_products.id = spree_products_taxons.product_id')
50
+ .joins('INNER JOIN spree_taxons ON spree_taxons.id = spree_products_taxons.taxon_id')
51
+ .where(spree_orders: { state: 'complete' }, spree_taxons: { parent_id: taxon_id })
52
+ end
53
+
54
+ def participation_pie_chart
55
+ grouped_data = base_joins
56
+ .select("spree_products.id AS product_id,
57
+ spree_products.name AS product_name,
58
+ CASE
59
+ WHEN cm_check_ins.id IS NOT NULL THEN 'show'
60
+ ELSE 'no_show'
61
+ END AS name,
62
+ COUNT(*) AS total"
63
+ )
64
+ .group('spree_products.id, CASE WHEN cm_check_ins.id IS NOT NULL THEN \'show\' ELSE \'no_show\' END')
65
+ .group_by(&:product_id)
66
+
67
+ product_charts = build_product_charts(grouped_data)
68
+
69
+ add_overall_summary(product_charts)
70
+ end
71
+
72
+ def gender_pie_chart
73
+ data = base_joins.select(
74
+ "spree_products.id AS product_id,
75
+ spree_products.name AS product_name,
76
+ CASE
77
+ WHEN cm_guests.gender = 0 THEN 'other'
78
+ WHEN cm_guests.gender = 1 THEN 'male'
79
+ WHEN cm_guests.gender = 2 THEN 'female'
80
+ END AS name,
81
+ COUNT(DISTINCT cm_guests.id) AS total"
82
+ )
83
+ .group('spree_products.id, cm_guests.gender')
84
+ .group_by(&:product_id)
85
+
86
+ product_charts = build_product_charts(data)
87
+
88
+ add_overall_summary(product_charts)
89
+ end
90
+
91
+ def entry_type_pie_chart
92
+ data = base_joins
93
+ .where.not(cm_check_ins: { id: nil })
94
+ .select(
95
+ "spree_products.id AS product_id,
96
+ spree_products.name AS product_name,
97
+ CASE
98
+ WHEN cm_check_ins.entry_type = 0 THEN 'normal'
99
+ WHEN cm_check_ins.entry_type = 1 THEN 'VIP'
100
+ END AS name,
101
+ COUNT(cm_check_ins.id) AS total"
102
+ )
103
+ .group('spree_products.id, cm_check_ins.entry_type')
104
+ .group_by(&:product_id)
105
+
106
+ product_charts = build_product_charts(data)
107
+
108
+ add_overall_summary(product_charts)
109
+ end
110
+
111
+ def occupation_pie_chart
112
+ data = base_joins
113
+ .joins('LEFT JOIN spree_taxons AS occupation_taxons ON occupation_taxons.id = cm_guests.occupation_id')
114
+ .where.not(cm_guests: { occupation_id: nil })
115
+ .select(
116
+ 'spree_products.id AS product_id,
117
+ spree_products.name AS product_name,
118
+ occupation_taxons.name AS name,
119
+ COUNT(DISTINCT cm_guests.id) AS total,
120
+ COUNT(DISTINCT cm_check_ins.id) AS show'
121
+ )
122
+ .group('spree_products.id, spree_products.name, occupation_taxons.name')
123
+ .group_by(&:product_id)
124
+
125
+ product_charts = build_product_charts(data, keys: %i[name total show])
126
+
127
+ add_overall_summary(product_charts, keys: %i[total show])
128
+ end
129
+
130
+ def nationality_pie_chart
131
+ data = base_joins
132
+ .joins('LEFT JOIN spree_taxons AS nationality_taxons ON nationality_taxons.id = cm_guests.nationality_id')
133
+ .where.not(cm_guests: { nationality_id: nil })
134
+ .select(
135
+ 'spree_products.id AS product_id,
136
+ spree_products.name AS product_name,
137
+ nationality_taxons.name AS name,
138
+ COUNT(DISTINCT cm_guests.id) AS total,
139
+ COUNT(DISTINCT cm_check_ins.id) AS show'
140
+ )
141
+ .group('spree_products.id, spree_products.name, nationality_taxons.name')
142
+ .group_by(&:product_id)
143
+
144
+ product_charts = build_product_charts(data, keys: %i[name total show])
145
+
146
+ add_overall_summary(product_charts, keys: %i[total show])
147
+ end
148
+
149
+ def build_product_charts(grouped_data, keys: %i[name total])
150
+ grouped_data.map do |product_id, records|
151
+ {
152
+ product_id: product_id,
153
+ product_name: records.first.product_name,
154
+ pies: records.map { |r| r.slice(*keys) }
155
+ }
156
+ end
157
+ end
158
+
159
+ def add_overall_summary(product_charts, keys: %i[total])
160
+ totals = Hash.new { |hash, key| hash[key] = keys.index_with { |_k| 0 } }
161
+
162
+ product_charts.each do |chart|
163
+ chart[:pies].each do |pie|
164
+ keys.each { |k| totals[pie[:name]][k] += pie[k] }
165
+ end
166
+ end
167
+
168
+ overall = {
169
+ product_id: 'all',
170
+ product_name: 'Overall',
171
+ pies: totals.map do |name, values|
172
+ { name: name }.merge(values)
173
+ end
174
+ }
175
+
176
+ [overall] + product_charts
177
+ end
178
+ end
179
+ end
@@ -0,0 +1,11 @@
1
+ module SpreeCmCommissioner
2
+ class PieChartEvent
3
+ attr_reader :id, :chart_type, :product_charts
4
+
5
+ def initialize(id:, chart_type:, product_charts:)
6
+ @id = id
7
+ @chart_type = chart_type
8
+ @product_charts = product_charts
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,10 @@
1
+ module SpreeCmCommissioner
2
+ module V2
3
+ module Operator
4
+ class ChartTypeSerializer < BaseSerializer
5
+ set_id :chart_type
6
+ attributes :chart_type, :name
7
+ end
8
+ end
9
+ end
10
+ end
@@ -2,7 +2,7 @@ module SpreeCmCommissioner
2
2
  module V2
3
3
  module Storefront
4
4
  class DynamicFieldSerializer < BaseSerializer
5
- attributes :id, :label, :data_type, :vendor_id, :multiple_select, :created_at, :updated_at, :position
5
+ attributes :id, :label, :data_type, :vendor_id, :multiple_select, :created_at, :updated_at, :position, :data_fill_stage
6
6
 
7
7
  has_many :dynamic_field_options, serializer: SpreeCmCommissioner::V2::Storefront::DynamicFieldOptionSerializer
8
8
  end
@@ -1,6 +1,6 @@
1
1
  <% content_for :page_title do %>
2
2
  <%= page_header_back_button spree.admin_tenants_url %>
3
- <%= link_to @tenant.name, spree.admin_tenants_url %> / <%= Spree.t('vendors') %>
3
+ <%= link_to Spree.t('tenants'), spree.admin_tenants_url %> / <%= link_to @tenant.name, spree.admin_tenants_url%> / <%= Spree.t('vendors') %>
4
4
  <% end %>
5
5
 
6
6
  <% content_for :page_actions do %>
@@ -24,13 +24,20 @@
24
24
  <tbody>
25
25
  <% @vendors.each do |vendor| %>
26
26
  <tr id="<%= spree_dom_id vendor %>" data-hook="admin_vendors_index_rows">
27
- <td><%= vendor.name %></td>
27
+ <td>
28
+ <% if can?(:edit, vendor) %>
29
+ <%= link_to vendor.name, edit_admin_vendor_path(vendor.slug) %>
30
+ <% else %>
31
+ <td><%= vendor.name %></td>
32
+ <% end %>
33
+ </td>
28
34
  <td><%= vendor.slug %></td>
29
35
  <td><%= vendor.created_at %></td>
30
36
  <td><%= vendor.updated_at %></td>
31
37
  <td><%= vendor.tenant.name %></td>
32
38
  <td data-hook="admin_tenants_index_row_actions" class="actions">
33
39
  <span class="d-flex justify-content-end">
40
+ <%= link_to_edit vendor, url: edit_admin_vendor_path(vendor.slug), no_text: true if can?(:edit, vendor) %>
34
41
  <%= link_to_delete vendor, url: admin_tenant_vendor_path(@tenant, vendor.id), no_text: true if can?(:delete, vendor) %>
35
42
  </span>
36
43
  </td>
@@ -101,6 +101,15 @@
101
101
  <% end %>
102
102
  </div>
103
103
 
104
+ <!-- Brand Primary Color Field -->
105
+ <div class="col-md-6">
106
+ <%= f.label :preferred_brand_primary_color, Spree.t(:brand_primary_color), class: 'form-label' %>
107
+ <%= f.text_field :preferred_brand_primary_color, class: 'form-control color-picker', placeholder: '#FF5733', value: @object.preferred_brand_primary_color %>
108
+ <div class="color-preview" style="margin-top: 10px;">
109
+ <%= 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;" %>
110
+ </div>
111
+ </div>
112
+
104
113
  <!-- State Field -->
105
114
  <div class="col-6">
106
115
  <%= f.field_container :state do %>
@@ -1,6 +1,7 @@
1
1
  <% content_for :page_title do %>
2
2
  <%= page_header_back_button spree.admin_tenants_url %>
3
- <%= link_to @object.name, spree.admin_tenants_url %>
3
+ <%= link_to Spree.t('tenants'), spree.admin_tenants_url %> /
4
+ <%= @object.name %>
4
5
  <% end %>
5
6
 
6
7
  <%= render partial: 'tabs', locals: { current: :edit } %>
@@ -40,7 +40,13 @@
40
40
  <tbody>
41
41
  <% @collection.each do |tenant| %>
42
42
  <tr id="<%= spree_dom_id tenant %>" data-hook="admin_tenants_index_rows">
43
- <td><%= tenant.name %></td>
43
+ <td>
44
+ <% if can?(:edit, tenant) %>
45
+ <%= link_to tenant.name, edit_admin_tenant_path(tenant.slug) %>
46
+ <% else %>
47
+ <%= tenant.name %>
48
+ <% end %>
49
+ </td>
44
50
  <td><%= tenant.slug %></td>
45
51
  <td><%= tenant.description %></td>
46
52
  <td><%= tenant.created_at %></td>
@@ -60,4 +60,18 @@
60
60
  <%= f.label :notification_email %>
61
61
  <%= f.email_field :notification_email, class: 'form-control' %>
62
62
  <% end %>
63
+ <%= f.field_container :from_email do %>
64
+ <%= f.label :from_email, Spree.t(:from_email)%>
65
+ <%= f.email_field :from_email, class: 'form-control' %>
66
+ <small class="form-text text-muted">
67
+ This is the email which will be the sender of all your Store emails (Order Confirmation, Shipment notification etc)
68
+ </small>
69
+ <% end %>
70
+ <%= f.field_container :support_email do %>
71
+ <%= f.label :support_email, Spree.t(:support_email) %>
72
+ <%= f.email_field :support_email, class: 'form-control' %>
73
+ <small class="form-text text-muted">
74
+ This email is visible to your Store visitors in the Footer section
75
+ </small>
76
+ <% end %>
63
77
  </div>
@@ -1,22 +1,33 @@
1
1
  <tr>
2
- <td class="email-body" width="570" cellpadding="0" cellspacing="0">
3
- <table class="email-body_inner" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
4
- <!-- Body content -->
2
+ <td class="email-body" width="570" cellpadding="0" cellspacing="0">
3
+ <table class="email-body_inner" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
5
4
  <tbody>
6
- <tr>
7
- <td>
8
- <div class="f-fallback">
9
- <%= render 'spree_cm_commissioner/order_mailer/greeting', order: @order %>
10
- <div class="content">
5
+ <tr>
6
+ <td>
7
+ <% if @order.tenant.nil? %>
8
+ <div class="f-fallback">
9
+ <%= render 'spree_cm_commissioner/order_mailer/greeting', order: @order %>
10
+ <div class="content">
11
11
  <%= render 'spree_cm_commissioner/order_mailer/order_total', order: @order %>
12
12
  <%= render 'spree_cm_commissioner/order_mailer/your_booking', order: @order, show_booking_header: true %>
13
13
  <%= render 'spree_cm_commissioner/order_mailer/customer_info', order: @order %>
14
- <%= render 'spree_cm_commissioner/order_mailer/support_contact'%>
15
- </div>
16
- </div>
17
- </td>
18
- </tr>
14
+ <%= render 'spree_cm_commissioner/order_mailer/support_contact' %>
15
+ </div>
16
+ </div>
17
+ <% else %>
18
+ <div class="f-fallback">
19
+ <%= render 'spree_cm_commissioner/order_mailer/tenant/greeting', order: @order %>
20
+ <div class="content">
21
+ <%= render 'spree_cm_commissioner/order_mailer/order_total', order: @order %>
22
+ <%= render 'spree_cm_commissioner/order_mailer/your_booking', order: @order, show_booking_header: true %>
23
+ <%= render 'spree_cm_commissioner/order_mailer/tenant/customer_info', order: @order %>
24
+ <%= render 'spree_cm_commissioner/order_mailer/tenant/support_contact' %>
25
+ </div>
26
+ </div>
27
+ <% end %>
28
+ </td>
29
+ </tr>
19
30
  </tbody>
20
- </table>
21
- </td>
22
- </tr>
31
+ </table>
32
+ </td>
33
+ </tr>
@@ -23,7 +23,11 @@
23
23
  <table class="email-footer" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
24
24
  <tr>
25
25
  <td>
26
- <%= render 'spree_cm_commissioner/order_mailer/footer', store: @order.store%>
26
+ <% if @order.tenant.nil? %>
27
+ <%= render 'spree_cm_commissioner/order_mailer/footer', store: @order.store %>
28
+ <% else %>
29
+ <%= render 'spree_cm_commissioner/order_mailer/tenant/footer', store: @order.store %>
30
+ <% end %>
27
31
  </td>
28
32
  </tr>
29
33
  </table>
@@ -55,10 +55,10 @@
55
55
  border-radius: 1.5625rem 1.5625rem 0 0;
56
56
  background: #653ed7;
57
57
  background: url(<%= image_path("mailer/event-mailer-bg.png") %>) center center / cover,
58
- linear-gradient(45deg, #653ed7, rgba(0, 0, 255, 0) 70.71%),
59
- linear-gradient(225deg, #653ed7, rgba(0, 0, 255, 0) 70.71%),
60
- linear-gradient(330deg, #35ace0, rgba(0, 0, 255, 0) 70.71%),
61
- linear-gradient(150deg, #35ace0, rgba(0, 0, 255, 0) 70.71%);
58
+ linear-gradient(45deg, #653ed7, rgba(0, 0, 255, 0) 70.71%),
59
+ linear-gradient(225deg, #653ed7, rgba(0, 0, 255, 0) 70.71%),
60
+ linear-gradient(330deg, #35ace0, rgba(0, 0, 255, 0) 70.71%),
61
+ linear-gradient(150deg, #35ace0, rgba(0, 0, 255, 0) 70.71%);
62
62
  }
63
63
  #confirm-email #greeting-card p,
64
64
  #confirm-email #greeting-card .booking-confirmm,
@@ -66,6 +66,24 @@
66
66
  #confirm-email #greeting-card .description {
67
67
  color: #fff;
68
68
  }
69
+
70
+ #confirm-email #greeting-card-1 {
71
+ color: #fff;
72
+ padding: 1.5rem;
73
+ background-size: cover;
74
+ background-position: center;
75
+ background-repeat: no-repeat;
76
+ border-radius: 1.5625rem 1.5625rem 0 0;
77
+ background: #<%= @brand_color %>;
78
+ }
79
+ #confirm-email #greeting-card-1 p,
80
+ #confirm-email #greeting-card-1 .header,
81
+ #confirm-email #greeting-card-1 .booking-confirm,
82
+ #confirm-email #greeting-card-1 .hello,
83
+ #confirm-email #greeting-card-1 .description {
84
+ color: #fff;
85
+ }
86
+
69
87
  #confirm-email .align-right {
70
88
  vertical-align: top;
71
89
  }
@@ -74,6 +92,15 @@
74
92
  margin-top: 1.25rem;
75
93
  margin-bottom: 0.625rem;
76
94
  }
95
+ #confirm-email .icon-hang-meas {
96
+ width: 6.25rem;
97
+ }
98
+ #confirm-email .header {
99
+ display: flex;
100
+ align-items: center;
101
+ justify-content: space-between;
102
+ width: 100%;
103
+ }
77
104
  #confirm-email #greeting-card .hello,
78
105
  .booking-confirm {
79
106
  font-size: 1.375rem;
@@ -83,6 +110,15 @@
83
110
  margin-bottom: 0.25rem;
84
111
  margin-top: 1.25rem;
85
112
  }
113
+ #confirm-email #greeting-card-1 .booking-confirm {
114
+ font-size: 1.375rem;
115
+ font-style: normal;
116
+ font-weight: 700;
117
+ line-height: 1.75rem;
118
+ margin-bottom: 0.25rem;
119
+ margin-top: 1.25rem;
120
+ color: #fff;
121
+ }
86
122
  #confirm-email #greeting-card .booking-confirm {
87
123
  font-size: 1.5rem;
88
124
  padding: 0.625rem 0;
@@ -233,6 +269,7 @@
233
269
  }
234
270
  #confirm-email .notice-info .description {
235
271
  padding-left: 0.75rem;
272
+ color: #939393;
236
273
  }
237
274
  #confirm-email .notice-info a {
238
275
  color: #6444D8;
@@ -0,0 +1,42 @@
1
+ <div class="content-cell">
2
+ <div class="container">
3
+ <h2><%= I18n.t('mail.order_mailer.customer_info') %></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_user.png", class: "mail-icon" %></div>
8
+ <div class="two-columns_text-container">
9
+ <p class="two-columns_title">Name</p>
10
+ <p class="two-columns_description"><%= user_full_name(order) %></p>
11
+ </div>
12
+ </div>
13
+ <div class="flex two-columns-item_detail">
14
+ <div class="two-columns_icon"><%= image_tag "mailer/mail.png", class: "mail-icon" %></div>
15
+ <div class="two-columns_text-container">
16
+ <p class="two-columns_title">Email</p>
17
+ <% if order.email.present? %>
18
+ <p class="two-columns_description"><%= link_to order.email, "mailto:#{order.email}" %></p>
19
+ <% end %>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ <div class="vertical-separater"></div>
24
+ <div class="two-columns-item">
25
+ <div class="flex two-columns-item_detail">
26
+ <div class="two-columns_icon"><%= image_tag "mailer/tenant_phone.png", class: "mail-icon" %></div>
27
+ <div class="two-columns_text-container">
28
+ <p class="two-columns_title">Contact</p>
29
+ <% if order.phone_number.present? || order.intel_phone_number.present? %>
30
+ <p class="two-columns_description">
31
+ <%= link_to(
32
+ order.phone_number || order.intel_phone_number,
33
+ "tel:#{order.phone_number || order.intel_phone_number}") %>
34
+ </p>
35
+ <% end %>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ <hr>
41
+ </div>
42
+ </div>
@@ -0,0 +1,25 @@
1
+ <div class="email-footer_inner">
2
+ <div class="mb-24"><%= store.description%></div>
3
+ <div class="mb-24 f-14"><%= store.address%></div>
4
+ <h2 class="mb-24">Connect with us</h2>
5
+ <table class="mb-24 social_icons">
6
+ <tbody>
7
+ <tr>
8
+ <% if store.facebook? %>
9
+ <td class="social_icon">
10
+ <%= link_to store.facebook, target: :_blank do %>
11
+ <%= image_tag "mailer/facebook.png", class: "mail-icon"%>
12
+ <% end %>
13
+ </td>
14
+ <% end %>
15
+ <% if store.instagram?%>
16
+ <td class="social_icon">
17
+ <%= link_to store.instagram, target: :_blank do %>
18
+ <%= image_tag "mailer/instagram.png", class: "mail-icon"%>
19
+ <% end %>
20
+ </td>
21
+ <% end %>
22
+ </tr>
23
+ </tbody>
24
+ </table>
25
+ </div>
@@ -0,0 +1,19 @@
1
+ <div id="greeting-card-1">
2
+ <div>
3
+ <div class="header">
4
+ <h1><%=@order.store.name %></h1>
5
+ <% if @vendor_logo_url.present? %>
6
+ <img src="<%= @vendor_logo_url %>" alt="Vendor Logo" class="icon-hang-meas">
7
+ <% end %>
8
+ </div>
9
+ <div class="booking-confirm">
10
+ <%= I18n.t('mail.order_mailer.booking_confirm') %>
11
+ </div>
12
+ <div class="hello">
13
+ <%= I18n.t('mail.order_mailer.hello', full_name: user_full_name(order)) %>
14
+ </div>
15
+ <div class="description">
16
+ <%= I18n.t('mail.order_mailer.booking_event', order_number: @order.number || 'NA') %>
17
+ </div>
18
+ </div>
19
+ </div>
@@ -0,0 +1,33 @@
1
+ <div class="content-cell">
2
+ <div class="container">
3
+ <h2><%= I18n.t('mail.order_mailer.bookmeplus_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 current_store.contact_phone.present? %>
11
+ <p class="two-columns_description">
12
+ <%= link_to current_store.contact_phone, "tel:#{current_store.contact_phone}" %>
13
+ </p>
14
+ <% end %>
15
+ </div>
16
+ </div>
17
+ </div>
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
+ <p class="two-columns_description">
25
+ <%= @vendor&.support_email.present? ? link_to(@vendor.support_email, "mailto:#{@vendor.support_email}") : "N/A" %>
26
+ </p>
27
+
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </div>
@@ -54,7 +54,11 @@ en:
54
54
  guest_card_classes:
55
55
  empty_info: "No guest card classes information available."
56
56
  background_image: "Background Image"
57
-
57
+ guest_dynamic_field:
58
+ errors:
59
+ pre_registration_required: "is required before ticket issuance"
60
+ post_registration_required: "must be completed after purchase"
61
+ during_check_in_required: "is required during check-in"
58
62
  google_wallet:
59
63
  note: "Click <b>Create</b> or <b> Update</b> to connect to Google Wallet after filled all information "
60
64
  google_wallet_class_created: "Google Wallet class created successfully."
data/config/routes.rb CHANGED
@@ -644,6 +644,7 @@ Spree::Core::Engine.add_routes do
644
644
  resources :taxons, only: %i[show] do
645
645
  resource :event_ticket_aggregators, only: %i[show]
646
646
  resource :pie_chart_event_aggregators, only: %i[show]
647
+ resources :pie_chart_events, only: %i[index show]
647
648
  end
648
649
  end
649
650
  end
@@ -0,0 +1,6 @@
1
+ class AddEmailFieldsToSpreeVendors < ActiveRecord::Migration[7.0]
2
+ def change
3
+ add_column :spree_vendors, :from_email, :string, if_not_exists: true
4
+ add_column :spree_vendors, :support_email, :string, if_not_exists: true
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ class AddDataFillStageToDynamicFields < ActiveRecord::Migration[7.0]
2
+ def change
3
+ add_column :cm_dynamic_fields, :data_fill_stage, :integer, default: 0, null: false, if_not_exists: true
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  module SpreeCmCommissioner
2
- VERSION = '1.21.0'.freeze
2
+ VERSION = '2.0.0-pre1'.freeze
3
3
 
4
4
  module_function
5
5