cats_core 1.4.45 → 1.4.46

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 710ffdc5b10d0f97aa5f40aaa8e67a99eaea21120c0b96894d46f86a47b10312
4
- data.tar.gz: 3c1b7594b8717c668bb9f38d481afa54057005f524171bd3c088fdf6047344b2
3
+ metadata.gz: 35e8eb4c24f3e5499dae203f071d84e56efc538665557820ebb0c0c4b56a8d8e
4
+ data.tar.gz: fe6f7c522a28fcbdc53c0f61dfc7b0844970564de93952c134965055c0501cb3
5
5
  SHA512:
6
- metadata.gz: 4b522fa9d586d12f3255b0a9044caff4c8b694e336e3b284a657bc14d2f10a0e10ad3fce4d082784b65435bd73c396b8a593c6c7630bc90b9ac1388bf6f51915
7
- data.tar.gz: 46fbc7ca6360f71e4f6cc992f03a3711b302f2f351c7dca8996999cee8c8eaf196321324bf9ed3f6bf16940c04f5224c72bd5124147663a7b4533aeddd9f27bd
6
+ metadata.gz: 5fad95b3e3b72ab44e84cb72954d9f825a2ff40be3c615685be577fd49e54fb123f6e6b4be4ad42ea1008bd9f64c2e42091666fad8f1c7e6546cb6368e1ae83b
7
+ data.tar.gz: 385a523e608cf19f3871495b94d0b3c52621bb14caaaf164daf13c08509e24a64b3fe4a044443d0cef1952a6899ce1e760c9dcfbe04cae29265bb9f8819fd1f3
@@ -60,7 +60,7 @@ module Cats
60
60
  def name
61
61
  # For this to be efficient, our query should use includes like
62
62
  # Commodity.includes(project: { source: commodity_category })
63
- project.source.commodity_category.name
63
+ project.source.commodity_name
64
64
  end
65
65
 
66
66
  def validate_updateability
@@ -21,7 +21,8 @@ module Cats
21
21
  validates :stack_status, inclusion: { in: STACK_STATUSES }
22
22
  validate :validate_coordinates, :validate_dimensions, :validate_distance_from_wall, :validate_overlap,
23
23
  :validate_space_between_stack, :validate_max_height, :validate_max_length, :validate_max_width,
24
- :validate_distance_from_ceiling, unless: -> { store && store.code == 'SUP-STORE' }
24
+ :validate_distance_from_ceiling,
25
+ unless: -> { store && (store.code == 'SUP-STORE' || store.code.start_with?('FDP;')) }
25
26
 
26
27
  delegate :batch_no, to: :commodity, prefix: true
27
28
 
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.4.45'.freeze
3
+ VERSION = '1.4.46'.freeze
4
4
  end
5
5
  end
@@ -2,7 +2,7 @@ FactoryBot.define do
2
2
  factory :dispatch_plan_item, class: 'Cats::Core::DispatchPlanItem' do
3
3
  reference_no { FFaker::Name.name }
4
4
  source factory: :location
5
- destination factory: :location
5
+ destination factory: :woreda
6
6
  dispatch_plan
7
7
  quantity { 100 }
8
8
  unit factory: :unit_of_measure
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cats_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.45
4
+ version: 1.4.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-27 00:00:00.000000000 Z
11
+ date: 2022-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers