spree_cm_commissioner 2.12.1 → 2.12.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/Gemfile.lock +1 -1
- data/app/models/spree_cm_commissioner/product_decorator.rb +4 -12
- data/app/models/spree_cm_commissioner/stock/availability_validator_decorator.rb +5 -0
- data/config/locales/en.yml +5 -4
- data/config/locales/km.yml +1 -0
- data/lib/spree_cm_commissioner/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 518b50594502cdd95eb7710824cb6f8a104974d44e9602f2babb3235bcc17559
|
|
4
|
+
data.tar.gz: 4906dc6a8f57707ebf5fcb9712b6a074bbef1af0437e14923f61f2ff6606c32e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 67a54630258eda9e5bf72e26ce22177d6b1ce8da399d71434319403f1df8d4a71469ec115f7015b7b9064544688fe833f3230329e456e09eeb88b4f8a488212c
|
|
7
|
+
data.tar.gz: 6aa524ac8653f151fd629c4bef58258212ee3eb67f5f1bba328f7e3e964c4efb9f67ec9692c359c80f4b2d8abac088541b7b692503d02bb8afecedc21e550072
|
data/Gemfile.lock
CHANGED
|
@@ -195,18 +195,10 @@ module SpreeCmCommissioner
|
|
|
195
195
|
end
|
|
196
196
|
end
|
|
197
197
|
|
|
198
|
-
#
|
|
199
|
-
#
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
# one place — mirrors VariantDecorator#discontinued?'s window check.
|
|
203
|
-
def available?
|
|
204
|
-
return false unless active?
|
|
205
|
-
return false if deleted?
|
|
206
|
-
return false if discontinued?
|
|
207
|
-
return false if available_on.present? && available_on > Time.current
|
|
208
|
-
|
|
209
|
-
true
|
|
198
|
+
# Not yet on sale. Kept separate from available? so a scheduled product's real stock still
|
|
199
|
+
# shows via in_stock? — Stock::AvailabilityValidatorDecorator checks this to block add-to-cart.
|
|
200
|
+
def scheduled?
|
|
201
|
+
available_on.present? && available_on > Time.current
|
|
210
202
|
end
|
|
211
203
|
|
|
212
204
|
private
|
|
@@ -15,6 +15,11 @@ module SpreeCmCommissioner
|
|
|
15
15
|
# skipping it here means we never even build a checker for them.
|
|
16
16
|
return if line_item.order&.ticket_transfer?
|
|
17
17
|
|
|
18
|
+
# scheduled? isn't checked anywhere else (product.available?/variant.discontinued? are, via
|
|
19
|
+
# can_supply? below) — a scheduled product must still read in_stock? true, so its sale
|
|
20
|
+
# window is enforced here instead.
|
|
21
|
+
return add_inactive_product_error(line_item) if !line_item.product.available? || line_item.product.scheduled?
|
|
22
|
+
|
|
18
23
|
checker = SpreeCmCommissioner::Stock::LineItemAvailabilityChecker.new(line_item).checker
|
|
19
24
|
return if checker.can_supply?(quantity)
|
|
20
25
|
|
data/config/locales/en.yml
CHANGED
|
@@ -497,6 +497,7 @@ en:
|
|
|
497
497
|
# Overrides Spree core's "selected of %{item} is not available." Must stay under
|
|
498
498
|
# `spree:` -- Spree::Stock::AvailabilityValidator looks it up as Spree.t(:selected_quantity_not_available).
|
|
499
499
|
selected_quantity_not_available: "Sorry, not enough %{item} left. Please choose fewer or try again in a few minutes."
|
|
500
|
+
only_active_products_can_be_added_to_cart: "Sorry, this product isn't available for purchase right now."
|
|
500
501
|
auto_apply: "Auto apply"
|
|
501
502
|
auto_apply_info: "Path & code will be removed"
|
|
502
503
|
transit:
|
|
@@ -769,11 +770,11 @@ en:
|
|
|
769
770
|
attributes:
|
|
770
771
|
base:
|
|
771
772
|
last_contestant_in_parent_session: 'cannot remove the last contestant from "%{session_name}" because child sessions depend on it'
|
|
772
|
-
advanced_from_session:
|
|
773
|
-
pre_vote_session:
|
|
774
|
-
has_advanced_to_session:
|
|
773
|
+
advanced_from_session: "was advanced from a previous session and cannot be removed directly. Clear the advancement in the source session instead."
|
|
774
|
+
pre_vote_session: "cannot be removed from a pre-vote session."
|
|
775
|
+
has_advanced_to_session: "has been assigned to advance to another session. Clear the advancement first before removing this contestant."
|
|
775
776
|
advanced_to_id:
|
|
776
|
-
same_as_advanced_from:
|
|
777
|
+
same_as_advanced_from: "cannot be the same as the contestant it was advanced from"
|
|
777
778
|
spree_cm_commissioner/voting_credit:
|
|
778
779
|
attributes:
|
|
779
780
|
free_votes_amount:
|
data/config/locales/km.yml
CHANGED
|
@@ -403,6 +403,7 @@ km:
|
|
|
403
403
|
upsupported_payment: "មិនស្គាល់ការបង់ប្រាក់"
|
|
404
404
|
selected_item_not_available_on_date: "Selected item not available on %{date}"
|
|
405
405
|
selected_quantity_not_available: "សូមអភ័យទោស %{item} នៅសល់មិនគ្រប់គ្រាន់។ សូមរើសចំនួនតិច ឬព្យាយាមម្តងទៀត។"
|
|
406
|
+
only_active_products_can_be_added_to_cart: "សូមអភ័យទោស ទំនិញនេះមិនទាន់អាចទិញបានទេនៅពេលនេះ។"
|
|
406
407
|
auto_apply: "ដាក់ប្រើដោយស្វ័យប្រវត្តិ"
|
|
407
408
|
auto_apply_info: "Path & code will be removed"
|
|
408
409
|
device_tokens: "Device Tokens"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_cm_commissioner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.12.
|
|
4
|
+
version: 2.12.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- You
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: spree
|