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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fe0f87a2452fb8bcafe40ece45a769789b6b576cab27cdf0867507acc79338e
4
- data.tar.gz: 967feac1199b16fe037295cb805c3cb9cf7234b37e03641af952bf1ffc7e624d
3
+ metadata.gz: 5dd652b6eeefe39811487b8fa993471b4f61c3692a8a1400ff929612ae7a6138
4
+ data.tar.gz: 224e2b50ff72bf811c3a9a9acaf34f1bd24eeab09729e7ad0a04503e7d671785
5
5
  SHA512:
6
- metadata.gz: 01ce4d95e2c647519e65a19b109a81229bae931aa0af07cf719f9a2f2322f4d8edc4c098e221a51af9577b64a394da4bd05dc8243e7a28837d8ea5482b2c2b56
7
- data.tar.gz: e78386c0c8df0e6b8045de92d5235516e09937d044b7e0efee9505fc6b629b1589ee962e759ea17460e19f3caef58a4ad1554959bad138740aec29d870b3c932
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
@@ -11,6 +11,7 @@ module Cats
11
11
 
12
12
  delegate(:name, to: :route, prefix: true)
13
13
  delegate(:name, to: :unit, prefix: true, allow_nil: true)
14
+ delegate(:reference_no, to: :transport_bid, prefix: true)
14
15
  end
15
16
  end
16
17
  end
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.2.23'.freeze
3
+ VERSION = '1.2.27'.freeze
4
4
  end
5
5
  end
@@ -2,6 +2,7 @@ FactoryBot.define do
2
2
  factory :transport_contract, class: 'Cats::Core::TransportContract' do
3
3
  region factory: :location
4
4
  transporter
5
+ transport_bid
5
6
  contract_date { Date.today }
6
7
  expires_on { Date.today + 6.month }
7
8
  payment_term { FFaker::Name.name }
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.23
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-21 00:00:00.000000000 Z
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: '0'
442
+ version: 3.0.2
443
443
  required_rubygems_version: !ruby/object:Gem::Requirement
444
444
  requirements:
445
445
  - - ">="