comee_core 0.1.76 → 0.1.78
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: 06c1577eb9677bc332a321a3bea0537a253b4891856aa7c49441a03df5be3510
|
4
|
+
data.tar.gz: ad936214c5840d39c0099841b95f05628571cb5a1cf674f1f679193c5a3caf29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f8d8ffaee5ab3d44e724500e7b17e65a6976685188c2b6c4d2f7125b5c10994b8e83b7ec3735ae9324ff838b329d665f40358625a4a4d9367950e5c9dd3964f
|
7
|
+
data.tar.gz: b0701d9dcc27073443ea023bc9672907e8b1f60b1f1d8cfda316f3d498069e4731a3daa46dfd447ed77002a2b31b3f610a61fa668dd3724a316e280b3fbd9fe5
|
@@ -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]
|
@@ -4,6 +4,7 @@ module Comee
|
|
4
4
|
enum :status, {active: 0, completed: 1}
|
5
5
|
|
6
6
|
belongs_to :sales_order_item
|
7
|
+
has_many :item_statuses
|
7
8
|
|
8
9
|
validates :handover_date, :delivery_date, :shipment_status, :status, presence: true
|
9
10
|
validates :quantity, presence: true, numericality: {greater_than: 0}
|
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 }
|