comee_core 0.1.77 → 0.1.79
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d71a8200c433afbae99cbd4b1ca79c35eee1213e1192ebe7e0af4094f172bc41
|
4
|
+
data.tar.gz: fa8fd302ec0376de853aa014d980f261c6cbabe517c1f7a5e1723a887271a98e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62e97416902c0185884d83f89bd19ea26a0b02e9a7aae46c8e144a57c2adeb9207fe577899490617eb75a2aadbcf868e30ec5443d0e8ffb12c7beef5f81acaee
|
7
|
+
data.tar.gz: 44d4a262ac39c7e97c7096cdc214ed842bf1f764d4b4233038decf27ef38fbcef8aba9d5e60622ba2ce9674ba7fc2775847c5775c615eaf0e7dda4972dc0df6e
|
@@ -8,7 +8,7 @@ module Comee
|
|
8
8
|
validates :code, :name, :address, :locale, presence: true
|
9
9
|
validates :code, uniqueness: true
|
10
10
|
|
11
|
-
delegate(:name, to: :user, prefix: true)
|
11
|
+
delegate(:name, to: :user, prefix: true, allow_nil: true)
|
12
12
|
|
13
13
|
def self.ransackable_attributes(_auth_object = nil)
|
14
14
|
%w[
|
@@ -6,9 +6,12 @@ module Comee
|
|
6
6
|
COMPLETELY_PICKED_AND_PACKED = "Completely Picked & Packed".freeze
|
7
7
|
PARTIALLY_PICKED_AND_PACKED = "Partially Picked & Packed".freeze
|
8
8
|
|
9
|
+
STATUSES = [INITIALIZED, DELIVERY_NOTE_CREATED, COMPLETELY_PICKED_AND_PACKED, PARTIALLY_PICKED_AND_PACKED].freeze
|
10
|
+
|
9
11
|
belongs_to :shipment_item
|
10
12
|
|
11
13
|
validates :hash_code, :status, :status_date, presence: true
|
14
|
+
validates :status, inclusion: {in: STATUSES}
|
12
15
|
|
13
16
|
def self.ransackable_attributes(_auth_object = nil)
|
14
17
|
%w[hash_code status status_date sales_order_item_id]
|
data/lib/comee/core/version.rb
CHANGED
@@ -2,7 +2,7 @@ FactoryBot.define do
|
|
2
2
|
factory :item_status, class: "Comee::Core::ItemStatus" do
|
3
3
|
hash_code { "abcdefg".hash }
|
4
4
|
shipment_item
|
5
|
-
status {
|
5
|
+
status { Comee::Core::ItemStatus::INITIALIZED }
|
6
6
|
status_date { Date.current }
|
7
7
|
details { {} }
|
8
8
|
remark { Faker::Lorem.sentence }
|
@@ -2,7 +2,7 @@ FactoryBot.define do
|
|
2
2
|
factory :shipment_item, class: "Comee::Core::ShipmentItem" do
|
3
3
|
sales_order_item
|
4
4
|
quantity { 50 }
|
5
|
-
shipment_status {
|
5
|
+
shipment_status { Comee::Core::ItemStatus::INITIALIZED }
|
6
6
|
status { Comee::Core::ShipmentItem.statuses[:active] }
|
7
7
|
handover_date { Date.current.advance(days: 3) }
|
8
8
|
delivery_date { Date.current.advance(days: 6) }
|