spree_cm_commissioner 1.17.0.pre.pre4 → 1.17.0.pre.pre5
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/.env.example +3 -0
- data/Gemfile.lock +1 -1
- data/app/assets/javascripts/spree_cm_commissioner/backend.js +0 -1
- data/app/assets/stylesheets/spree_cm_commissioner/backend/commissioner_admin.css.scss +0 -1
- data/app/controllers/spree/admin/tenants_controller.rb +0 -8
- data/app/interactors/spree_cm_commissioner/vattanac_bank_initiator.rb +5 -1
- data/app/models/concerns/spree_cm_commissioner/event_check_in_flowable.rb +30 -0
- data/app/models/concerns/spree_cm_commissioner/tenant_preference.rb +0 -4
- data/app/models/spree_cm_commissioner/invite_team.rb +1 -1
- data/app/models/spree_cm_commissioner/taxon_decorator.rb +1 -0
- data/app/models/spree_cm_commissioner/vendor_place.rb +1 -1
- data/app/overrides/spree/admin/taxons/_form/check_in_flows.html.erb.deface +18 -0
- data/app/queries/spree_cm_commissioner/guest_searcher_query.rb +45 -3
- data/app/serializers/spree_cm_commissioner/v2/operator/dashboard_crew_event_serializer.rb +4 -1
- data/app/views/spree/admin/tenants/_form.html.erb +42 -117
- data/config/initializers/spree_permitted_attributes.rb +2 -0
- data/config/locales/en.yml +4 -0
- data/db/migrate/20250616084219_add_description_to_cm_vendor_place.rb +5 -0
- data/lib/spree_cm_commissioner/version.rb +1 -1
- metadata +5 -8
- data/app/assets/images/cm-hangmeas-checkout_image.svg +0 -63
- data/app/assets/images/cm-hangmeas-failed.svg +0 -56
- data/app/assets/images/cm-hangmeas-loader.svg +0 -50
- data/app/assets/images/cm-hangmeas-success.svg +0 -51
- data/app/assets/javascripts/spree_cm_commissioner/tenant_payment_icon_fields.js +0 -87
- data/app/assets/stylesheets/spree_cm_commissioner/backend/tenant_payment_icon_fields.scss +0 -47
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f6f4154db94f9e09e6e794abe55a03e92db3a0ccde12796251aeb8976d7d45f7
|
|
4
|
+
data.tar.gz: 8289c711a64719b71201051347afadc2b1d97828a231ca49c05068d174dd2488
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e6795f1cc9679b85d5813d3b1fe1bec813ac8fdf8b82a963278df3a3dd681365e8d28007f935d2fdbd5c38ec8679e05d63430019992655fc4088e75d7328472
|
|
7
|
+
data.tar.gz: 50c89c06021e167b0278abfab0569099e7d42caffdbfe158ad672b45d4463d855e742eb90db023752cfc58a4b99d1f1385e73470017204ba57f46e80add08062
|
data/.env.example
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
module Spree
|
|
2
2
|
module Admin
|
|
3
3
|
class TenantsController < Spree::Admin::ResourceController
|
|
4
|
-
before_action :load_vector_icons, only: %i[new edit]
|
|
5
|
-
|
|
6
4
|
# override
|
|
7
5
|
def collection
|
|
8
6
|
params[:q] = {} if params[:q].blank?
|
|
@@ -33,12 +31,6 @@ module Spree
|
|
|
33
31
|
def collection_url(options = {})
|
|
34
32
|
admin_tenants_url(options)
|
|
35
33
|
end
|
|
36
|
-
|
|
37
|
-
private
|
|
38
|
-
|
|
39
|
-
def load_vector_icons
|
|
40
|
-
@vector_icons = SpreeCmCommissioner::VectorIcon.all
|
|
41
|
-
end
|
|
42
34
|
end
|
|
43
35
|
end
|
|
44
36
|
end
|
|
@@ -93,6 +93,10 @@ module SpreeCmCommissioner
|
|
|
93
93
|
context.fail!(message: "User creation failed: #{context.user.errors.full_messages.join(', ')}")
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
+
def disable_services
|
|
97
|
+
'bus,ferry'
|
|
98
|
+
end
|
|
99
|
+
|
|
96
100
|
def construct_data
|
|
97
101
|
user = context.user
|
|
98
102
|
|
|
@@ -101,7 +105,7 @@ module SpreeCmCommissioner
|
|
|
101
105
|
name: user.full_name,
|
|
102
106
|
phone: user.phone_number,
|
|
103
107
|
email: user.email,
|
|
104
|
-
webUrl: "#{Spree::Store.default.formatted_url}/vattanac_bank_web_app?session_id=#{session_id}"
|
|
108
|
+
webUrl: "#{Spree::Store.default.formatted_url}/vattanac_bank_web_app?session_id=#{session_id}&ds=#{CGI.escape(disable_services)}"
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
json_data = raw_data.to_json
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module SpreeCmCommissioner
|
|
2
|
+
module EventCheckInFlowable
|
|
3
|
+
extend ActiveSupport::Concern
|
|
4
|
+
|
|
5
|
+
included do
|
|
6
|
+
preference :group_check_in_enabled, :boolean, default: true
|
|
7
|
+
preference :individual_check_in_enabled, :boolean, default: true
|
|
8
|
+
|
|
9
|
+
before_validation :validate_at_least_one_check_in_flow_presence
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def check_in_flows
|
|
13
|
+
flows = []
|
|
14
|
+
flows << 'group' if group_check_in_enabled?
|
|
15
|
+
flows << 'individual' if individual_check_in_enabled?
|
|
16
|
+
flows
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def group_check_in_enabled? = preferred_group_check_in_enabled
|
|
20
|
+
def individual_check_in_enabled? = preferred_individual_check_in_enabled
|
|
21
|
+
|
|
22
|
+
private
|
|
23
|
+
|
|
24
|
+
def validate_at_least_one_check_in_flow_presence
|
|
25
|
+
return if check_in_flows.any?
|
|
26
|
+
|
|
27
|
+
errors.add(:check_in_flows, 'must have at least one flow selected')
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -5,10 +5,6 @@ module SpreeCmCommissioner
|
|
|
5
5
|
included do
|
|
6
6
|
preference :assetlinks, :string, default: ''
|
|
7
7
|
preference :apple_app_site_association, :string, default: ''
|
|
8
|
-
preference :payment_checkout_image, :string, default: ''
|
|
9
|
-
preference :payment_failed_image, :string, default: ''
|
|
10
|
-
preference :payment_success_image, :string, default: ''
|
|
11
|
-
preference :payment_loader, :string, default: ''
|
|
12
8
|
end
|
|
13
9
|
end
|
|
14
10
|
end
|
|
@@ -4,6 +4,7 @@ module SpreeCmCommissioner
|
|
|
4
4
|
base.include SpreeCmCommissioner::TaxonKind
|
|
5
5
|
base.include SpreeCmCommissioner::Transit::TaxonBitwise
|
|
6
6
|
base.include SpreeCmCommissioner::ParticipationTypeBitwise
|
|
7
|
+
base.include SpreeCmCommissioner::EventCheckInFlowable
|
|
7
8
|
|
|
8
9
|
base.preference :background_color, :string
|
|
9
10
|
base.preference :foreground_color, :string
|
|
@@ -7,7 +7,7 @@ module SpreeCmCommissioner
|
|
|
7
7
|
belongs_to :place, class_name: 'SpreeCmCommissioner::Place', optional: false
|
|
8
8
|
|
|
9
9
|
validates :place_type, presence: true
|
|
10
|
-
validates :
|
|
10
|
+
validates :place_id, uniqueness: { scope: %i[vendor_id place_type] }
|
|
11
11
|
|
|
12
12
|
accepts_nested_attributes_for :place, allow_destroy: true
|
|
13
13
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- insert_before "erb[loud]:contains('field_container :hide_from_nav')" -->
|
|
2
|
+
|
|
3
|
+
<%# Sections don't use video banner, so we hide the form here to avoid confusing admin. %>
|
|
4
|
+
|
|
5
|
+
<%= f.field_container :preferred_group_check_in_enabled, class: ['custom-control', 'custom-checkbox', 'my-4'] do %>
|
|
6
|
+
<%= f.check_box :preferred_group_check_in_enabled, class: 'custom-control-input' %>
|
|
7
|
+
<%= f.label :preferred_group_check_in_enabled, Spree.t(:enable_group_check_in), class: 'custom-control-label' %>
|
|
8
|
+
<%= f.error_message_on :preferred_group_check_in_enabled %>
|
|
9
|
+
<small class="form-text text-muted">
|
|
10
|
+
Enabled by default for most events where users can purchase multiple tickets or use group scanning. For large events (like PSK, ASK, etc.) or invitation-based events, you should disable this to ensure each ticket or invitation is scanned individually.
|
|
11
|
+
</small>
|
|
12
|
+
<% end if @taxon.event? && @taxon.depth == 1 %> %>
|
|
13
|
+
|
|
14
|
+
<%= f.field_container :preferred_individual_check_in_enabled, class: ['custom-control', 'custom-checkbox', 'my-4'] do %>
|
|
15
|
+
<%= f.check_box :preferred_individual_check_in_enabled, class: 'custom-control-input' %>
|
|
16
|
+
<%= f.label :preferred_individual_check_in_enabled, Spree.t(:enable_individual_check_in), class: 'custom-control-label' %>
|
|
17
|
+
<%= f.error_message_on :preferred_individual_check_in_enabled %>
|
|
18
|
+
<% end if @taxon.event? && @taxon.depth == 1 %> %>
|
|
@@ -8,20 +8,36 @@ module SpreeCmCommissioner
|
|
|
8
8
|
|
|
9
9
|
def event_id = params[:event_id]
|
|
10
10
|
|
|
11
|
-
def call
|
|
11
|
+
def call # rubocop:disable Metrics/PerceivedComplexity
|
|
12
12
|
return SpreeCmCommissioner::Guest.none if event_id.blank?
|
|
13
13
|
|
|
14
|
-
if params[:qr_data].present?
|
|
14
|
+
if params[:qr_data].present? && order_qr_data?
|
|
15
|
+
search_by_order_qr
|
|
16
|
+
elsif params[:qr_data].present? && line_item_qr_data?
|
|
17
|
+
search_by_line_item_qr
|
|
18
|
+
elsif params[:qr_data].present? && guest_qr_data?
|
|
15
19
|
search_by_guest_qr
|
|
16
20
|
elsif params[:term].present?
|
|
17
21
|
search_by_term
|
|
22
|
+
elsif params[:ids].present?
|
|
23
|
+
SpreeCmCommissioner::Guest.complete_or_canceled.where(event_id: event_id, id: params[:ids])
|
|
18
24
|
else
|
|
19
|
-
SpreeCmCommissioner::Guest.
|
|
25
|
+
SpreeCmCommissioner::Guest.complete_or_canceled.where(event_id: event_id)
|
|
20
26
|
end
|
|
21
27
|
end
|
|
22
28
|
|
|
23
29
|
private
|
|
24
30
|
|
|
31
|
+
def search_by_order_qr
|
|
32
|
+
order = Spree::Order.complete_or_canceled.search_by_qr_data!(params[:qr_data])
|
|
33
|
+
order.guests.where(event_id: event_id)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def search_by_line_item_qr
|
|
37
|
+
line_item = Spree::LineItem.complete_or_canceled.search_by_qr_data!(params[:qr_data])
|
|
38
|
+
line_item.guests.where(event_id: event_id)
|
|
39
|
+
end
|
|
40
|
+
|
|
25
41
|
def search_by_guest_qr
|
|
26
42
|
SpreeCmCommissioner::Guest.complete_or_canceled.where(
|
|
27
43
|
token: params[:qr_data],
|
|
@@ -29,6 +45,32 @@ module SpreeCmCommissioner
|
|
|
29
45
|
)
|
|
30
46
|
end
|
|
31
47
|
|
|
48
|
+
def order_qr_data?
|
|
49
|
+
matches = construct_matches
|
|
50
|
+
matches&.size == 2
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def line_item_qr_data?
|
|
54
|
+
matches = construct_matches
|
|
55
|
+
matches&.size == 3
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def guest_qr_data?
|
|
59
|
+
matches = construct_matches
|
|
60
|
+
matches.nil?
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def construct_matches
|
|
64
|
+
qr_data = params[:qr_data]
|
|
65
|
+
return nil unless qr_data
|
|
66
|
+
|
|
67
|
+
if qr_data =~ /-L\d+$/
|
|
68
|
+
qr_data.match(/(R\d+)-([A-Za-z0-9_\-]+)-(L\d+)/)&.captures
|
|
69
|
+
else
|
|
70
|
+
qr_data.match(/(R\d+)-([A-Za-z0-9_\-]+)/)&.captures
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
32
74
|
def search_by_term
|
|
33
75
|
terms = params[:term].split.map { |term| "%#{term.downcase}%" }
|
|
34
76
|
|
|
@@ -2,7 +2,10 @@ module SpreeCmCommissioner
|
|
|
2
2
|
module V2
|
|
3
3
|
module Operator
|
|
4
4
|
class DashboardCrewEventSerializer < BaseSerializer
|
|
5
|
-
attributes :id, :name, :permalink,
|
|
5
|
+
attributes :id, :name, :permalink,
|
|
6
|
+
:from_date, :to_date,
|
|
7
|
+
:check_in_flows,
|
|
8
|
+
:updated_at
|
|
6
9
|
|
|
7
10
|
has_many :children_classifications, serializer: :classification
|
|
8
11
|
has_one :category_icon, serializer: SpreeCmCommissioner::V2::Storefront::AssetSerializer
|
|
@@ -3,21 +3,17 @@
|
|
|
3
3
|
<div class="col-6">
|
|
4
4
|
<%= f.field_container :name do %>
|
|
5
5
|
<%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>
|
|
6
|
-
<%= f.text_field :name, required: true, class: 'form-control', placeholder: 'eg. bookme plus'
|
|
7
|
-
|
|
8
|
-
<div class="error text-danger"><%= f.object.errors[:name].join(', ') %></div>
|
|
9
|
-
<% end %>
|
|
6
|
+
<%= f.text_field :name, required: true, class: 'form-control', placeholder: 'eg. bookme plus'%>
|
|
7
|
+
<%= f.error_message_on :name %>
|
|
10
8
|
<% end %>
|
|
11
9
|
</div>
|
|
12
10
|
|
|
13
|
-
<!-- Slug Field -->
|
|
11
|
+
<!-- Slug Field (only show if editing) -->
|
|
14
12
|
<div class="col-6">
|
|
15
13
|
<%= f.field_container :slug do %>
|
|
16
14
|
<%= f.label :slug, raw(Spree.t(:slug)) %>
|
|
17
15
|
<%= f.text_field :slug, class: 'form-control', placeholder: 'slug' %>
|
|
18
|
-
|
|
19
|
-
<div class="error text-danger"><%= f.object.errors[:slug].join(', ') %></div>
|
|
20
|
-
<% end %>
|
|
16
|
+
<%= f.error_message_on :slug %>
|
|
21
17
|
<% end %>
|
|
22
18
|
</div>
|
|
23
19
|
|
|
@@ -26,20 +22,16 @@
|
|
|
26
22
|
<%= f.field_container :description do %>
|
|
27
23
|
<%= f.label :description, raw(Spree.t(:description)) %>
|
|
28
24
|
<%= f.text_area :description, class: 'form-control', placeholder: 'description' %>
|
|
29
|
-
|
|
30
|
-
<div class="error text-danger"><%= f.object.errors[:description].join(', ') %></div>
|
|
31
|
-
<% end %>
|
|
25
|
+
<%= f.error_message_on :description %>
|
|
32
26
|
<% end %>
|
|
33
27
|
</div>
|
|
34
28
|
|
|
35
|
-
|
|
29
|
+
<!-- Host Field -->
|
|
36
30
|
<div class="col-12">
|
|
37
31
|
<%= f.field_container :host do %>
|
|
38
32
|
<%= f.label :host, raw(Spree.t(:host) + required_span_tag) %>
|
|
39
33
|
<%= f.text_field :host, required: true, class: 'form-control', placeholder: 'host' %>
|
|
40
|
-
|
|
41
|
-
<div class="error text-danger"><%= f.object.errors[:host].join(', ') %></div>
|
|
42
|
-
<% end %>
|
|
34
|
+
<%= f.error_message_on :host %>
|
|
43
35
|
<% end %>
|
|
44
36
|
</div>
|
|
45
37
|
|
|
@@ -47,25 +39,21 @@
|
|
|
47
39
|
<div class="col-12">
|
|
48
40
|
<%= f.field_container :preferred_assetlinks do %>
|
|
49
41
|
<%= f.label :preferred_assetlinks, raw(Spree.t(:assetlinks)) %>
|
|
50
|
-
<%= f.text_area :preferred_assetlinks, class: 'form-control',
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
<%= f.text_area :preferred_assetlinks, class: 'form-control',
|
|
43
|
+
placeholder: 'example:
|
|
44
|
+
[
|
|
45
|
+
{
|
|
46
|
+
"relation": ["delegate_permission/common.handle_all_urls"],
|
|
47
|
+
"target": {
|
|
48
|
+
"namespace": "android_app",
|
|
49
|
+
"package_name": "com.yourapp.app",
|
|
50
|
+
"sha256_cert_fingerprints": [
|
|
51
|
+
"SHA256_CERTIFICATE_FINGERPRINT_HERE"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
61
54
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
JSON
|
|
65
|
-
%>
|
|
66
|
-
<% if f.object.errors[:preferred_assetlinks].any? %>
|
|
67
|
-
<div class="error text-danger"><%= f.object.errors[:preferred_assetlinks].join(', ') %></div>
|
|
68
|
-
<% end %>
|
|
55
|
+
]', rows: 5 %>
|
|
56
|
+
<%= f.error_message_on :preferred_assetlinks %>
|
|
69
57
|
<% end %>
|
|
70
58
|
</div>
|
|
71
59
|
|
|
@@ -73,29 +61,25 @@
|
|
|
73
61
|
<div class="col-12">
|
|
74
62
|
<%= f.field_container :preferred_apple_app_site_association do %>
|
|
75
63
|
<%= f.label :preferred_apple_app_site_association, raw(Spree.t(:apple_app_site_association)) %>
|
|
76
|
-
<%= f.text_area :preferred_apple_app_site_association, class: 'form-control',
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
%>
|
|
96
|
-
<% if f.object.errors[:preferred_apple_app_site_association].any? %>
|
|
97
|
-
<div class="error text-danger"><%= f.object.errors[:preferred_apple_app_site_association].join(', ') %></div>
|
|
98
|
-
<% end %>
|
|
64
|
+
<%= f.text_area :preferred_apple_app_site_association, class: 'form-control',
|
|
65
|
+
placeholder: 'example:
|
|
66
|
+
{
|
|
67
|
+
"webcredentials": {
|
|
68
|
+
"apps": [
|
|
69
|
+
"TEAM_ID.com.yourapp.app"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"applinks": {
|
|
73
|
+
"apps": [],
|
|
74
|
+
"details": [
|
|
75
|
+
{
|
|
76
|
+
"appID": "TEAM_ID.com.yourapp.app",
|
|
77
|
+
"paths": ["*"]
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}', rows: 5 %>
|
|
82
|
+
<%= f.error_message_on :preferred_apple_app_site_association %>
|
|
99
83
|
<% end %>
|
|
100
84
|
</div>
|
|
101
85
|
|
|
@@ -103,67 +87,8 @@
|
|
|
103
87
|
<div class="col-6">
|
|
104
88
|
<%= f.field_container :state do %>
|
|
105
89
|
<%= f.label :state, raw(Spree.t(:state)) %>
|
|
106
|
-
<%= f.select :state,
|
|
107
|
-
|
|
108
|
-
{ required: true },
|
|
109
|
-
class: 'select2 form-control' %>
|
|
110
|
-
<% if f.object.errors[:state].any? %>
|
|
111
|
-
<div class="error text-danger"><%= f.object.errors[:state].join(', ') %></div>
|
|
112
|
-
<% end %>
|
|
90
|
+
<%= f.select :state, options_for_select([['Enabled', 'enabled'], ['Disabled', 'disabled']], @object.state), { required: true }, class: 'select2 form-control' %>
|
|
91
|
+
<%= f.error_message_on :state %>
|
|
113
92
|
<% end %>
|
|
114
93
|
</div>
|
|
115
94
|
</div>
|
|
116
|
-
|
|
117
|
-
<div data-hook="admin_tenant_form_fields" class="row">
|
|
118
|
-
<% [
|
|
119
|
-
{ field: :preferred_payment_checkout_image, label: :payment_checkout_image },
|
|
120
|
-
{ field: :preferred_payment_failed_image, label: :payment_failed_image },
|
|
121
|
-
{ field: :preferred_payment_success_image, label: :payment_success_image },
|
|
122
|
-
{ field: :preferred_payment_loader, label: :payment_loader }
|
|
123
|
-
].each do |config| %>
|
|
124
|
-
<div class="col-6">
|
|
125
|
-
<div class="card mb-3">
|
|
126
|
-
<div class="card-body text-center">
|
|
127
|
-
<%= f.field_container config[:field] do %>
|
|
128
|
-
<%= f.label config[:field], raw(Spree.t(config[:label])), class: 'font-weight-bold' %>
|
|
129
|
-
|
|
130
|
-
<div class="mb-2">
|
|
131
|
-
<div class="icon-preview-container">
|
|
132
|
-
<% value = f.object.send(config[:field]) %>
|
|
133
|
-
<% if value.present? %>
|
|
134
|
-
<%= image_tag asset_path(value), alt: "#{Spree.t(config[:label])}", class: 'img-thumbnail bg-light border payment-icon-preview', id: "preview_#{config[:field]}" %>
|
|
135
|
-
<% end %>
|
|
136
|
-
<button
|
|
137
|
-
type="button"
|
|
138
|
-
class="remove-icon-btn <%= 'hidden' unless value.present? %>"
|
|
139
|
-
id="remove_<%= config[:field] %>"
|
|
140
|
-
title="Remove icon"
|
|
141
|
-
onclick="removeIcon('<%= config[:field] %>')"
|
|
142
|
-
>
|
|
143
|
-
×
|
|
144
|
-
</button>
|
|
145
|
-
</div>
|
|
146
|
-
</div>
|
|
147
|
-
|
|
148
|
-
<%= f.select config[:field],
|
|
149
|
-
options_for_select(
|
|
150
|
-
@vector_icons&.map { |icon| [icon.path, icon.path] },
|
|
151
|
-
f.object.send(config[:field])
|
|
152
|
-
),
|
|
153
|
-
{ include_blank: 'None' },
|
|
154
|
-
class: 'form-control select2-icon-picker',
|
|
155
|
-
data: {
|
|
156
|
-
target_field: config[:field],
|
|
157
|
-
target_preview: "preview_#{config[:field]}",
|
|
158
|
-
remove_btn: "remove_#{config[:field]}"
|
|
159
|
-
} %>
|
|
160
|
-
|
|
161
|
-
<% if f.object.errors[config[:field]].any? %>
|
|
162
|
-
<div class="error text-danger"><%= f.object.errors[config[:field]].join(', ') %></div>
|
|
163
|
-
<% end %>
|
|
164
|
-
<% end %>
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
<% end %>
|
|
169
|
-
</div>
|
data/config/locales/en.yml
CHANGED
|
@@ -459,6 +459,10 @@ en:
|
|
|
459
459
|
businesses_cant_be_blank: "Businesses can't be blank"
|
|
460
460
|
phone_number_cant_be_blank: "Phone number can't be blank"
|
|
461
461
|
quantity_cant_be_less_than_or_equal_to_zero: "Quantity can't be less or equal than 0"
|
|
462
|
+
spree_cm_commissioner/vendor_place:
|
|
463
|
+
attributes:
|
|
464
|
+
place_id:
|
|
465
|
+
taken: "has already existed with this place type"
|
|
462
466
|
|
|
463
467
|
mail:
|
|
464
468
|
order_mailer:
|
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.17.0.pre.
|
|
4
|
+
version: 1.17.0.pre.pre5
|
|
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-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: spree
|
|
@@ -600,10 +600,6 @@ files:
|
|
|
600
600
|
- app/assets/images/cm-fitness-room-icon.svg
|
|
601
601
|
- app/assets/images/cm-front-desk-icon.svg
|
|
602
602
|
- app/assets/images/cm-hair-dryer-icon.svg
|
|
603
|
-
- app/assets/images/cm-hangmeas-checkout_image.svg
|
|
604
|
-
- app/assets/images/cm-hangmeas-failed.svg
|
|
605
|
-
- app/assets/images/cm-hangmeas-loader.svg
|
|
606
|
-
- app/assets/images/cm-hangmeas-success.svg
|
|
607
603
|
- app/assets/images/cm-hiking-icon.svg
|
|
608
604
|
- app/assets/images/cm-iron-icon.svg
|
|
609
605
|
- app/assets/images/cm-lcd-tv-icon.svg
|
|
@@ -709,7 +705,6 @@ files:
|
|
|
709
705
|
- app/assets/javascripts/spree_cm_commissioner/selected_field_filter_origin_destination.js
|
|
710
706
|
- app/assets/javascripts/spree_cm_commissioner/telegram.js
|
|
711
707
|
- app/assets/javascripts/spree_cm_commissioner/telegram/order_confirmation.js
|
|
712
|
-
- app/assets/javascripts/spree_cm_commissioner/tenant_payment_icon_fields.js
|
|
713
708
|
- app/assets/javascripts/spree_cm_commissioner/trip_stop_selection.js
|
|
714
709
|
- app/assets/javascripts/spree_cm_commissioner/update_popup_confirmation.js
|
|
715
710
|
- app/assets/javascripts/spree_cm_commissioner/vehicle_seat.js
|
|
@@ -719,7 +714,6 @@ files:
|
|
|
719
714
|
- app/assets/stylesheets/spree_cm_commissioner/backend/guest_qr_code.scss
|
|
720
715
|
- app/assets/stylesheets/spree_cm_commissioner/backend/invoice.scss
|
|
721
716
|
- app/assets/stylesheets/spree_cm_commissioner/backend/service_calendar.scss
|
|
722
|
-
- app/assets/stylesheets/spree_cm_commissioner/backend/tenant_payment_icon_fields.scss
|
|
723
717
|
- app/assets/stylesheets/spree_cm_commissioner/backend/vehicle_seat.scss
|
|
724
718
|
- app/assets/stylesheets/spree_cm_commissioner/telegram.css
|
|
725
719
|
- app/assets/stylesheets/spree_cm_commissioner/telegram/telegram_bot.css.scss
|
|
@@ -1185,6 +1179,7 @@ files:
|
|
|
1185
1179
|
- app/mailers/spree_cm_commissioner/pin_code_mailer.rb
|
|
1186
1180
|
- app/mailers/spree_cm_commissioner/team_invite_mailer.rb
|
|
1187
1181
|
- app/models/.gitkeep
|
|
1182
|
+
- app/models/concerns/spree_cm_commissioner/event_check_in_flowable.rb
|
|
1188
1183
|
- app/models/concerns/spree_cm_commissioner/homepage_section_bitwise.rb
|
|
1189
1184
|
- app/models/concerns/spree_cm_commissioner/json_preference_validator.rb
|
|
1190
1185
|
- app/models/concerns/spree_cm_commissioner/kyc_bitwise.rb
|
|
@@ -1490,6 +1485,7 @@ files:
|
|
|
1490
1485
|
- app/overrides/spree/admin/taxons/_form/assets_form.html.erb.deface
|
|
1491
1486
|
- app/overrides/spree/admin/taxons/_form/available_on.html.erb.deface
|
|
1492
1487
|
- app/overrides/spree/admin/taxons/_form/background_color_and_foreground_color.html.erb.deface
|
|
1488
|
+
- app/overrides/spree/admin/taxons/_form/check_in_flows.html.erb.deface
|
|
1493
1489
|
- app/overrides/spree/admin/taxons/_form/custom_redirect_url.html.erb.deface
|
|
1494
1490
|
- app/overrides/spree/admin/taxons/_form/hide_video_banner.html.erb.deface
|
|
1495
1491
|
- app/overrides/spree/admin/taxons/_form/kind_html.erb.deface
|
|
@@ -2514,6 +2510,7 @@ files:
|
|
|
2514
2510
|
- db/migrate/20250610080108_add_contact_to_cm_guests.rb
|
|
2515
2511
|
- db/migrate/20250611023548_add_country_code_to_guests.rb
|
|
2516
2512
|
- db/migrate/20250612035937_add_intel_phone_number_to_guests.rb
|
|
2513
|
+
- db/migrate/20250616084219_add_description_to_cm_vendor_place.rb
|
|
2517
2514
|
- docker-compose.yml
|
|
2518
2515
|
- docs/option_types/attr_types.md
|
|
2519
2516
|
- docs/private_key.pem
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg id="payment_proccessing" data-name="payment proccessing" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 334 200">
|
|
3
|
-
<defs>
|
|
4
|
-
<clipPath id="clippath">
|
|
5
|
-
<path d="m332.72,16.62v166.75c0,8.27-6.28,15.08-14.33,15.92-.55.05-1.11.08-1.67.08H16c-.48,0-.96-.02-1.43-.06-8.17-.73-14.57-7.59-14.57-15.94V16.62C0,7.78,7.16.62,16,.62h300.72c8.84,0,16,7.16,16,16Z" style="fill: none;"/>
|
|
6
|
-
</clipPath>
|
|
7
|
-
</defs>
|
|
8
|
-
<g style="clip-path: url(#clippath);">
|
|
9
|
-
<path d="m332.72,16.62v166.75c0,8.27-6.28,15.08-14.33,15.92-.55.05-1.11.08-1.67.08H16c-.48,0-.96-.02-1.43-.06-8.17-.73-14.57-7.59-14.57-15.94V16.62C0,7.78,7.16.62,16,.62h300.72c8.84,0,16,7.16,16,16Z" style="fill: #130d07;"/>
|
|
10
|
-
<path d="m160.11,89.69c1.41-5.81-3.61-9.74-10.21-9.27-6.6.47-26.31,10.68-28.51,12.26-2.2,1.57-29.54,6.6-34.25,3.77-4.71-2.83-12.46-7.49-12.46-7.49,0,0-23.81-23.81-40.47,2.86-16.67,26.66-13.99,61.42-13.99,61.42l-24.1,29.05s-10.95,10,3.81,19.05,22.11,18.14,31.15,21.3c9.04,3.16,14.46-7,14.46-7.68,0-.68,19.43-30.27,19.43-30.27,10.27-.69,20.53-1.41,30.79-2.17,10.81-.8,24.65.44,31.99-9.08,3.2-4.15,1.59-8.37-.02-12.85.06.18,3.68-1,4-1.13,1.81-.72,3.12-1.91,3.94-3.7,1.55-3.36,2.03-8.12.07-11.41-2.91-4.88-3.85-5.31-3.85-5.31.93.42,4.7-2.76,5.32-3.27,2.69-2.21,4.81-5.03,5.27-8.57,1.31-10.16-10.01-17.26-18.56-19.27,5.59,1.31,10.8,2.15,16.21-.39,3.01-1.41,5.69-3.43,8.35-5.44,4.02-3.03,10.38-7.18,11.65-12.41" style="fill: #e89875;"/>
|
|
11
|
-
<path d="m138.73,45.68c-1.83-.91-5.84-1.99-7.86-2.27-3.17-.44-12.78-.68-12.78-.68l-1.24,3.76-31.45-1.3c-4.73-.2-8.98,2.88-10.27,7.44l-27.87,101.59c-1.74,6.14,2.5,12.35,8.85,12.97l49.44,1.78c4.98.49,9.59-2.69,10.89-7.53l27.25-101.35c.17-.64.26-1.28.31-1.92,0-.02.01-.05.02-.07,1.59-7.52-1.35-10.47-5.29-12.43Z" style="fill: #302b31;"/>
|
|
12
|
-
<path d="m51.51,163.26l49.44,1.78c4.98.49,9.59-2.69,10.89-7.53l27.25-101.35c1.7-6.33-2.91-12.61-9.46-12.88l-48.82-2.02c-4.73-.2-8.98,2.88-10.27,7.44l-27.87,101.59c-1.74,6.14,2.5,12.35,8.85,12.97Z" style="fill: #212028;"/>
|
|
13
|
-
<path d="m108.45,126.85c-1.64.07-3.43-.23-5.08-.3-4.13-.18-8.26-.36-12.39-.54l-22.43-.98-.81-.04c-2.87-.41-4.61-1.99-3.7-4.96l.84-3.54c.55-2.49,2.89-4.15,5.42-3.86,13.54.41,27.15.41,40.66,1.23,2,.12,4.17.45,4.34,2.96.15,2.13-1.09,4.94-1.91,6.87-1.02,2.41-2.87,3.07-4.95,3.16Z" style="fill: #f59b1d;"/>
|
|
14
|
-
<path d="m117.78,96.1l-48.7-1.94c-2.03-.08-3.25-1.77-2.74-3.76l8.36-32.34c.52-2,2.58-3.55,4.61-3.47l48.7,1.94c2.03.08,3.25,1.77,2.74,3.76l-8.36,32.34c-.52,2-2.58,3.55-4.61,3.47Z" style="fill: #fffaf8;"/>
|
|
15
|
-
<path d="m85.83,77.72l-8.87-.35c-.88-.04-1.41-.77-1.19-1.63l1.23-4.78c.22-.87,1.12-1.54,2-1.51l8.87.35c.88.04,1.41.77,1.19,1.63l-1.23,4.78c-.22.87-1.12,1.54-2,1.51Z" style="fill: #d6d6d6;"/>
|
|
16
|
-
<path d="m124.55,64.16l-9.8-.39c-.62-.02-1-.54-.84-1.15l.45-1.74c.16-.61.79-1.09,1.41-1.06l9.8.39c.62.02,1,.54.84,1.15l-.45,1.74c-.16.61-.79,1.09-1.41,1.06Z" style="fill: #d6d6d6;"/>
|
|
17
|
-
<path d="m84.05,81.98l-8.95-.36c-.47-.02-.75-.41-.63-.87l.22-.86c.12-.46.59-.82,1.06-.8l8.95.36c.47.02.75.41.63.87l-.22.86c-.12.46-.59.82-1.06.8Z" style="fill: #d6d6d6;"/>
|
|
18
|
-
<path d="m99.83,91.71l-27.44-1.09c-.25-.01-.41-.22-.34-.47l.42-1.62c.06-.25.32-.44.57-.43l27.44,1.09c.25.01.41.22.34.47l-.42,1.62c-.06.25-.32.44-.57.43Z" style="fill: #d6d6d6;"/>
|
|
19
|
-
<path d="m95.54,82.43l-8.95-.36c-.47-.02-.75-.41-.63-.87l.22-.86c.12-.46.59-.82,1.06-.8l8.95.36c.47.02.75.41.63.87l-.22.86c-.12.46-.59.82-1.06.8Z" style="fill: #d6d6d6;"/>
|
|
20
|
-
<path d="m107.03,82.89l-8.95-.36c-.47-.02-.75-.41-.63-.87l.22-.86c.12-.46.59-.82,1.06-.8l8.95.36c.47.02.75.41.63.87l-.22.86c-.12.46-.59.82-1.06.8Z" style="fill: #d6d6d6;"/>
|
|
21
|
-
<path d="m118.52,83.35l-8.95-.36c-.47-.02-.75-.41-.63-.87l.22-.86c.12-.46.59-.82,1.06-.8l8.95.36c.47.02.75.41.63.87l-.22.86c-.12.46-.59.82-1.06.8Z" style="fill: #d6d6d6;"/>
|
|
22
|
-
<path d="m111.65,93.7c-.49.15-.94.45-1.44.61-2.03.64-4.12-.62-4.15-2.53-.02-1.28.45-2.44,1.6-3.42.84-.72,1.78-1.08,2.78-1.14.88-.05,1.65.12,2.24.65.12.11.29.16.44.24-.17.19.02.23.08.32.37.57.57,1.21.45,1.96-.2,1.22-.73,2.32-1.89,3.17-.05.03-.08.09-.11.14Z" style="fill: #d6d6d6;"/>
|
|
23
|
-
<path d="m111.65,93.7s.07-.11.11-.14c1.16-.85,1.69-1.95,1.89-3.17.12-.75-.08-1.39-.45-1.96-.06-.09-.25-.14-.08-.32.59-.27,1.16-.59,1.79-.67,2.25-.26,3.6.86,3.66,2.68.06,1.96-1.32,3.73-3.42,4.37-1.29.39-2.36.14-3.23-.58-.09-.07-.18-.15-.26-.22Z" style="fill: #5e5e5e;"/>
|
|
24
|
-
<path d="m53.69,110.12s1.51-5.75,5.56,2.51c4.05,8.27,15.38,11.23,20.41,6.86s-.79-23.41-15.54-36.21c-14.75-12.8-30.48,5.41-37.12,19.9-6.65,14.49-6.78,50.07-6.78,50.07l48.9,21.12s8.3-15.25.02-34.98c-4.68-11.15-9.08-16.86-12.8-21.88-3.73-5.02-2.64-7.37-2.64-7.37Z" style="fill: #e89875;"/>
|
|
25
|
-
<g>
|
|
26
|
-
<rect x="222.73" y="98.72" width="8.27" height="27.35" style="fill: #fbc01a;"/>
|
|
27
|
-
<polygon points="231 100.13 222.73 100.13 221.53 95.4 232.39 95.4 231 100.13" style="fill: #fbc01a;"/>
|
|
28
|
-
<line x1="223.67" y1="100.13" x2="231" y2="100.13" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
|
29
|
-
<polygon points="222.73 126.08 231 126.08 232.2 130.8 221.33 130.8 222.73 126.08" style="fill: #fbc01a;"/>
|
|
30
|
-
<line x1="231" y1="126.08" x2="222.73" y2="126.08" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
|
31
|
-
</g>
|
|
32
|
-
<g>
|
|
33
|
-
<rect x="240.34" y="98.72" width="8.27" height="27.35" style="fill: #f4b200;"/>
|
|
34
|
-
<polygon points="248.61 100.13 240.34 100.13 239.15 95.4 250.01 95.4 248.61 100.13" style="fill: #f4b200;"/>
|
|
35
|
-
<polygon points="240.35 126.08 248.62 126.08 249.81 130.8 238.95 130.8 240.35 126.08" style="fill: #f4b200;"/>
|
|
36
|
-
</g>
|
|
37
|
-
<g>
|
|
38
|
-
<rect x="257.95" y="98.72" width="8.27" height="27.35" style="fill: #fbc01a;"/>
|
|
39
|
-
<polygon points="266.22 100.13 257.95 100.13 256.76 95.4 267.62 95.4 266.22 100.13" style="fill: #fbc01a;"/>
|
|
40
|
-
<line x1="258.9" y1="100.13" x2="266.22" y2="100.13" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
|
41
|
-
<polygon points="257.96 126.08 266.23 126.08 267.42 130.8 256.56 130.8 257.96 126.08" style="fill: #fbc01a;"/>
|
|
42
|
-
<line x1="266.22" y1="126.08" x2="257.96" y2="126.08" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
|
43
|
-
</g>
|
|
44
|
-
<g>
|
|
45
|
-
<rect x="275.56" y="98.72" width="8.27" height="27.35" style="fill: #fbc01a;"/>
|
|
46
|
-
<polygon points="283.84 100.13 275.56 100.13 274.37 95.4 285.23 95.4 283.84 100.13" style="fill: #fbc01a;"/>
|
|
47
|
-
<line x1="276.51" y1="100.13" x2="283.84" y2="100.13" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
|
48
|
-
<polygon points="275.57 126.08 283.84 126.08 285.04 130.8 274.17 130.8 275.57 126.08" style="fill: #fbc01a;"/>
|
|
49
|
-
<line x1="283.84" y1="126.08" x2="275.57" y2="126.08" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
|
50
|
-
</g>
|
|
51
|
-
<rect x="218.79" y="91.42" width="69.46" height="3.98" style="fill: #f9b500;"/>
|
|
52
|
-
<rect x="218.79" y="130.8" width="69.46" height="3.98" style="fill: #fbc01a;"/>
|
|
53
|
-
<rect x="209.25" y="134.79" width="88.53" height="4.09" style="fill: #f4b200;"/>
|
|
54
|
-
<path d="m216.67,88.29l34.23-15.08c2.1-.93,4.5-.93,6.6,0l34.23,15.08c1.62.71,1.11,3.13-.66,3.13h-73.75c-1.77,0-2.28-2.42-.66-3.13Z" style="fill: #fbc01a;"/>
|
|
55
|
-
<path d="m230.81,86.16l21.33-9.4c1.31-.58,2.8-.58,4.11,0l21.33,9.4c1.01.44.69,1.95-.41,1.95h-45.96c-1.1,0-1.42-1.51-.41-1.95Z" style="fill: #f4b200;"/>
|
|
56
|
-
<path d="m256.72,83.21c0-1.39-1.13-2.51-2.51-2.51s-2.51,1.13-2.51,2.51,1.13,2.51,2.51,2.51,2.51-1.13,2.51-2.51Z" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
|
57
|
-
<line x1="218.8" y1="131.54" x2="288.24" y2="131.54" style="fill: none; stroke: #f9b500; stroke-miterlimit: 10; stroke-width: .5px;"/>
|
|
58
|
-
<path d="m143.42,43.43l2.99-1.92c34.81-22.3,81.11-12.16,103.41,22.65h0" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 4px;"/>
|
|
59
|
-
<polyline points="242.93 64.16 250.34 64.16 250.34 56.12" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"/>
|
|
60
|
-
<path d="m253.66,141.68l-3.52,4.34c-28.53,29.92-75.91,31.04-105.83,2.5h0" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 4px;"/>
|
|
61
|
-
<polyline points="151 146.9 143.8 148.65 145.77 156.76" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"/>
|
|
62
|
-
</g>
|
|
63
|
-
</svg>
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg
|
|
3
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
-
viewBox="0 0 52 52"
|
|
5
|
-
width="100"
|
|
6
|
-
height="100"
|
|
7
|
-
>
|
|
8
|
-
<style>
|
|
9
|
-
.svg-failed {
|
|
10
|
-
stroke: white;
|
|
11
|
-
stroke-width: 5;
|
|
12
|
-
stroke-miterlimit: 10;
|
|
13
|
-
stroke-linecap: round;
|
|
14
|
-
stroke-linejoin: round;
|
|
15
|
-
fill: none;
|
|
16
|
-
animation: svg-failed-scale 0.3s ease-in-out 0.9s both;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.svg-failed-circle {
|
|
20
|
-
stroke: none;
|
|
21
|
-
fill: #FF5A5F;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.svg-failed-x {
|
|
25
|
-
stroke-dasharray: 48;
|
|
26
|
-
stroke-dashoffset: 48;
|
|
27
|
-
animation: svg-failed-draw 0.5s ease forwards 0.6s;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@keyframes svg-failed-draw {
|
|
31
|
-
to {
|
|
32
|
-
stroke-dashoffset: 0;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@keyframes svg-failed-scale {
|
|
37
|
-
0%, 100% {
|
|
38
|
-
transform: scale(1);
|
|
39
|
-
}
|
|
40
|
-
50% {
|
|
41
|
-
transform: scale(1.1);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
</style>
|
|
45
|
-
|
|
46
|
-
<circle class="svg-failed-circle" cx="26" cy="26" r="25" />
|
|
47
|
-
<!-- X mark: two lines crossing -->
|
|
48
|
-
<path
|
|
49
|
-
class="svg-failed svg-failed-x"
|
|
50
|
-
d="M16 16 L36 36"
|
|
51
|
-
/>
|
|
52
|
-
<path
|
|
53
|
-
class="svg-failed svg-failed-x"
|
|
54
|
-
d="M36 16 L16 36"
|
|
55
|
-
/>
|
|
56
|
-
</svg>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<svg class="pl" width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<style>
|
|
3
|
-
.pl__ring { animation: ringA 3s linear infinite; }
|
|
4
|
-
.pl__ring--a { stroke: #F79E1B; }
|
|
5
|
-
.pl__ring--b { animation-name: ringB; stroke: #F79E1B; }
|
|
6
|
-
.pl__ring--c { animation-name: ringC; stroke: #F79E1B; }
|
|
7
|
-
.pl__ring--d { animation-name: ringD; stroke: #F79E1B; }
|
|
8
|
-
|
|
9
|
-
@keyframes ringA {
|
|
10
|
-
from, 4% { stroke-dasharray: 0 660; stroke-width: 20; stroke-dashoffset: -330; }
|
|
11
|
-
12% { stroke-dasharray: 60 600; stroke-width: 30; stroke-dashoffset: -335; }
|
|
12
|
-
32% { stroke-dasharray: 60 600; stroke-width: 30; stroke-dashoffset: -595; }
|
|
13
|
-
40%, 54% { stroke-dasharray: 0 660; stroke-width: 20; stroke-dashoffset: -660; }
|
|
14
|
-
62% { stroke-dasharray: 60 600; stroke-width: 30; stroke-dashoffset: -665; }
|
|
15
|
-
82% { stroke-dasharray: 60 600; stroke-width: 30; stroke-dashoffset: -925; }
|
|
16
|
-
90%, to { stroke-dasharray: 0 660; stroke-width: 20; stroke-dashoffset: -990; }
|
|
17
|
-
}
|
|
18
|
-
@keyframes ringB {
|
|
19
|
-
from, 12% { stroke-dasharray: 0 220; stroke-width: 20; stroke-dashoffset: -110; }
|
|
20
|
-
20% { stroke-dasharray: 20 200; stroke-width: 30; stroke-dashoffset: -115; }
|
|
21
|
-
40% { stroke-dasharray: 20 200; stroke-width: 30; stroke-dashoffset: -195; }
|
|
22
|
-
48%, 62% { stroke-dasharray: 0 220; stroke-width: 20; stroke-dashoffset: -220; }
|
|
23
|
-
70% { stroke-dasharray: 20 200; stroke-width: 30; stroke-dashoffset: -225; }
|
|
24
|
-
90% { stroke-dasharray: 20 200; stroke-width: 30; stroke-dashoffset: -305; }
|
|
25
|
-
98%, to { stroke-dasharray: 0 220; stroke-width: 20; stroke-dashoffset: -330; }
|
|
26
|
-
}
|
|
27
|
-
@keyframes ringC {
|
|
28
|
-
from { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: 0; }
|
|
29
|
-
8% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -5; }
|
|
30
|
-
28% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -175; }
|
|
31
|
-
36%, 58% { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: -220; }
|
|
32
|
-
66% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -225; }
|
|
33
|
-
86% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -395; }
|
|
34
|
-
94%, to { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: -440; }
|
|
35
|
-
}
|
|
36
|
-
@keyframes ringD {
|
|
37
|
-
from, 8% { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: 0; }
|
|
38
|
-
16% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -5; }
|
|
39
|
-
36% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -175; }
|
|
40
|
-
44%, 50% { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: -220; }
|
|
41
|
-
58% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -225; }
|
|
42
|
-
78% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -395; }
|
|
43
|
-
86%, to { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: -440; }
|
|
44
|
-
}
|
|
45
|
-
</style>
|
|
46
|
-
<circle class="pl__ring pl__ring--a" cx="150" cy="150" r="105" fill="none" stroke-width="20" stroke-dasharray="0 660" stroke-dashoffset="-330" stroke-linecap="round"/>
|
|
47
|
-
<circle class="pl__ring pl__ring--b" cx="150" cy="150" r="35" fill="none" stroke-width="20" stroke-dasharray="0 220" stroke-dashoffset="-110" stroke-linecap="round"/>
|
|
48
|
-
<circle class="pl__ring pl__ring--c" cx="115" cy="150" r="70" fill="none" stroke-width="20" stroke-dasharray="0 440" stroke-linecap="round"/>
|
|
49
|
-
<circle class="pl__ring pl__ring--d" cx="185" cy="150" r="70" fill="none" stroke-width="20" stroke-dasharray="0 440" stroke-linecap="round"/>
|
|
50
|
-
</svg>
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg
|
|
3
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
-
viewBox="0 0 52 52"
|
|
5
|
-
width="100"
|
|
6
|
-
height="100"
|
|
7
|
-
>
|
|
8
|
-
<style>
|
|
9
|
-
.svg-checkmark {
|
|
10
|
-
stroke: white;
|
|
11
|
-
stroke-width: 5;
|
|
12
|
-
stroke-miterlimit: 10;
|
|
13
|
-
stroke-linecap: round;
|
|
14
|
-
stroke-linejoin: round;
|
|
15
|
-
fill: none;
|
|
16
|
-
animation: svg-success-scale 0.3s ease-in-out 0.9s both;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.svg-checkmark-circle {
|
|
20
|
-
stroke: none;
|
|
21
|
-
fill: #00D290;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.svg-checkmark-check {
|
|
25
|
-
stroke-dasharray: 48;
|
|
26
|
-
stroke-dashoffset: 48;
|
|
27
|
-
animation: svg-success-draw 0.5s ease forwards 0.6s;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@keyframes svg-success-draw {
|
|
31
|
-
to {
|
|
32
|
-
stroke-dashoffset: 0;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@keyframes svg-success-scale {
|
|
37
|
-
0%, 100% {
|
|
38
|
-
transform: scale(1);
|
|
39
|
-
}
|
|
40
|
-
50% {
|
|
41
|
-
transform: scale(1.1);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
</style>
|
|
45
|
-
|
|
46
|
-
<circle class="svg-checkmark-circle" cx="26" cy="26" r="25" />
|
|
47
|
-
<path
|
|
48
|
-
class="svg-checkmark svg-checkmark-check"
|
|
49
|
-
d="M14.1 27.2l7.1 7.2 16.7-16.8"
|
|
50
|
-
/>
|
|
51
|
-
</svg>
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
function getAssetUrl(path) {
|
|
2
|
-
if (!path) return '';
|
|
3
|
-
if (path.startsWith('http') || path.startsWith('//') || path.startsWith('/')) {
|
|
4
|
-
return path;
|
|
5
|
-
}
|
|
6
|
-
return '/assets/' + path;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function removeIcon(fieldId) {
|
|
10
|
-
const field = document.getElementById(fieldId);
|
|
11
|
-
const preview = document.getElementById('preview_' + fieldId);
|
|
12
|
-
const removeBtn = document.getElementById('remove_' + fieldId);
|
|
13
|
-
|
|
14
|
-
if (field) {
|
|
15
|
-
field.value = '';
|
|
16
|
-
}
|
|
17
|
-
if (preview) {
|
|
18
|
-
preview.src = '';
|
|
19
|
-
preview.style.display = 'none';
|
|
20
|
-
}
|
|
21
|
-
if (removeBtn) {
|
|
22
|
-
removeBtn.classList.add('hidden');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const $select = $(".select2-icon-picker[data-target-field='" + fieldId + "']");
|
|
26
|
-
if ($select.length) {
|
|
27
|
-
$select.val(null).trigger('change');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function formatIconOption(icon) {
|
|
32
|
-
if (!icon.id) return icon.text;
|
|
33
|
-
return $(`<span>
|
|
34
|
-
<img src="${getAssetUrl(icon.id)}" style="height:20px;width:auto;margin-right:5px;" />
|
|
35
|
-
${icon.text}
|
|
36
|
-
</span>`);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function formatIconSelection(icon) {
|
|
40
|
-
if (!icon.id) return icon.text;
|
|
41
|
-
return $(`<span>
|
|
42
|
-
<img src="${getAssetUrl(icon.id)}" style="height:20px;width:auto;margin-right:5px;" />
|
|
43
|
-
${icon.text}
|
|
44
|
-
</span>`);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
document.addEventListener("turbo:load", function () {
|
|
48
|
-
$('.select2-icon-picker').each(function () {
|
|
49
|
-
if ($(this).hasClass("select2-hidden-accessible")) {
|
|
50
|
-
$(this).select2('destroy');
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
$('.select2-icon-picker').select2({
|
|
55
|
-
width: '100%',
|
|
56
|
-
allowClear: true,
|
|
57
|
-
placeholder: 'None',
|
|
58
|
-
templateResult: formatIconOption,
|
|
59
|
-
templateSelection: formatIconSelection
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
$('.select2-icon-picker').on('select2:select', function (e) {
|
|
63
|
-
const selectedIcon = e.params.data.id;
|
|
64
|
-
const fieldId = $(this).data('target-field');
|
|
65
|
-
const previewId = $(this).data('target_preview');
|
|
66
|
-
const removeBtnId = $(this).data('remove_btn');
|
|
67
|
-
|
|
68
|
-
const field = document.getElementById(fieldId);
|
|
69
|
-
const preview = document.getElementById(previewId);
|
|
70
|
-
const removeBtn = document.getElementById(removeBtnId);
|
|
71
|
-
|
|
72
|
-
if (field) {
|
|
73
|
-
field.value = selectedIcon;
|
|
74
|
-
}
|
|
75
|
-
if (preview) {
|
|
76
|
-
preview.src = getAssetUrl(selectedIcon);
|
|
77
|
-
preview.style.display = selectedIcon ? 'inline' : 'none';
|
|
78
|
-
}
|
|
79
|
-
if (removeBtn) {
|
|
80
|
-
if (selectedIcon) {
|
|
81
|
-
removeBtn.classList.remove('hidden');
|
|
82
|
-
} else {
|
|
83
|
-
removeBtn.classList.add('hidden');
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
});
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
.payment-icon-preview {
|
|
2
|
-
max-height: 60px;
|
|
3
|
-
max-width: 120px;
|
|
4
|
-
min-height: 60px;
|
|
5
|
-
min-width: 120px;
|
|
6
|
-
background: #f8f9fa;
|
|
7
|
-
border: 1px dashed #ccc;
|
|
8
|
-
display: inline-block;
|
|
9
|
-
object-fit: contain;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
position: relative;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.icon-preview-container {
|
|
15
|
-
position: relative;
|
|
16
|
-
display: inline-block;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.remove-icon-btn {
|
|
20
|
-
position: absolute;
|
|
21
|
-
top: -8px;
|
|
22
|
-
right: -8px;
|
|
23
|
-
width: 24px;
|
|
24
|
-
height: 24px;
|
|
25
|
-
border-radius: 50%;
|
|
26
|
-
background: #dc3545;
|
|
27
|
-
color: white;
|
|
28
|
-
border: 2px solid white;
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
font-size: 12px;
|
|
34
|
-
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
|
|
35
|
-
transition: all 0.2s ease;
|
|
36
|
-
z-index: 10;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.remove-icon-btn:hover {
|
|
40
|
-
background: #c82333;
|
|
41
|
-
transform: scale(1.1);
|
|
42
|
-
box-shadow: 0 3px 6px rgba(0,0,0,0.3);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.remove-icon-btn.hidden {
|
|
46
|
-
display: none;
|
|
47
|
-
}
|