spree_cm_commissioner 1.8.1 → 1.8.2
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/.tool-versions +1 -0
- data/Gemfile.lock +1 -1
- data/app/controllers/spree/admin/taxons_controller_decorator.rb +5 -0
- data/app/controllers/spree/api/v2/tenant/customer_notifications_controller.rb +20 -0
- data/app/controllers/spree/api/v2/tenant/line_items_controller.rb +56 -0
- data/app/controllers/spree/api/v2/tenant/notifications_controller.rb +55 -0
- data/app/interactors/spree_cm_commissioner/customer_notification_sender.rb +10 -5
- data/app/models/spree_cm_commissioner/taxon_decorator.rb +1 -0
- data/app/models/spree_cm_commissioner/taxon_video_banner.rb +4 -0
- data/app/models/spree_cm_commissioner/video.rb +15 -0
- data/app/overrides/spree/admin/taxons/_form/assets_form.html.erb.deface +19 -0
- data/app/overrides/spree/admin/taxons/_form/available_on.html.erb.deface +18 -0
- data/app/serializers/spree/v2/storefront/taxon_serializer_decorator.rb +2 -1
- data/app/serializers/spree/v2/tenant/customer_notification_serializer.rb +11 -0
- data/app/serializers/spree/v2/tenant/digital_link_serializer.rb +9 -0
- data/app/serializers/spree/v2/tenant/image_serializer.rb +11 -0
- data/app/serializers/spree/v2/tenant/line_item_serializer.rb +35 -0
- data/app/serializers/spree/v2/tenant/notification_serializer.rb +11 -0
- data/app/serializers/spree/v2/tenant/option_type_serializer.rb +12 -0
- data/app/serializers/spree/v2/tenant/option_value_serializer.rb +17 -0
- data/app/serializers/spree/v2/tenant/order_serializer.rb +8 -0
- data/app/serializers/spree/v2/tenant/stock_item_serializer.rb +11 -0
- data/app/serializers/spree/v2/tenant/stock_location_serializer.rb +11 -0
- data/app/serializers/spree/v2/tenant/variant_serializer.rb +46 -0
- data/app/serializers/spree_cm_commissioner/v2/storefront/video_serializer.rb +9 -0
- data/app/views/spree/admin/customer_notifications/_form.html.erb +8 -0
- data/config/initializers/spree_permitted_attributes.rb +1 -0
- data/config/locales/en.yml +2 -0
- data/config/locales/km.yml +2 -0
- data/config/routes.rb +12 -0
- data/db/migrate/20250307073003_add_tenant_id_to_cm_customer_notifications.rb +6 -0
- data/db/migrate/20250307083809_remove_tenant_id_from_cm_notifications.rb +6 -0
- data/db/migrate/20250314013434_add_available_on_to_spree_taxons.rb +5 -0
- data/lib/spree_cm_commissioner/version.rb +1 -1
- metadata +23 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e00b3e7d79896c88e4956cc766ba9e3538a3c9fd0f68b8835a6c5281bdfef6f
|
4
|
+
data.tar.gz: 421e9a6a7be136d047457d06e1e51822029e05b08e5bf42b9b9410541b234105
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25a20ae201490fd79949c9b33a74ac4fa7597fffb80a84b8a54dd104dd02a89ead67397bfcfe276e131ad8a2dd95aed691530f8d1eb33c2d99b16982dcbbca3b
|
7
|
+
data.tar.gz: d0f39688eb2ea2f413052b02bf7cfb05d34c020c02704f41175e4f84a994934038e159c10c81f23e3b4f6ede78ea44b3cfa9cbc4092970e5de1cd49a02ab9e14
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.3.5
|
data/Gemfile.lock
CHANGED
@@ -21,6 +21,10 @@ module Spree
|
|
21
21
|
remove_asset(@taxon.home_banner)
|
22
22
|
end
|
23
23
|
|
24
|
+
def remove_video_banner
|
25
|
+
remove_asset(@taxon.video_banner)
|
26
|
+
end
|
27
|
+
|
24
28
|
private
|
25
29
|
|
26
30
|
def remove_asset(asset)
|
@@ -38,6 +42,7 @@ module Spree
|
|
38
42
|
@taxon.build_app_banner(attachment: permitted_resource_params.delete(:app_banner)) if permitted_resource_params[:app_banner]
|
39
43
|
@taxon.build_web_banner(attachment: permitted_resource_params.delete(:web_banner)) if permitted_resource_params[:web_banner]
|
40
44
|
@taxon.build_home_banner(attachment: permitted_resource_params.delete(:home_banner)) if permitted_resource_params[:home_banner]
|
45
|
+
@taxon.build_video_banner(attachment: permitted_resource_params.delete(:video_banner)) if permitted_resource_params[:video_banner]
|
41
46
|
end
|
42
47
|
end
|
43
48
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module V2
|
4
|
+
module Tenant
|
5
|
+
class CustomerNotificationsController < BaseController
|
6
|
+
before_action :require_spree_current_user
|
7
|
+
|
8
|
+
def show
|
9
|
+
customer_notification = SpreeCmCommissioner::CustomerNotification.find(params[:id])
|
10
|
+
render_serialized_payload { serialize_resource(customer_notification) }
|
11
|
+
end
|
12
|
+
|
13
|
+
def resource_serializer
|
14
|
+
Spree::V2::Tenant::CustomerNotificationSerializer
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module V2
|
4
|
+
module Tenant
|
5
|
+
class LineItemsController < BaseController
|
6
|
+
around_action :wrap_with_multitenant_without
|
7
|
+
|
8
|
+
def collection
|
9
|
+
if spree_current_user.nil?
|
10
|
+
line_items_by_order_tokens
|
11
|
+
else
|
12
|
+
spree_current_user.line_items.filter_by_event(params[:event])
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def show
|
17
|
+
line_item = Spree::LineItem.find(params[:id])
|
18
|
+
render_serialized_payload { serialize_resource(line_item) }
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def allowed_sort_attributes
|
24
|
+
super << :to_date
|
25
|
+
super << :from_date
|
26
|
+
end
|
27
|
+
|
28
|
+
def resource_serializer
|
29
|
+
Spree::V2::Tenant::LineItemSerializer
|
30
|
+
end
|
31
|
+
|
32
|
+
def collection_serializer
|
33
|
+
Spree::V2::Tenant::LineItemSerializer
|
34
|
+
end
|
35
|
+
|
36
|
+
def line_items_by_order_tokens
|
37
|
+
order_tokens = params[:order_tokens]
|
38
|
+
event = params[:event]
|
39
|
+
|
40
|
+
return Spree::LineItem.none if order_tokens.blank?
|
41
|
+
|
42
|
+
Spree::LineItem.joins(:order)
|
43
|
+
.where(spree_orders: { token: order_tokens, state: 'complete', user_id: nil, tenant_id: 1 })
|
44
|
+
.filter_by_event(event)
|
45
|
+
.page(params[:page])
|
46
|
+
.per(params[:per_page])
|
47
|
+
end
|
48
|
+
|
49
|
+
def wrap_with_multitenant_without(&block)
|
50
|
+
MultiTenant.without(&block)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module V2
|
4
|
+
module Tenant
|
5
|
+
class NotificationsController < BaseController
|
6
|
+
before_action :require_spree_current_user
|
7
|
+
|
8
|
+
def collection
|
9
|
+
spree_current_user.notifications.newest_first.user_notifications
|
10
|
+
end
|
11
|
+
|
12
|
+
def serialize_collection(collection)
|
13
|
+
options_data = collection_options(collection).merge(params: serializer_params)
|
14
|
+
options_data[:meta][:unread_count] = collection.select(&:unread?).count
|
15
|
+
|
16
|
+
collection_serializer.new(
|
17
|
+
collection,
|
18
|
+
options_data
|
19
|
+
).serializable_hash
|
20
|
+
end
|
21
|
+
|
22
|
+
def show
|
23
|
+
notification = SpreeCmCommissioner::Notification.find(params[:id])
|
24
|
+
|
25
|
+
render_serialized_payload { serialize_resource(notification) }
|
26
|
+
end
|
27
|
+
|
28
|
+
def mark_as_read
|
29
|
+
result = SpreeCmCommissioner::NotificationReader.call(id: params[:id])
|
30
|
+
|
31
|
+
return unless result.success?
|
32
|
+
|
33
|
+
head :ok
|
34
|
+
end
|
35
|
+
|
36
|
+
def mark_all_as_read
|
37
|
+
result = SpreeCmCommissioner::NotificationReader.call(user: spree_current_user)
|
38
|
+
|
39
|
+
return unless result.success?
|
40
|
+
|
41
|
+
head :ok
|
42
|
+
end
|
43
|
+
|
44
|
+
def resource_serializer
|
45
|
+
Spree::V2::Tenant::NotificationSerializer
|
46
|
+
end
|
47
|
+
|
48
|
+
def collection_serializer
|
49
|
+
Spree::V2::Tenant::NotificationSerializer
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -55,15 +55,20 @@ module SpreeCmCommissioner
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def end_users
|
58
|
+
users_scope = Spree.user_class.where(tenant_id: customer_notification.tenant_id)
|
59
|
+
|
58
60
|
if customer_notification.notification_taxons.exists?
|
59
61
|
taxon_ids = customer_notification.notification_taxons.pluck(:taxon_id)
|
60
|
-
SpreeCmCommissioner::UsersByEventFetcherQuery
|
61
|
-
|
62
|
-
|
63
|
-
|
62
|
+
users_scope = SpreeCmCommissioner::UsersByEventFetcherQuery
|
63
|
+
.new(taxon_ids)
|
64
|
+
.call
|
65
|
+
.end_users_push_notificable
|
66
|
+
.where(tenant_id: customer_notification.tenant_id)
|
64
67
|
else
|
65
|
-
|
68
|
+
users_scope = users_scope.end_users_push_notificable
|
66
69
|
end
|
70
|
+
|
71
|
+
users_scope
|
67
72
|
end
|
68
73
|
end
|
69
74
|
end
|
@@ -28,6 +28,7 @@ module SpreeCmCommissioner
|
|
28
28
|
base.has_one :web_banner, as: :viewable, dependent: :destroy, class_name: 'SpreeCmCommissioner::TaxonWebBanner'
|
29
29
|
base.has_one :app_banner, as: :viewable, dependent: :destroy, class_name: 'SpreeCmCommissioner::TaxonAppBanner'
|
30
30
|
base.has_one :home_banner, as: :viewable, dependent: :destroy, class_name: 'SpreeCmCommissioner::TaxonHomeBanner'
|
31
|
+
base.has_one :video_banner, as: :viewable, dependent: :destroy, class_name: 'SpreeCmCommissioner::TaxonVideoBanner'
|
31
32
|
|
32
33
|
# Update children association to work with nested set (lft, rgt)
|
33
34
|
base.has_many :children, -> { order(:lft) }, class_name: 'Spree::Taxon', foreign_key: :parent_id, dependent: :destroy
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module SpreeCmCommissioner
|
2
|
+
class Video < Spree::Asset
|
3
|
+
include ::Rails.application.routes.url_helpers
|
4
|
+
|
5
|
+
has_one_attached :attachment
|
6
|
+
|
7
|
+
validates :attachment, attached: true, content_type: %r{\Avideo/.*\z}
|
8
|
+
|
9
|
+
default_scope { includes(attachment_attachment: :blob) }
|
10
|
+
|
11
|
+
def original_url
|
12
|
+
cdn_image_url(attachment)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -47,5 +47,24 @@
|
|
47
47
|
form:f,
|
48
48
|
classes: ['col-md-5 ml-3']
|
49
49
|
%>
|
50
|
+
|
51
|
+
<%= f.field_container :video_banner, direct_upload: true, class: ['col-md-5 ml-3 rounded border p-3'] do %>
|
52
|
+
<% if @taxon.video_banner&.attachment.present? %>
|
53
|
+
<video class="rounded border mb-4 mw-150" style="max-height: 200px" controls>
|
54
|
+
<source src="<%= main_app.rails_blob_url(@taxon.video_banner.attachment) %>" type="<%= @taxon.video_banner.attachment.content_type %>">
|
55
|
+
Your browser does not support the video tag.
|
56
|
+
</video>
|
57
|
+
<% end %>
|
58
|
+
|
59
|
+
<div data-hook="file" class="mb-3" >
|
60
|
+
<%= f.label :video_banner, I18n.t('taxon.video_banner') %>
|
61
|
+
<%= f.label :video_banner, I18n.t('taxon.video_banner_require_size') %>
|
62
|
+
<%= f.file_field :video_banner, required: false, accept: "video/*" %>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<% if @taxon.video_banner.present? && defined?(remove_video_banner_admin_taxonomy_taxon_url) %>
|
66
|
+
<%= link_to Spree.t(:remove_video), remove_video_banner_admin_taxonomy_taxon_url, method: :delete %>
|
67
|
+
<% end %>
|
68
|
+
<% end %>
|
50
69
|
</div>
|
51
70
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<!-- insert_before "erb[loud]:contains('field_container :parent_id')" -->
|
2
|
+
|
3
|
+
<div class="form-group">
|
4
|
+
<%= label_tag nil, Spree.t(:available_on) %>
|
5
|
+
<div class="input-group datePickerFrom"
|
6
|
+
data-wrap="true"
|
7
|
+
data-alt-input="true"
|
8
|
+
data-min-date="<%= Time.now.strftime('%Y-%m-%d') %>"
|
9
|
+
data-enable-time="true">
|
10
|
+
<%= f.text_field :available_on,
|
11
|
+
value: @taxon.available_on,
|
12
|
+
placeholder: Spree.t(:select_a_date),
|
13
|
+
class: 'form-control shadow-none',
|
14
|
+
'data-input':'' %>
|
15
|
+
|
16
|
+
<%= render partial: 'spree/admin/shared/cal_close' %>
|
17
|
+
</div>
|
18
|
+
</div>
|
@@ -10,10 +10,11 @@ module Spree
|
|
10
10
|
base.has_one :app_banner, serializer: ::SpreeCmCommissioner::V2::Storefront::AssetSerializer
|
11
11
|
base.has_one :web_banner, serializer: ::SpreeCmCommissioner::V2::Storefront::AssetSerializer
|
12
12
|
base.has_one :home_banner, serializer: ::SpreeCmCommissioner::V2::Storefront::AssetSerializer
|
13
|
+
base.has_one :video_banner, serializer: ::SpreeCmCommissioner::V2::Storefront::VideoSerializer
|
13
14
|
|
14
15
|
base.attributes :custom_redirect_url, :kind, :subtitle, :from_date, :to_date,
|
15
16
|
:background_color, :foreground_color, :show_badge_status,
|
16
|
-
:purchasable_on, :vendor_id
|
17
|
+
:purchasable_on, :vendor_id, :available_on
|
17
18
|
|
18
19
|
base.attribute :purchasable_on_app do |taxon|
|
19
20
|
taxon.purchasable_on == 'app' || taxon.purchasable_on == 'both'
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Spree
|
2
|
+
module V2
|
3
|
+
module Tenant
|
4
|
+
class CustomerNotificationSerializer < BaseSerializer
|
5
|
+
attributes :title, :payload, :body, :url, :started_at, :sent_at, :notification_type, :action_label
|
6
|
+
|
7
|
+
has_many :feature_images, serializer: Spree::V2::Tenant::AssetSerializer
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Spree
|
2
|
+
module V2
|
3
|
+
module Tenant
|
4
|
+
class LineItemSerializer < BaseSerializer
|
5
|
+
attributes :name, :quantity, :price, :slug, :options_text, :currency,
|
6
|
+
:display_price, :total, :display_total, :adjustment_total,
|
7
|
+
:display_adjustment_total, :additional_tax_total, :discounted_amount,
|
8
|
+
:display_discounted_amount, :display_additional_tax_total, :promo_total,
|
9
|
+
:display_promo_total, :included_tax_total, :display_included_tax_total,
|
10
|
+
:from_date, :to_date, :need_confirmation, :product_type, :event_status, :amount,
|
11
|
+
:display_amount, :number, :qr_data, :kyc, :kyc_fields, :remaining_total_guests, :number_of_guests,
|
12
|
+
:completion_steps, :available_social_contact_platforms, :allow_anonymous_booking,
|
13
|
+
:discontinue_on, :high_demand, :jwt_token, :pre_tax_amount, :display_pre_tax_amount, :public_metadata
|
14
|
+
|
15
|
+
attribute :required_self_check_in_location, &:required_self_check_in_location?
|
16
|
+
attribute :allowed_self_check_in, &:allowed_self_check_in?
|
17
|
+
attribute :allowed_upload_later, &:allowed_upload_later?
|
18
|
+
attribute :delivery_required, &:delivery_required?
|
19
|
+
attribute :sufficient_stock, &:sufficient_stock?
|
20
|
+
|
21
|
+
has_one :vendor, serializer: Spree::V2::Tenant::VendorSerializer
|
22
|
+
has_one :product, serializer: Spree::V2::Storefront::ProductSerializer
|
23
|
+
|
24
|
+
belongs_to :variant, serializer: Spree::V2::Tenant::VariantSerializer
|
25
|
+
belongs_to :order, serializer: Spree::V2::Tenant::OrderSerializer
|
26
|
+
|
27
|
+
has_many :digital_links, serializer: Spree::V2::Tenant::DigitalLinkSerializer
|
28
|
+
has_many :guests, serializer: Spree::V2::Tenant::GuestSerializer
|
29
|
+
|
30
|
+
# completion_steps updates frequently
|
31
|
+
cache_options store: nil
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Spree
|
2
|
+
module V2
|
3
|
+
module Tenant
|
4
|
+
class OptionTypeSerializer < BaseSerializer
|
5
|
+
attributes :name, :presentation, :position, :public_metadata,
|
6
|
+
:kind, :attr_type, :promoted, :hidden
|
7
|
+
|
8
|
+
has_many :option_values, serializer: Tenant::OptionValueSerializer
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Spree
|
2
|
+
module V2
|
3
|
+
module Tenant
|
4
|
+
class OptionValueSerializer < BaseSerializer
|
5
|
+
attributes :name, :presentation, :position, :public_metadata
|
6
|
+
|
7
|
+
attribute :display_icon do |option_value|
|
8
|
+
ActionController::Base.helpers.image_url(option_value.display_icon)
|
9
|
+
rescue StandardError
|
10
|
+
nil
|
11
|
+
end
|
12
|
+
|
13
|
+
belongs_to :option_type, serializer: Spree::V2::Tenant::OptionTypeSerializer
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Spree
|
2
|
+
module V2
|
3
|
+
module Tenant
|
4
|
+
class StockItemSerializer < BaseSerializer
|
5
|
+
# add this because some frontend UI need total room/product for user to select.
|
6
|
+
# but for this, total stock will publicly shown.
|
7
|
+
attributes :count_on_hand
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Spree
|
2
|
+
module V2
|
3
|
+
module Tenant
|
4
|
+
class VariantSerializer < BaseSerializer
|
5
|
+
include Spree::Api::V2::DisplayMoneyHelper
|
6
|
+
attributes :sku, :barcode, :weight, :height, :width, :depth, :is_master, :options_text, :public_metadata
|
7
|
+
attribute :purchasable, &:purchasable?
|
8
|
+
attribute :in_stock, &:in_stock?
|
9
|
+
attribute :backorderable, &:backorderable?
|
10
|
+
|
11
|
+
attribute :currency do |_product, params|
|
12
|
+
params[:currency]
|
13
|
+
end
|
14
|
+
|
15
|
+
attribute :price do |product, params|
|
16
|
+
price(product, params[:currency])
|
17
|
+
end
|
18
|
+
|
19
|
+
attribute :display_price do |product, params|
|
20
|
+
display_price(product, params[:currency])
|
21
|
+
end
|
22
|
+
|
23
|
+
attribute :compare_at_price do |product, params|
|
24
|
+
compare_at_price(product, params[:currency])
|
25
|
+
end
|
26
|
+
|
27
|
+
attribute :display_compare_at_price do |product, params|
|
28
|
+
display_compare_at_price(product, params[:currency])
|
29
|
+
end
|
30
|
+
|
31
|
+
attributes :need_confirmation, :product_type, :kyc, :allow_anonymous_booking,
|
32
|
+
:reminder_in_hours, :start_time, :delivery_option,
|
33
|
+
:number_of_guests, :max_quantity_per_order, :discontinue_on, :high_demand
|
34
|
+
|
35
|
+
attribute :delivery_required, &:delivery_required?
|
36
|
+
|
37
|
+
belongs_to :product, serializer: Spree::V2::Storefront::ProductSerializer
|
38
|
+
|
39
|
+
has_many :images, serializer: Spree::V2::Tenant::ImageSerializer
|
40
|
+
has_many :option_values, serializer: Spree::V2::Tenant::OptionValueSerializer
|
41
|
+
has_many :stock_locations, serializer: Spree::V2::Tenant::StockLocationSerializer
|
42
|
+
has_many :stock_items, serializer: Spree::V2::Tenant::StockItemSerializer
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -74,5 +74,13 @@
|
|
74
74
|
<%= f.error_message_on :taxon_ids %>
|
75
75
|
</div>
|
76
76
|
</div>
|
77
|
+
|
78
|
+
<div class="col-lg-12 col-sm-12">
|
79
|
+
<div class="form-group">
|
80
|
+
<%= f.label :tenant_id, raw(Spree.t(:tenant) + ' (optional)') %>
|
81
|
+
<%= f.collection_select :tenant_id, SpreeCmCommissioner::Tenant.all, :id, :name, { prompt: Spree.t(:select_tenant) }, { class: 'form-control select2' } %>
|
82
|
+
<%= f.error_message_on :tenant_id %>
|
83
|
+
</div>
|
84
|
+
</div>
|
77
85
|
</div>
|
78
86
|
</div>
|
data/config/locales/en.yml
CHANGED
@@ -41,6 +41,8 @@ en:
|
|
41
41
|
app_banner: App Banner (16x9)
|
42
42
|
web_banner: Web banner (10x2)
|
43
43
|
home_banner: Home Banner (16x9)
|
44
|
+
video_banner: Video Banner (9x16)
|
45
|
+
video_banner_require_size: Maximum size 10MB
|
44
46
|
note: "<b>Note:</b> Subtitle is used for country code in Nationality Taxon"
|
45
47
|
|
46
48
|
taxon_vendor:
|
data/config/locales/km.yml
CHANGED
data/config/routes.rb
CHANGED
@@ -173,6 +173,7 @@ Spree::Core::Engine.add_routes do
|
|
173
173
|
delete :remove_app_banner
|
174
174
|
delete :remove_web_banner
|
175
175
|
delete :remove_home_banner
|
176
|
+
delete :remove_video_banner
|
176
177
|
end
|
177
178
|
end
|
178
179
|
end
|
@@ -480,9 +481,20 @@ Spree::Core::Engine.add_routes do
|
|
480
481
|
patch :complete
|
481
482
|
end
|
482
483
|
|
484
|
+
resources :customer_notifications, only: [:show]
|
485
|
+
resources :notifications do
|
486
|
+
collection do
|
487
|
+
patch :mark_all_as_read
|
488
|
+
end
|
489
|
+
member do
|
490
|
+
patch :mark_as_read
|
491
|
+
end
|
492
|
+
end
|
493
|
+
|
483
494
|
resources :user_account_linkages, only: %i[index create destroy]
|
484
495
|
resource :s3_signed_urls
|
485
496
|
resource :profile_images, only: %i[update destroy]
|
497
|
+
resources :line_items, only: %i[index show]
|
486
498
|
end
|
487
499
|
|
488
500
|
namespace :storefront do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_cm_commissioner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- You
|
@@ -493,6 +493,7 @@ files:
|
|
493
493
|
- ".rubocop-rails.yml"
|
494
494
|
- ".rubocop.yml"
|
495
495
|
- ".ruby-version"
|
496
|
+
- ".tool-versions"
|
496
497
|
- ".travis.yml"
|
497
498
|
- ".vscode/settings.json"
|
498
499
|
- Dockerfile
|
@@ -819,8 +820,11 @@ files:
|
|
819
820
|
- app/controllers/spree/api/v2/tenant/cart_controller.rb
|
820
821
|
- app/controllers/spree/api/v2/tenant/cart_guests_controller.rb
|
821
822
|
- app/controllers/spree/api/v2/tenant/checkout_controller.rb
|
823
|
+
- app/controllers/spree/api/v2/tenant/customer_notifications_controller.rb
|
822
824
|
- app/controllers/spree/api/v2/tenant/guests_controller.rb
|
823
825
|
- app/controllers/spree/api/v2/tenant/homepage_sections_controller.rb
|
826
|
+
- app/controllers/spree/api/v2/tenant/line_items_controller.rb
|
827
|
+
- app/controllers/spree/api/v2/tenant/notifications_controller.rb
|
824
828
|
- app/controllers/spree/api/v2/tenant/pin_code_checkers_controller.rb
|
825
829
|
- app/controllers/spree/api/v2/tenant/pin_code_generators_controller.rb
|
826
830
|
- app/controllers/spree/api/v2/tenant/products_controller.rb
|
@@ -1211,6 +1215,7 @@ files:
|
|
1211
1215
|
- app/models/spree_cm_commissioner/taxon_decorator.rb
|
1212
1216
|
- app/models/spree_cm_commissioner/taxon_home_banner.rb
|
1213
1217
|
- app/models/spree_cm_commissioner/taxon_vendor.rb
|
1218
|
+
- app/models/spree_cm_commissioner/taxon_video_banner.rb
|
1214
1219
|
- app/models/spree_cm_commissioner/taxon_web_banner.rb
|
1215
1220
|
- app/models/spree_cm_commissioner/taxonomy_decorator.rb
|
1216
1221
|
- app/models/spree_cm_commissioner/telegram_bot.rb
|
@@ -1243,6 +1248,7 @@ files:
|
|
1243
1248
|
- app/models/spree_cm_commissioner/vendor_promotion_rule.rb
|
1244
1249
|
- app/models/spree_cm_commissioner/vendor_stop.rb
|
1245
1250
|
- app/models/spree_cm_commissioner/vendor_web_promotion_banner.rb
|
1251
|
+
- app/models/spree_cm_commissioner/video.rb
|
1246
1252
|
- app/models/spree_cm_commissioner/video_on_demand.rb
|
1247
1253
|
- app/models/spree_cm_commissioner/waiting_room_session.rb
|
1248
1254
|
- app/models/spree_cm_commissioner/webhooks.rb
|
@@ -1339,6 +1345,7 @@ files:
|
|
1339
1345
|
- app/overrides/spree/admin/stores/form/_layout/default_notification_image.html.erb.deface
|
1340
1346
|
- app/overrides/spree/admin/taxonomies/_form/kind.html.erb.deface
|
1341
1347
|
- app/overrides/spree/admin/taxons/_form/assets_form.html.erb.deface
|
1348
|
+
- app/overrides/spree/admin/taxons/_form/available_on.html.erb.deface
|
1342
1349
|
- app/overrides/spree/admin/taxons/_form/background_color_and_foreground_color.html.erb.deface
|
1343
1350
|
- app/overrides/spree/admin/taxons/_form/custom_redirect_url.html.erb.deface
|
1344
1351
|
- app/overrides/spree/admin/taxons/_form/kind_html.erb.deface
|
@@ -1442,17 +1449,28 @@ files:
|
|
1442
1449
|
- app/serializers/spree/v2/tenant/address_serializer.rb
|
1443
1450
|
- app/serializers/spree/v2/tenant/asset_serializer.rb
|
1444
1451
|
- app/serializers/spree/v2/tenant/base_serializer.rb
|
1452
|
+
- app/serializers/spree/v2/tenant/customer_notification_serializer.rb
|
1453
|
+
- app/serializers/spree/v2/tenant/digital_link_serializer.rb
|
1445
1454
|
- app/serializers/spree/v2/tenant/guest_serializer.rb
|
1446
1455
|
- app/serializers/spree/v2/tenant/homepage_section_relatable_serializer.rb
|
1447
1456
|
- app/serializers/spree/v2/tenant/homepage_section_serializer.rb
|
1457
|
+
- app/serializers/spree/v2/tenant/image_serializer.rb
|
1458
|
+
- app/serializers/spree/v2/tenant/line_item_serializer.rb
|
1459
|
+
- app/serializers/spree/v2/tenant/notification_serializer.rb
|
1460
|
+
- app/serializers/spree/v2/tenant/option_type_serializer.rb
|
1461
|
+
- app/serializers/spree/v2/tenant/option_value_serializer.rb
|
1462
|
+
- app/serializers/spree/v2/tenant/order_serializer.rb
|
1448
1463
|
- app/serializers/spree/v2/tenant/role_serializer.rb
|
1449
1464
|
- app/serializers/spree/v2/tenant/s3_signed_url_serializer.rb
|
1465
|
+
- app/serializers/spree/v2/tenant/stock_item_serializer.rb
|
1466
|
+
- app/serializers/spree/v2/tenant/stock_location_serializer.rb
|
1450
1467
|
- app/serializers/spree/v2/tenant/taxon_serializer.rb
|
1451
1468
|
- app/serializers/spree/v2/tenant/taxonomy_serializer.rb
|
1452
1469
|
- app/serializers/spree/v2/tenant/user_device_token_serializer.rb
|
1453
1470
|
- app/serializers/spree/v2/tenant/user_identity_provider_serializer.rb
|
1454
1471
|
- app/serializers/spree/v2/tenant/user_profile_serializer.rb
|
1455
1472
|
- app/serializers/spree/v2/tenant/user_serializer.rb
|
1473
|
+
- app/serializers/spree/v2/tenant/variant_serializer.rb
|
1456
1474
|
- app/serializers/spree/v2/tenant/vendor_image_serializer.rb
|
1457
1475
|
- app/serializers/spree/v2/tenant/vendor_serializer.rb
|
1458
1476
|
- app/serializers/spree_cm_commissioner/api/v2/platform/digital_serializer_decorator.rb
|
@@ -1506,6 +1524,7 @@ files:
|
|
1506
1524
|
- app/serializers/spree_cm_commissioner/v2/storefront/user_contact_serializer.rb
|
1507
1525
|
- app/serializers/spree_cm_commissioner/v2/storefront/user_identity_provider_serializer.rb
|
1508
1526
|
- app/serializers/spree_cm_commissioner/v2/storefront/vendor_include_product_serializer.rb
|
1527
|
+
- app/serializers/spree_cm_commissioner/v2/storefront/video_serializer.rb
|
1509
1528
|
- app/serializers/spree_cm_commissioner/v2/storefront/waiting_room_session_serializer.rb
|
1510
1529
|
- app/services/.gitkeep
|
1511
1530
|
- app/services/sms_adapter/base.rb
|
@@ -2252,6 +2271,9 @@ files:
|
|
2252
2271
|
- db/migrate/20250304101946_create_spree_cm_commissioner_invite_user_taxon.rb
|
2253
2272
|
- db/migrate/20250304155234_add_meta_data_to_spree_vendors.rb
|
2254
2273
|
- db/migrate/20250307013422_add_parent_id_to_cm_place.rb
|
2274
|
+
- db/migrate/20250307073003_add_tenant_id_to_cm_customer_notifications.rb
|
2275
|
+
- db/migrate/20250307083809_remove_tenant_id_from_cm_notifications.rb
|
2276
|
+
- db/migrate/20250314013434_add_available_on_to_spree_taxons.rb
|
2255
2277
|
- docker-compose.yml
|
2256
2278
|
- docs/option_types/attr_types.md
|
2257
2279
|
- docs/private_key.pem
|