cats_core 1.3.25 → 1.3.26
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: 2f481bcc7803014db0c3db658b15064be22767d067276c5c89dbf783ae38b3af
|
4
|
+
data.tar.gz: 316ad648dcbb23aa8615354922c83c0aa287f6a66f5520fe2bf50ba42d757295
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d4ea070ce7b41661c532d8e5f6b7d9f499ac7d566698681e603c331aef729d2341b70d16df730f5d8d9f0bd947e8c391afe40244de26af2c1428a407a043076
|
7
|
+
data.tar.gz: ee48e5c321a596e34cd9215dfe8b8219e67cbd9c9e8e392dc620a94e68b5220e04795a65267c24063f40b90a5f30f913acab6b82b5770a2b49c649e0719d8cb5
|
@@ -14,9 +14,19 @@ module Cats
|
|
14
14
|
|
15
15
|
# Arrival Statuses
|
16
16
|
AT_SOURCE = 'At Source'.freeze
|
17
|
-
|
17
|
+
AT_ORIGIN_PORT = 'At Origin Port'.freeze
|
18
|
+
IN_LOCAL_TRANSIT = 'In Local Transit'.freeze
|
19
|
+
IN_INTERNATIONAL_TRANSIT = 'In International Transit'.freeze
|
20
|
+
AT_DESTINATION_PORT = 'At Destination Port'.freeze
|
18
21
|
ARRIVED = 'Arrived'.freeze
|
19
|
-
ARRIVAL_STATUSES = [
|
22
|
+
ARRIVAL_STATUSES = [
|
23
|
+
AT_SOURCE,
|
24
|
+
AT_ORIGIN_PORT,
|
25
|
+
IN_LOCAL_TRANSIT,
|
26
|
+
IN_INTERNATIONAL_TRANSIT,
|
27
|
+
AT_DESTINATION_PORT,
|
28
|
+
ARRIVED
|
29
|
+
].freeze
|
20
30
|
|
21
31
|
belongs_to :unit_of_measure
|
22
32
|
belongs_to :source, polymorphic: true
|
@@ -11,7 +11,7 @@ module Cats
|
|
11
11
|
belongs_to :commodity_category, optional: true
|
12
12
|
belongs_to :unit_of_measure, optional: true
|
13
13
|
|
14
|
-
validates :reference_no, :amount, :donation_type, :donated_on, presence: true
|
14
|
+
validates :reference_no, :amount, :donation_type, :donated_on, :agency, presence: true
|
15
15
|
validates :reference_no, uniqueness: true
|
16
16
|
validates :donation_type, inclusion: { in: DONATION_TYPES }
|
17
17
|
validates :currency, presence: true, if: -> { donation_type == CASH }
|
@@ -5,6 +5,7 @@ class CreateCatsCoreDonations < ActiveRecord::Migration[6.1]
|
|
5
5
|
t.string :description
|
6
6
|
t.string :donation_type, null: false
|
7
7
|
t.date :donated_on, null: false
|
8
|
+
t.string :agency, null: false
|
8
9
|
t.references :donor,
|
9
10
|
null: false,
|
10
11
|
index: { name: 'donor_on_donation_indx' },
|
data/lib/cats/core/version.rb
CHANGED
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.3.
|
4
|
+
version: 1.3.26
|
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-02-
|
11
|
+
date: 2022-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|