comee_core 0.1.83 → 0.1.84

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: 76f47c496c4a524edbc87938c14f4056182ec04520fdb83c3c78d13e38a279eb
4
- data.tar.gz: ca6a83b2354cd9c1a8b3a7a61c72cbbd134b2c09bc86a445abd147ad1e69368f
3
+ metadata.gz: 88c220e6b121eb2fc8a4191d432f5063df0bad832d3489443798c44618421797
4
+ data.tar.gz: 78c951ec96109410776b2345b927772a6e069ef078b558e69f7bbef0b49fca67
5
5
  SHA512:
6
- metadata.gz: e2c96de79bcd9c67931f8c93b0318b48cc5677ccb1e158c3057c2d1de7d607bf7ee2db009d67cab29698ff895bf5d81d4b1a141ef86708291644b2ada7698be8
7
- data.tar.gz: a77db4503767df48c75a495a5778852779901be087ef487b1c6128816a4bb8a6645599024724405bcd198fa889e40588e03b13efba6fbd32e23f72c037f1f902
6
+ metadata.gz: 726ab140419d49fb2b08bc68beb970cdc3f5f34ea5de70ed0f65d90a4b2930fb3a976def5dadd5837ca48e5c5a237d75dec8b5ad333c380f048302c224d588e7
7
+ data.tar.gz: 0a49d0031869536a37b50af5a67d86ca6e51bfc3631d3191965c90270d2dbe14949e748464ad164530543a48e353b355ed012321a6ada12dc574592301519aa5
@@ -0,0 +1,13 @@
1
+ module Comee
2
+ module Core
3
+ class FulfillmentCentersController < ApplicationController
4
+ include Common
5
+
6
+ private
7
+
8
+ def model_params
9
+ params.require(:payload).permit(:code, :name, :address, :email, service: [])
10
+ end
11
+ end
12
+ end
13
+ end
@@ -27,6 +27,11 @@ module Comee
27
27
  render json: {success: true, data: serialize(data)}
28
28
  end
29
29
 
30
+ def categories
31
+ root = Product.find_by(code: "root")
32
+ render json: {success: true, data: serialize(root.children)}
33
+ end
34
+
30
35
  def filter
31
36
  products = Product.ransack(params[:q]).result
32
37
  render json: {success: true, data: serialize(products)}
@@ -8,6 +8,10 @@ module Comee
8
8
 
9
9
  validates :reference_no, presence: true, uniqueness: true
10
10
  validates :status, presence: true
11
+
12
+ def self.ransackable_attributes(_auth_object = nil)
13
+ %w[client_id reference_no status]
14
+ end
11
15
  end
12
16
  end
13
17
  end
@@ -0,0 +1,7 @@
1
+ module Comee
2
+ module Core
3
+ class FulfillmentCenterSerializer < ActiveModel::Serializer
4
+ attributes :id, :code, :name, :address, :email, :service
5
+ end
6
+ end
7
+ end
data/config/routes.rb CHANGED
@@ -8,12 +8,17 @@ Comee::Core::Engine.routes.draw do
8
8
  post "mark_as_unread", controller: :notifications, action: :mark_as_unread
9
9
  end
10
10
  end
11
- post "/suppliers/filter", controller: :suppliers, action: :filter
12
- resources :suppliers
11
+ resources :suppliers do
12
+ collection do
13
+ post "filter"
14
+ end
15
+ end
13
16
  resources :products do
14
17
  collection do
15
18
  post "master_prices"
16
19
  post "client_prices"
20
+ post "filter"
21
+ get "categories"
17
22
  end
18
23
  end
19
24
  resources :product_lookups do
@@ -109,7 +114,10 @@ Comee::Core::Engine.routes.draw do
109
114
  end
110
115
  end
111
116
  resources :customs_details
112
- resources :item_statuses
113
- post "/item_statuses/filter", controller: :item_statuses, action: :filter
114
- post "/products/filter", controller: :products, action: :filter
117
+ resources :item_statuses do
118
+ collection do
119
+ post "filter"
120
+ end
121
+ end
122
+ resources :fulfillment_centers
115
123
  end
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.1.83".freeze
3
+ VERSION = "0.1.84".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.1.83
4
+ version: 0.1.84
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-01-08 00:00:00.000000000 Z
11
+ date: 2024-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers
@@ -288,6 +288,7 @@ files:
288
288
  - app/controllers/comee/core/customer_orders_controller.rb
289
289
  - app/controllers/comee/core/customs_details_controller.rb
290
290
  - app/controllers/comee/core/external_rfqs_controller.rb
291
+ - app/controllers/comee/core/fulfillment_centers_controller.rb
291
292
  - app/controllers/comee/core/item_statuses_controller.rb
292
293
  - app/controllers/comee/core/lookups_controller.rb
293
294
  - app/controllers/comee/core/notifications_controller.rb
@@ -356,6 +357,7 @@ files:
356
357
  - app/serializers/comee/core/customer_order_serializer.rb
357
358
  - app/serializers/comee/core/customs_detail_serializer.rb
358
359
  - app/serializers/comee/core/external_rfq_serializer.rb
360
+ - app/serializers/comee/core/fulfillment_center_serializer.rb
359
361
  - app/serializers/comee/core/item_status_serializer.rb
360
362
  - app/serializers/comee/core/lookup_serializer.rb
361
363
  - app/serializers/comee/core/master_price_serializer.rb