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: ba8c12bbc2cf042ff4495ad2904ac358232dea551250cfd02e1c258a5e148312
4
- data.tar.gz: 3133589fe50afa51b5247cd88842928ea7434a708ac9bb3f99b98da5f61e3d4c
3
+ metadata.gz: d71a8200c433afbae99cbd4b1ca79c35eee1213e1192ebe7e0af4094f172bc41
4
+ data.tar.gz: fa8fd302ec0376de853aa014d980f261c6cbabe517c1f7a5e1723a887271a98e
5
5
  SHA512:
6
- metadata.gz: 26e48d06b60d6f9da7224c04c5df4e760778ea8e253f3930ee623fc166a39523a34278d87dfebfcd7259cf319afcb2dc4719f07630c01a1f0f342daaac60159f
7
- data.tar.gz: 2eb7f8d6a270cce93c30603263aaa763be27f0558954e00bd23141786469089c77eae6233512d20351bf3f694ff30aae453d5ad7095682de3e340e31face02be
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]
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.1.77".freeze
3
+ VERSION = "0.1.79".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 }
@@ -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 { Faker::Lorem.word }
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) }
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.77
4
+ version: 0.1.79
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.