cats_core 1.4.11 → 1.4.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/cats/core/transport_order.rb +2 -1
- data/app/models/cats/core/transport_order_item.rb +1 -1
- data/db/migrate/20220506082329_create_cats_core_transport_orders.rb +2 -1
- data/db/migrate/20220506083042_create_cats_core_transport_order_items.rb +0 -1
- data/lib/cats/core/version.rb +1 -1
- data/spec/factories/cats/core/transport_order_items.rb +0 -1
- data/spec/factories/cats/core/transport_orders.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3724badb244476dc73d7c35fac9971114160be9781ba3a386f2d35ef70226324
|
4
|
+
data.tar.gz: 9f29cd5757d75472e03f8baa3bd4421fc78109d50612955ebdd666a354c17ca6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5a859815e6420692ab833b54372ae47c0fbf835b8384c8d18421eadb79125deb3a2c91ae740dfb9abe1817bf7e01e45cc14312e94d95aaadaade3e767a64dfe
|
7
|
+
data.tar.gz: a85113ab315551f8684accc9d21345b684d9762c73bfc44538bf6d8ac30a4d8e1f2aea24620fc0ebdee000f97de0ae18745b72a28a68cb6f44f6e3b9b184b209
|
@@ -7,9 +7,10 @@ module Cats
|
|
7
7
|
|
8
8
|
belongs_to :transport_requisition
|
9
9
|
belongs_to :prepared_by, class_name: 'Cats::Core::User'
|
10
|
-
belongs_to :approved_by, class_name: 'Cats::Core::User'
|
10
|
+
belongs_to :approved_by, class_name: 'Cats::Core::User', optional: true
|
11
11
|
|
12
12
|
validates :status, presence: true, inclusion: { in: STATUSES }
|
13
|
+
validates :order_date, presence: true
|
13
14
|
validate :validate_against_requisition
|
14
15
|
|
15
16
|
def validate_against_requisition
|
@@ -6,7 +6,7 @@ module Cats
|
|
6
6
|
belongs_to :transport_requisition_item
|
7
7
|
belongs_to :transport_contract, optional: true
|
8
8
|
|
9
|
-
validates :
|
9
|
+
validates :valid_for, presence: true
|
10
10
|
validates :valid_for, numericality: { greater_than: 0 }
|
11
11
|
validates :transport_requisition_item_id, uniqueness: true
|
12
12
|
validate :validate_requisition
|
@@ -10,9 +10,10 @@ class CreateCatsCoreTransportOrders < ActiveRecord::Migration[7.0]
|
|
10
10
|
index: { name: 'pb_on_to_indx' },
|
11
11
|
foreign_key: { to_table: :cats_core_users }
|
12
12
|
t.references :approved_by,
|
13
|
-
null:
|
13
|
+
null: true,
|
14
14
|
index: { name: 'ab_on_to_indx' },
|
15
15
|
foreign_key: { to_table: :cats_core_users }
|
16
|
+
t.date :order_date, null: false
|
16
17
|
t.string :status, null: false, default: 'Draft'
|
17
18
|
|
18
19
|
t.timestamps
|
@@ -17,7 +17,6 @@ class CreateCatsCoreTransportOrderItems < ActiveRecord::Migration[7.0]
|
|
17
17
|
null: false,
|
18
18
|
index: { name: 'tri_on_toi_indx' },
|
19
19
|
foreign_key: { to_table: :cats_core_transport_requisition_items }
|
20
|
-
t.date :order_date, null: false, default: Date.today
|
21
20
|
t.integer :valid_for, null: false, default: 10
|
22
21
|
|
23
22
|
t.timestamps
|
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.4.
|
4
|
+
version: 1.4.12
|
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-05-
|
11
|
+
date: 2022-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|