comee_core 0.1.73 → 0.1.74
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2186d3622f2ec54668695b7e4f9b72a2fa2e8803457719e47ec808a681fb9a0
|
4
|
+
data.tar.gz: 4f6d0e55625b309271ae845972da99774e0eeca64ada41f53b98e733822b99a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e5883953674469a3aca2e14e2e00a5837198198999d32619ac9a866aa2f29b49aefc6ea1d7ef0374294e7156dacc59a9395781925157abfc2fd0a5c3e532673
|
7
|
+
data.tar.gz: 6b15d9c4eeaa6e509a03cd2aeba69f369344a6067302bd8ad46c250d3c2c8e097c1a350309fb7bd058234d481c269198affbc8ace31769074e13da8e5cc33782
|
@@ -12,6 +12,7 @@ module Comee
|
|
12
12
|
|
13
13
|
def filter
|
14
14
|
@client_prices = Comee::Core::ClientPrice.includes(:client, :product, :unit).ransack(params[:q]).result
|
15
|
+
total = @client_prices.count
|
15
16
|
@client_prices = @client_prices.then(&paginate)
|
16
17
|
queries = @client_prices.map { |cp| {itemable_id: cp.client_id, product_id: cp.product_id, itemable_type: "Comee::Core::Client"} }
|
17
18
|
|
@@ -53,8 +54,13 @@ module Comee
|
|
53
54
|
end
|
54
55
|
res << item
|
55
56
|
end
|
56
|
-
|
57
|
-
|
57
|
+
result = {success: true, data: result}
|
58
|
+
page = params[:page]
|
59
|
+
if page
|
60
|
+
result[:page] = page
|
61
|
+
result[:total] = total
|
62
|
+
end
|
63
|
+
render json: result
|
58
64
|
end
|
59
65
|
|
60
66
|
private
|
data/lib/comee/core/version.rb
CHANGED
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.
|
4
|
+
version: 0.1.74
|
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-
|
11
|
+
date: 2024-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|