cats_core 1.1.27 → 1.1.31

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: 2ccbe595a5539e596c53112adcf86365ae6001df0fb47ebd51dad59ce5c3429c
4
- data.tar.gz: 85d16f249aaa79b9b6dd84a813f694cf2cfec498932670a21df5b308aae1b207
3
+ metadata.gz: b571da2ebc4626e336d086166396fcd2c653d68f579344ca3676b51af2039ea9
4
+ data.tar.gz: ac911493b34fd36b4fa10c880712450606e6f53c4cefc2e11490914f87b029c5
5
5
  SHA512:
6
- metadata.gz: f354c929384af4351df0bd1c29286a298ef2ab94eae44571eebe876f3179b7a6975dcef33bda0c66ef0b97169ca640fa065a4fb6e1d88b02af8bc7f57fa15900
7
- data.tar.gz: a360e9958396935694d2e4cbd08cca4170105f818b19c29e5cdca6c37ebbee5c5d48395f9ba8588ba782421883565798377e3d5bb2ce0218cd53dda0cffc8089
6
+ metadata.gz: cc57fb3aaad06227d4a802a70810ff56a1b0552d3b63014026942c79a0fd3c4cc1b0c954fb4629ff52d8e0b516fbad4c4c63b065b5df5ca8d4a9752bf80e20f4
7
+ data.tar.gz: 6f788725919d5a6627410ded3a6c046a21abe7d7f1efb48de82592a8221dddb917fa6fbd1e7f086b02d1c8172ce42cae46ed6b100ec6b8b1ab95e658c01622d3
@@ -20,7 +20,7 @@ module Cats
20
20
  validates :commodity_status, inclusion: { in: Cats::Core::Commodity::COMMODITY_STATUSES }
21
21
  validates :stack_status, inclusion: { in: STACK_STATUSES }
22
22
  validate :validate_coordinates, :validate_dimensions, :validate_distance_from_wall, :validate_overlap,
23
- :validate_space_between_stack
23
+ :validate_space_between_stack, unless: -> { store && store.code == 'SUP-STORE' }
24
24
 
25
25
  after_save :update_store_space
26
26
 
@@ -1,3 +1,7 @@
1
- class CommodityCategorySerializer < ActiveModel::Serializer
2
- attributes :id, :code, :name, :description, :parent_id
1
+ module Cats
2
+ module Core
3
+ class CommodityCategorySerializer < ActiveModel::Serializer
4
+ attributes :id, :code, :name, :description, :parent_id
5
+ end
6
+ end
3
7
  end
@@ -1,3 +1,7 @@
1
- class CurrencySerializer < ActiveModel::Serializer
2
- attributes :id, :code, :name
1
+ module Cats
2
+ module Core
3
+ class CurrencySerializer < ActiveModel::Serializer
4
+ attributes :id, :code, :name
5
+ end
6
+ end
3
7
  end
@@ -1,8 +1,12 @@
1
- class DispatchSerializer < ActiveModel::Serializer
2
- attributes :id, :reference_no, :allocation_item_id, :transporter_id, :transporter_name, :plate_no, :driver_name,
3
- :driver_phone, :quantity, :remark, :prepared_by_id, :prepared_by_email, :dispatch_status, :destination
1
+ module Cats
2
+ module Core
3
+ class DispatchSerializer < ActiveModel::Serializer
4
+ attributes :id, :reference_no, :allocation_item_id, :transporter_id, :transporter_name, :plate_no, :driver_name,
5
+ :driver_phone, :quantity, :remark, :prepared_by_id, :prepared_by_email, :dispatch_status, :destination
4
6
 
5
- def destination
6
- object.allocation_item.destination.name
7
+ def destination
8
+ object.allocation_item.destination.name
9
+ end
10
+ end
7
11
  end
8
12
  end
