cats_core 1.3.31 → 1.3.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/cats/core/application_controller.rb +4 -0
- data/app/controllers/cats/core/commodity_categories_controller.rb +5 -0
- data/app/models/cats/core/donation.rb +1 -1
- data/app/models/cats/core/monthly_plan_item_detail.rb +4 -0
- data/config/routes.rb +1 -0
- data/lib/cats/core/version.rb +1 -1
- 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: 14d27580f8a6838cc0d85c02f007d1d56eabf1a7558e73e1eda4425171ba0f85
|
4
|
+
data.tar.gz: 3ec9b121fe5f861bd4989b5535439d5b53508622ffc7f01cf9051e95040f4b51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc0f7f07e690728a732e2b8389cc58dcd0b4fdd688ec41dd3168a62c6e90fc6ad984e3e04cf8e2f67028584dfc88d5d97d1d9d38a0482a4cd0f6028063ebf7e9
|
7
|
+
data.tar.gz: e9d43cd5878520d23ff59cbd1eaa3e62bfa71d5ee16266c77b5f45c77eaab91566e40f6bf59f33292e6b3192663084f92ab331911163c37be092bb20b4ccbc99
|
@@ -9,6 +9,11 @@ module Cats
|
|
9
9
|
render json: { success: true, data: data }
|
10
10
|
end
|
11
11
|
|
12
|
+
def root
|
13
|
+
data = Cats::Core::CommodityCategory.roots
|
14
|
+
render json: { success: true, data: serialize(data) }
|
15
|
+
end
|
16
|
+
|
12
17
|
def show
|
13
18
|
data = ActiveModelSerializers::SerializableResource.new(@commodity_category)
|
14
19
|
render json: { success: true, data: data }
|
@@ -19,7 +19,7 @@ module Cats
|
|
19
19
|
validates :unit_of_measure, presence: true, if: -> { donation_type == KIND }
|
20
20
|
|
21
21
|
delegate(:name, to: :donor, prefix: true)
|
22
|
-
delegate(:reference_no, to: :plan, prefix: true)
|
22
|
+
delegate(:reference_no, to: :plan, prefix: true, allow_nil: true)
|
23
23
|
delegate(:name, to: :commodity_category, prefix: true, allow_nil: true)
|
24
24
|
delegate(:code, to: :currency, prefix: true, allow_nil: true)
|
25
25
|
delegate(:abbreviation, to: :unit_of_measure, prefix: true, allow_nil: true)
|
@@ -5,6 +5,10 @@ module Cats
|
|
5
5
|
belongs_to :monthly_ration
|
6
6
|
|
7
7
|
validates :amount, presence: true, numericality: { greater_than: 0 }
|
8
|
+
|
9
|
+
delegate(:commodity_category_name, to: :monthly_ration)
|
10
|
+
delegate(:unit_of_measure_abbreviation, to: :monthly_ration)
|
11
|
+
delegate(:no_of_days, to: :monthly_ration)
|
8
12
|
end
|
9
13
|
end
|
10
14
|
end
|
data/config/routes.rb
CHANGED
@@ -59,6 +59,7 @@ Cats::Core::Engine.routes.draw do
|
|
59
59
|
as: :store_space,
|
60
60
|
defaults: { level: Cats::Core::SpaceService::STORE }
|
61
61
|
|
62
|
+
get '/commodity_categories/roots', to: 'commodity_categories#root', as: :commodity_category_roots
|
62
63
|
resources :commodity_categories, except: %i[destroy] do
|
63
64
|
member do
|
64
65
|
get 'children'
|
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.35
|
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-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|