comee_core 0.1.18 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/comee/core/client_prices_controller.rb +18 -0
- data/app/serializers/comee/core/client_price_serializer.rb +7 -0
- data/config/routes.rb +2 -0
- data/lib/comee/core/version.rb +1 -1
- data/spec/factories/comee/core/client_prices.rb +1 -0
- data/spec/factories/comee/core/master_prices.rb +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5e8471a0a6816ac4e692f01fc746c8870e7d0744065b66c7ea871d046dbe347
|
4
|
+
data.tar.gz: 17b81b8b4d17a5bedaf3ff318482d91e9d8eb6b88890fe94f5860c24dde89911
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a42d869c763e3ac1219c9480bdb537d76b7b1da9a824c96be5de0479dba4a578cf8ca0492fb4d29a609034778526cf80dee52492b057717c7d73e4129f23aa4f
|
7
|
+
data.tar.gz: 32adccf22aecabe880f3e0d350e3660ae00c920d91add27737e094101268ad9a1be6d27bfcd2d72ca4be8e6edc2bde1c2442c332660735bfa602e95f1d1b9a2a
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Comee
|
2
|
+
module Core
|
3
|
+
class ClientPricesController < ApplicationController
|
4
|
+
include Comee::Core::Common
|
5
|
+
|
6
|
+
def filter
|
7
|
+
@client_prices = Comee::Core::ClientPrice.ransack(params[:q]).result
|
8
|
+
render json: {success: true, data: serialize(@client_prices)}
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def model_params
|
14
|
+
params.require(:payload).permit(:valid_from, :valid_to, :price, :status, :product_id, :discount, :client_id, :previous_price)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/config/routes.rb
CHANGED
data/lib/comee/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comee_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henock L.
|
@@ -232,6 +232,7 @@ files:
|
|
232
232
|
- Rakefile
|
233
233
|
- app/controllers/comee/core/access_controller.rb
|
234
234
|
- app/controllers/comee/core/application_controller.rb
|
235
|
+
- app/controllers/comee/core/client_prices_controller.rb
|
235
236
|
- app/controllers/comee/core/clients_controller.rb
|
236
237
|
- app/controllers/comee/core/currencies_controller.rb
|
237
238
|
- app/controllers/comee/core/notifications_controller.rb
|
@@ -266,6 +267,7 @@ files:
|
|
266
267
|
- app/models/comee/core/unit.rb
|
267
268
|
- app/models/comee/core/user.rb
|
268
269
|
- app/notifications/comee/core/new_order_notification.rb
|
270
|
+
- app/serializers/comee/core/client_price_serializer.rb
|
269
271
|
- app/serializers/comee/core/client_serializer.rb
|
270
272
|
- app/serializers/comee/core/currency_serializer.rb
|
271
273
|
- app/serializers/comee/core/product_serializer.rb
|