cats_core 1.2.38 → 1.3.1
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/offer_item.rb +2 -0
- data/app/models/cats/core/tenderer.rb +13 -0
- data/app/models/cats/core/transport_bid_item.rb +4 -0
- data/app/models/cats/core/transport_plan_item.rb +1 -0
- data/db/migrate/20220103152802_create_cats_core_tenderers.rb +18 -0
- data/lib/cats/core/version.rb +1 -1
- data/spec/factories/cats/core/tenderers.rb +8 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d4aec729abe0584f124c74a2a86fbcfa0d068b6c5b968a847a4a040595e19a8
|
4
|
+
data.tar.gz: 8b880262cb1ffcb7f92d1e7f2de5039feafac1805f3d9434122abd448c5dc6ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07e042748a002c29d571ec68788ac3ae3369569b41aa60affafeaa0236270bb28a64f5aebb0a48a43eb52b14beb0483b8d72b14f92649d1856b8b77496b53075
|
7
|
+
data.tar.gz: 387e10b63ecdc87555742a4aad7f505324aa06d569bdf7a7358efc57820886674dd0983673f9fefc5304ed697be276baefef5f63e7961f35134c3d0181f407a6
|
@@ -8,6 +8,8 @@ module Cats
|
|
8
8
|
validates :rank, numericality: { greater_than: 0 }, allow_nil: true
|
9
9
|
validate :validate_rank_is_set_for_winner
|
10
10
|
|
11
|
+
delegate(:route, to: :transport_bid_item)
|
12
|
+
|
11
13
|
def mark_as_winner(rank)
|
12
14
|
raise(StandardError, 'Offer item already marked as winner.') if winner
|
13
15
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Cats
|
2
|
+
module Core
|
3
|
+
class Tenderer < ApplicationRecord
|
4
|
+
belongs_to :transport_bid
|
5
|
+
belongs_to :transporter
|
6
|
+
|
7
|
+
validates :purchased_by, :phone_no, presence: true
|
8
|
+
|
9
|
+
delegate(:reference_no, to: :transport_bid)
|
10
|
+
delegate(:name, to: :transporter, prefix: true)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateCatsCoreTenderers < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
create_table :cats_core_tenderers do |t|
|
4
|
+
t.references :transport_bid,
|
5
|
+
null: false,
|
6
|
+
index: { name: 'tb_on_tenderer_indx' },
|
7
|
+
foreign_key: { to_table: :cats_core_transport_bids }
|
8
|
+
t.references :transporter,
|
9
|
+
null: false,
|
10
|
+
index: { name: 'transporter_on_tenderer_indx' },
|
11
|
+
foreign_key: { to_table: :cats_core_transporters }
|
12
|
+
t.string :purchased_by, null: false
|
13
|
+
t.string :phone_no, null: false
|
14
|
+
|
15
|
+
t.timestamps
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/cats/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cats_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henock L.
|
@@ -291,6 +291,7 @@ files:
|
|
291
291
|
- app/models/cats/core/stacking_rule.rb
|
292
292
|
- app/models/cats/core/store.rb
|
293
293
|
- app/models/cats/core/supplier.rb
|
294
|
+
- app/models/cats/core/tenderer.rb
|
294
295
|
- app/models/cats/core/transaction.rb
|
295
296
|
- app/models/cats/core/transport_bid.rb
|
296
297
|
- app/models/cats/core/transport_bid_item.rb
|
@@ -378,6 +379,7 @@ files:
|
|
378
379
|
- db/migrate/20211229160127_create_cats_core_transport_contracts.rb
|
379
380
|
- db/migrate/20211229160128_create_cats_core_contract_items.rb
|
380
381
|
- db/migrate/20211229160129_create_cats_core_commodity_substitutions.rb
|
382
|
+
- db/migrate/20220103152802_create_cats_core_tenderers.rb
|
381
383
|
- lib/cats/core.rb
|
382
384
|
- lib/cats/core/engine.rb
|
383
385
|
- lib/cats/core/version.rb
|
@@ -423,6 +425,7 @@ files:
|
|
423
425
|
- spec/factories/cats/core/stacks.rb
|
424
426
|
- spec/factories/cats/core/stores.rb
|
425
427
|
- spec/factories/cats/core/suppliers.rb
|
428
|
+
- spec/factories/cats/core/tenderers.rb
|
426
429
|
- spec/factories/cats/core/transport_bid_items.rb
|
427
430
|
- spec/factories/cats/core/transport_bids.rb
|
428
431
|
- spec/factories/cats/core/transport_contracts.rb
|