cats_core 1.2.23 → 1.2.27
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_bid.rb +1 -0
- data/app/models/cats/core/transport_bid_item.rb +1 -0
- data/app/models/cats/core/transport_contract.rb +5 -0
- data/db/migrate/20211229160127_create_cats_core_transport_contracts.rb +5 -0
- data/lib/cats/core/version.rb +1 -1
- data/spec/factories/cats/core/transport_contracts.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dd652b6eeefe39811487b8fa993471b4f61c3692a8a1400ff929612ae7a6138
|
4
|
+
data.tar.gz: 224e2b50ff72bf811c3a9a9acaf34f1bd24eeab09729e7ad0a04503e7d671785
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6d3e915bb2150d9d6cbeb62e571b100970ac74b8517cf96cc94f2b9c3517d0a40328aca7c55cab359991f27b090ce28d732e062a74d2188112839c61cc13f47
|
7
|
+
data.tar.gz: c25d23f1eb76225dbb67bedcd439fc11ae1f2aaa6bd951f72af81bd00f6647a69861415f2c6da247a1f709da75fde33bb31e702f08228b6424018967996ea5d6
|
@@ -9,6 +9,7 @@ module Cats
|
|
9
9
|
STATUSES = [NEW, OPEN, CLOSED, RANKED, WINNERS_DECLARED].freeze
|
10
10
|
|
11
11
|
has_many :transport_bid_items
|
12
|
+
has_many :transport_offers, through: :transport_bid_items
|
12
13
|
|
13
14
|
validates :reference_no, presence: true, uniqueness: true
|
14
15
|
validates :start_date, :end_date, :status, presence: true
|
@@ -3,8 +3,13 @@ module Cats
|
|
3
3
|
class TransportContract < ApplicationRecord
|
4
4
|
belongs_to :region, class_name: 'Cats::Core::Location'
|
5
5
|
belongs_to :transporter
|
6
|
+
belongs_to :transport_bid
|
6
7
|
|
7
8
|
validates :contract_date, :expires_on, presence: true
|
9
|
+
|
10
|
+
delegate(:name, to: :region, prefix: true)
|
11
|
+
delegate(:name, to: :transporter, prefix: true)
|
12
|
+
delegate(:reference_no, to: :transport_bid, prefix: :bid)
|
8
13
|
end
|
9
14
|
end
|
10
15
|
end
|
@@ -9,9 +9,14 @@ class CreateCatsCoreTransportContracts < ActiveRecord::Migration[6.1]
|
|
9
9
|
null: false,
|
10
10
|
index: { name: 'transporter_on_tc_indx' },
|
11
11
|
foreign_key: { to_table: :cats_core_transporters }
|
12
|
+
t.references :transport_bid,
|
13
|
+
null: false,
|
14
|
+
index: { name: 'tb_on_tc_indx' },
|
15
|
+
foreign_key: { to_table: :cats_core_transport_bids }
|
12
16
|
t.date :contract_date, null: false
|
13
17
|
t.date :expires_on, null: false
|
14
18
|
t.string :payment_term
|
19
|
+
t.boolean :signed, null: false, default: false
|
15
20
|
|
16
21
|
t.timestamps
|
17
22
|
end
|
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.2.
|
4
|
+
version: 1.2.27
|
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-12-
|
11
|
+
date: 2021-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|
@@ -439,7 +439,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
439
439
|
requirements:
|
440
440
|
- - ">="
|
441
441
|
- !ruby/object:Gem::Version
|
442
|
-
version:
|
442
|
+
version: 3.0.2
|
443
443
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
444
444
|
requirements:
|
445
445
|
- - ">="
|