cats_core 1.4.13 → 1.4.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/cats/core/{monthly_plans_controller.rb → round_plans_controller.rb} +11 -10
- data/app/models/cats/core/beneficiary.rb +15 -0
- data/app/models/cats/core/beneficiary_category.rb +11 -0
- data/app/models/cats/core/beneficiary_plan_item.rb +12 -0
- data/app/models/cats/core/beneficiary_round_plan_item.rb +14 -0
- data/app/models/cats/core/plan.rb +5 -2
- data/app/models/cats/core/plan_item.rb +10 -3
- data/app/models/cats/core/plan_item_detail.rb +4 -4
- data/app/models/cats/core/ration.rb +8 -1
- data/app/models/cats/core/{monthly_plan.rb → round_plan.rb} +22 -11
- data/app/models/cats/core/round_plan_item.rb +25 -0
- data/app/models/cats/core/round_plan_item_detail.rb +11 -0
- data/app/models/cats/core/round_ration.rb +17 -0
- data/app/serializers/cats/core/round_plan_serializer.rb +7 -0
- data/app/services/cats/core/round_plan_service.rb +108 -0
- data/config/routes.rb +5 -5
- data/db/migrate/20210717031810_create_cats_core_plans.rb +0 -4
- data/db/migrate/20210717032024_create_cats_core_plan_items.rb +13 -2
- data/db/migrate/20210717032260_create_cats_core_beneficiary_categories.rb +14 -0
- data/db/migrate/{20210717031343_create_cats_core_ration_items.rb → 20210717032270_create_cats_core_rations.rb} +9 -8
- data/db/migrate/20210717032290_create_cats_core_beneficiary_plan_items.rb +23 -0
- data/db/migrate/20210717032295_create_cats_core_plan_item_details.rb +18 -0
- data/db/migrate/{20220107121752_create_cats_core_monthly_plans.rb → 20220107121752_create_cats_core_round_plans.rb} +3 -4
- data/db/migrate/20220107122280_create_cats_core_round_rations.rb +26 -0
- data/db/migrate/20220107125025_create_cats_core_round_plan_items.rb +33 -0
- data/db/migrate/20220107126025_create_cats_core_beneficiary_round_plan_items.rb +24 -0
- data/db/migrate/20220107132433_create_cats_core_round_plan_item_details.rb +17 -0
- data/db/migrate/20220511082354_create_cats_core_beneficiaries.rb +16 -0
- data/lib/cats/core/version.rb +1 -1
- data/spec/factories/cats/core/beneficiaries.rb +9 -0
- data/spec/factories/cats/core/beneficiary_categories.rb +7 -0
- data/spec/factories/cats/core/beneficiary_plan_items.rb +7 -0
- data/spec/factories/cats/core/beneficiary_round_plan_items.rb +8 -0
- data/spec/factories/cats/core/dispatch_plans.rb +3 -3
- data/spec/factories/cats/core/locations.rb +4 -4
- data/spec/factories/cats/core/plan_item_details.rb +3 -3
- data/spec/factories/cats/core/plan_items.rb +4 -2
- data/spec/factories/cats/core/plans.rb +0 -1
- data/spec/factories/cats/core/rations.rb +5 -2
- data/spec/factories/cats/core/round_plan_item_details.rb +7 -0
- data/spec/factories/cats/core/round_plan_items.rb +11 -0
- data/spec/factories/cats/core/{monthly_plans.rb → round_plans.rb} +2 -3
- data/spec/factories/cats/core/round_rations.rb +10 -0
- metadata +31 -22
- data/app/models/cats/core/monthly_plan_item.rb +0 -15
- data/app/models/cats/core/monthly_plan_item_detail.rb +0 -14
- data/app/models/cats/core/monthly_ration.rb +0 -15
- data/app/models/cats/core/ration_item.rb +0 -14
- data/app/serializers/cats/core/monthly_plan_serializer.rb +0 -8
- data/app/services/cats/core/monthly_plan_service.rb +0 -86
- data/db/migrate/20210717031216_create_cats_core_rations.rb +0 -14
- data/db/migrate/20210717032240_create_cats_core_plan_item_details.rb +0 -18
- data/db/migrate/20220107124630_create_cats_core_monthly_rations.rb +0 -22
- data/db/migrate/20220107125025_create_cats_core_monthly_plan_items.rb +0 -17
- data/db/migrate/20220107132433_create_cats_core_monthly_plan_item_details.rb +0 -17
- data/spec/factories/cats/core/monthly_plan_item_details.rb +0 -7
- data/spec/factories/cats/core/monthly_plan_items.rb +0 -7
- data/spec/factories/cats/core/monthly_rations.rb +0 -9
- data/spec/factories/cats/core/ration_items.rb +0 -9
@@ -1,22 +0,0 @@
|
|
1
|
-
class CreateCatsCoreMonthlyRations < ActiveRecord::Migration[6.1]
|
2
|
-
def change
|
3
|
-
create_table :cats_core_monthly_rations do |t|
|
4
|
-
t.references :commodity_category,
|
5
|
-
null: false,
|
6
|
-
index: { name: 'cc_on_mr_indx' },
|
7
|
-
foreign_key: { to_table: :cats_core_commodity_categories }
|
8
|
-
t.float :amount, null: false
|
9
|
-
t.references :unit_of_measure,
|
10
|
-
null: false,
|
11
|
-
index: { name: 'uom_on_mr_indx' },
|
12
|
-
foreign_key: { to_table: :cats_core_unit_of_measures }
|
13
|
-
t.integer :no_of_days, null: false
|
14
|
-
t.references :monthly_plan,
|
15
|
-
index: { name: 'mp_on_mr_indx' },
|
16
|
-
null: false,
|
17
|
-
foreign_key: { to_table: :cats_core_monthly_plans }
|
18
|
-
|
19
|
-
t.timestamps
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class CreateCatsCoreMonthlyPlanItems < ActiveRecord::Migration[6.1]
|
2
|
-
def change
|
3
|
-
create_table :cats_core_monthly_plan_items do |t|
|
4
|
-
t.references :monthly_plan,
|
5
|
-
null: false,
|
6
|
-
index: { name: 'mp_on_mpi_indx' },
|
7
|
-
foreign_key: { to_table: :cats_core_monthly_plans }
|
8
|
-
t.integer :beneficiaries, null: false
|
9
|
-
t.references :plan_item,
|
10
|
-
null: false,
|
11
|
-
index: { name: 'pi_on_mpi_indx' },
|
12
|
-
foreign_key: { to_table: :cats_core_plan_items }
|
13
|
-
|
14
|
-
t.timestamps
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class CreateCatsCoreMonthlyPlanItemDetails < ActiveRecord::Migration[6.1]
|
2
|
-
def change
|
3
|
-
create_table :cats_core_monthly_plan_item_details do |t|
|
4
|
-
t.references :monthly_plan_item,
|
5
|
-
null: false,
|
6
|
-
index: { name: 'mpi_on_mpid_indx' },
|
7
|
-
foreign_key: { to_table: :cats_core_monthly_plan_items }
|
8
|
-
t.references :monthly_ration,
|
9
|
-
null: false,
|
10
|
-
index: { name: 'ri_on_mr_indx' },
|
11
|
-
foreign_key: { to_table: :cats_core_monthly_rations }
|
12
|
-
t.float :amount, null: false
|
13
|
-
|
14
|
-
t.timestamps
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|