@@ -1,4 +1,8 @@
1
- class DispatchTransactionSerializer < ActiveModel::Serializer
2
- attributes :id, :source_id, :source_code, :destination_id, :destination_reference_no, :quantity, :transaction_date,
3
- :status
1
+ module Cats
2
+ module Core
3
+ class DispatchTransactionSerializer < ActiveModel::Serializer
4
+ attributes :id, :source_id, :source_code, :destination_id, :destination_reference_no, :quantity,
5
+ :transaction_date, :status
6
+ end
7
+ end
4
8
  end
@@ -1,3 +1,7 @@
1
- class LocationSerializer < ActiveModel::Serializer
2
- attributes :id, :code, :name, :location_type, :description, :parent_id
1
+ module Cats
2
+ module Core
3
+ class LocationSerializer < ActiveModel::Serializer
4
+ attributes :id, :code, :name, :location_type, :description, :parent_id
5
+ end
6
+ end
3
7
  end
@@ -1,4 +1,8 @@
1
- class ReceiptSerializer < ActiveModel::Serializer
2
- attributes :id, :dispatch_id, :dispatch_reference_no, :commodity_status, :quantity, :status, :remark,
3
- :prepared_by_id, :prepared_by_email
1
+ module Cats
2
+ module Core
3
+ class ReceiptSerializer < ActiveModel::Serializer
4
+ attributes :id, :dispatch_id, :dispatch_reference_no, :commodity_status, :quantity, :status, :remark,
5
+ :prepared_by_id, :prepared_by_email
6
+ end
7
+ end
4
8
  end
@@ -1,8 +1,12 @@
1
- class ReceiptTransactionSerializer < ActiveModel::Serializer
2
- attributes :id, :source_id, :dispatch_reference, :destination_id, :destination_code, :quantity, :transaction_date,
3
- :status
1
+ module Cats
2
+ module Core
3
+ class ReceiptTransactionSerializer < ActiveModel::Serializer
4
+ attributes :id, :source_id, :dispatch_reference, :destination_id, :destination_code, :quantity, :transaction_date,
5
+ :status
4
6
 
5
- def dispatch_reference
6
- object.source.dispatch.reference_no
7
+ def dispatch_reference
8
+ object.source.dispatch.reference_no
9
+ end
10
+ end
7
11
  end
8
12
  end
@@ -1,3 +1,7 @@
1
- class RoleSerializer < ActiveModel::Serializer
2
- attributes :id, :name, :application_module_id
1
+ module Cats
2
+ module Core
3
+ class RoleSerializer < ActiveModel::Serializer
4
+ attributes :id, :name, :application_module_id
5
+ end
6
+ end
3
7
  end
@@ -1,3 +1,7 @@
1
- class UnitOfMeasureSerializer < ActiveModel::Serializer
2
- attributes :id, :abbreviation, :name, :unit_type
1
+ module Cats
2
+ module Core
3
+ class UnitOfMeasureSerializer < ActiveModel::Serializer
4
+ attributes :id, :abbreviation, :name, :unit_type
5
+ end
6
+ end
3
7
  end
@@ -1,3 +1,7 @@
1
- class UserSerializer < ActiveModel::Serializer
2
- attributes :id, :first_name, :last_name, :email, :phone_number, :active, :details, :application_module_id
1
+ module Cats
2
+ module Core
3
+ class UserSerializer < ActiveModel::Serializer
4
+ attributes :id, :first_name, :last_name, :email, :phone_number, :active, :details, :application_module_id
5
+ end
6
+ end
3
7
  end
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.1.27'.freeze
3
+ VERSION = '1.1.31'.freeze
4
4
  end
5
5
  end
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.1.27
4
+ version: 1.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-07 00:00:00.000000000 Z
11
+ date: 2021-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers
@@ -409,7 +409,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
409
409
  - !ruby/object:Gem::Version
410
410
  version: '0'
411
411
  requirements: []
412
- rubygems_version: 3.2.15
412
+ rubygems_version: 3.2.22
413
413
  signing_key:
414
414
  specification_version: 4
415
415
  summary: Core module for CATS applications