comee_core 0.2.68 → 0.2.70

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: ab2d82a34a3aad80165cbc56181be22e2715c189f1d6aecf3c474ca6110f458c
4
- data.tar.gz: 4e0afeec82d9fb90448af1f50549ba94ea61c9dd6dc00484a55ab298f0194a0c
3
+ metadata.gz: 7e3597e5e4813dfa1471df1672ccc5e9b818a0cb3beead1d15b033877442264d
4
+ data.tar.gz: 49eeb84c6a3a8eddce34be8ff257e251eb815d5fc4726b7d300bfe19f7f7c576
5
5
  SHA512:
6
- metadata.gz: b77c2dcbf7768677a83f38fc8008b4f85a3d7bab5491c78bfdffcfe3656adc6979c23ac1dd9700f96200832d52ed9991699f77a87f86da7af0396cb285764732
7
- data.tar.gz: 4114959e1d7f60e86bd0abe1285448ba97f75e341185ba5db66cd4a26d405092afbe65815cb480205d718d5f05c209381e282d4167060168c448a59a8e39e4ac
6
+ metadata.gz: 68dcc3e128cec0a1881af80f95b7ebad6105b6cd5202aab5d6976898ec1b74bf142bd8b081d6212e503f440177d503d48ccde3b50c1b0a4710c18ad478c0fa2a
7
+ data.tar.gz: d69fc657a5d008371a07d90f948b086563b847875640ab6dde340cef289be64fee3c16dc1e5432a6592ccd5f736aaa1833b24c4ac0273bd7b7b3585d737dbaee
@@ -0,0 +1,13 @@
1
+ module Comee
2
+ module Core
3
+ class ApplicationModulesController < ApplicationController
4
+ include Common
5
+
6
+ private
7
+
8
+ def model_params
9
+ params.require(:payload).permit(:code, :name)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Comee
2
+ module Core
3
+ class RolesController < ApplicationController
4
+ include Common
5
+
6
+ private
7
+
8
+ def model_params
9
+ params.require(:payload).permit(:code, :name, :application_module_id)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Comee
2
+ module Core
3
+ class UserApplicationRolesController < ApplicationController
4
+ include Common
5
+
6
+ private
7
+
8
+ def model_params
9
+ params.require(:payload).permit(:user_id, :application_module_id, :role_id)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -12,7 +12,11 @@ module Comee
12
12
  validates :requisition_date, :status, :purchase_status, presence: true
13
13
 
14
14
  def self.ransackable_attributes(_auth_object = nil)
15
- %w[created_at id remark requisition_date requisition_no status total_price updated_at]
15
+ %w[created_at id remark requisition_date delivery_date requisition_no status total_price updated_at]
16
+ end
17
+
18
+ def self.ransackable_associations(_auth_object = nil)
19
+ []
16
20
  end
17
21
 
18
22
  def calculate_total_price
@@ -0,0 +1,7 @@
1
+ module Comee
2
+ module Core
3
+ class ApplicationModuleSerializer < ActiveModel::Serializer
4
+ attributes :id, :code, :name
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ module Comee
2
+ module Core
3
+ class RoleSerializer < ActiveModel::Serializer
4
+ attributes :id, :code, :name
5
+ belongs_to :application_module
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Comee
2
+ module Core
3
+ class UserApplicationRoleSerializer < ActiveModel::Serializer
4
+ attributes :id, :application_module, :role
5
+ belongs_to :user
6
+ end
7
+ end
8
+ end
@@ -2,6 +2,7 @@ module Comee
2
2
  module Core
3
3
  class UserSerializer < ActiveModel::Serializer
4
4
  attributes :id, :name, :email, :active
5
+ has_many :user_application_roles
5
6
  end
6
7
  end
7
8
  end
data/config/routes.rb CHANGED
@@ -155,4 +155,10 @@ Comee::Core::Engine.routes.draw do
155
155
  resources :fulfillment_centers
156
156
 
157
157
  resources :client_warehouses
158
+
159
+ resources :roles
160
+
161
+ resources :application_modules
162
+
163
+ resources :user_application_roles
158
164
  end
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.2.68".freeze
3
+ VERSION = "0.2.70".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comee_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.68
4
+ version: 0.2.70
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-04 00:00:00.000000000 Z
11
+ date: 2024-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers
@@ -267,6 +267,7 @@ files:
267
267
  - app/controllers/comee/core/access_controller.rb
268
268
  - app/controllers/comee/core/agents_controller.rb
269
269
  - app/controllers/comee/core/application_controller.rb
270
+ - app/controllers/comee/core/application_modules_controller.rb
270
271
  - app/controllers/comee/core/back_orders_controller.rb
271
272
  - app/controllers/comee/core/client_addresses_controller.rb
272
273
  - app/controllers/comee/core/client_prices_controller.rb
@@ -286,12 +287,14 @@ files:
286
287
  - app/controllers/comee/core/products_controller.rb
287
288
  - app/controllers/comee/core/quotation_request_items_controller.rb
288
289
  - app/controllers/comee/core/quotation_requests_controller.rb
290
+ - app/controllers/comee/core/roles_controller.rb
289
291
  - app/controllers/comee/core/sales_order_items_controller.rb
290
292
  - app/controllers/comee/core/sales_orders_controller.rb
291
293
  - app/controllers/comee/core/shipment_items_controller.rb
292
294
  - app/controllers/comee/core/suppliers_controller.rb
293
295
  - app/controllers/comee/core/unit_conversions_controller.rb
294
296
  - app/controllers/comee/core/units_controller.rb
297
+ - app/controllers/comee/core/user_application_roles_controller.rb
295
298
  - app/controllers/comee/core/users_controller.rb
296
299
  - app/controllers/concerns/comee/core/common.rb
297
300
  - app/controllers/concerns/comee/core/pagination.rb
@@ -360,6 +363,7 @@ files:
360
363
  - app/models/comee/core/user_application_role.rb
361
364
  - app/notifications/comee/core/back_order_notification.rb
362
365
  - app/serializers/comee/core/agent_serializer.rb
366
+ - app/serializers/comee/core/application_module_serializer.rb
363
367
  - app/serializers/comee/core/client_address_serializer.rb
364
368
  - app/serializers/comee/core/client_price_serializer.rb
365
369
  - app/serializers/comee/core/client_serializer.rb
@@ -381,6 +385,7 @@ files:
381
385
  - app/serializers/comee/core/purchase_order_serializer.rb
382
386
  - app/serializers/comee/core/quotation_request_item_serializer.rb
383
387
  - app/serializers/comee/core/quotation_request_serializer.rb
388
+ - app/serializers/comee/core/role_serializer.rb
384
389
  - app/serializers/comee/core/sales_order_item_detail_serializer.rb
385
390
  - app/serializers/comee/core/sales_order_item_serializer.rb
386
391
  - app/serializers/comee/core/sales_order_serializer.rb
@@ -389,6 +394,7 @@ files:
389
394
  - app/serializers/comee/core/supplier_serializer.rb
390
395
  - app/serializers/comee/core/unit_conversion_serializer.rb
391
396
  - app/serializers/comee/core/unit_serializer.rb
397
+ - app/serializers/comee/core/user_application_role_serializer.rb
392
398
  - app/serializers/comee/core/user_serializer.rb
393
399
  - app/services/comee/core/customer_order_service.rb
394
400
  - app/services/comee/core/product_lookup_service.rb