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: 864537115c595bfaceea9814dc384e7222a3abeb31fa45259fc599825b1b1b01
4
- data.tar.gz: 7c303f30a308cf6f60d385c433f317f46b2a84705aab0a45d78e56a8077aa423
3
+ metadata.gz: 06c1577eb9677bc332a321a3bea0537a253b4891856aa7c49441a03df5be3510
4
+ data.tar.gz: ad936214c5840d39c0099841b95f05628571cb5a1cf674f1f679193c5a3caf29
5
5
  SHA512:
6
- metadata.gz: e34e1bab5800f33773575c65a42ad62d199f9beb0ff9e775f73f625289556c3626cf49da9f803d4c00d85cf3c1738212ff7693838afdf3e8d72475a3f9a83c77
7
- data.tar.gz: 427c919bc1cab30097969d5260e4d18a5693bffce33e57c76d911d1ec4a7bdad88f793a327e16f6a34828e9dd5575e57ab35d9a35dc7a71ec4b6ad2745c117cb
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}
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.1.76".freeze
3
+ VERSION = "0.1.78".freeze
4
4
  end
5
5
  end
@@ -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 { Faker::Lorem.word }
5
+ status { Comee::Core::ItemStatus::INITIALIZED }
6
6
  status_date { Date.current }
7
7
  details { {} }
8
8
  remark { Faker::Lorem.sentence }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comee_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.76
4
+ version: 0.1.78
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.