effective_reports 0.1.1 → 0.1.2
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: 4a0eb1f2073ced73e4323f8bbf4996fa42bd1f275954ce4fd0cd880f06924555
|
4
|
+
data.tar.gz: 8b05f4cc6d5f8c62f9b749427997e4cb376902a069e817acd9eb98aadf83a671
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67febf40c58be31ded2a04f14e64514763ddccd5dc83eb1f02aba5de72144d5034a9382d4f3aabfcdeecacac1b6403c14a6eadd971cc953c732215a1a4d70490
|
7
|
+
data.tar.gz: 1fabf86d60be49374c15bbfd4e66cb52fc96e2f05bee11d8820532550007df2e21daa3945b2173b4faa48bdb7f208a3f81f6c66e114075656c2069cbb976d9fb
|
@@ -43,7 +43,7 @@ module EffectiveReportsHelper
|
|
43
43
|
['Greater than >', :gt],
|
44
44
|
['Greater than or equal to >=', :gteq],
|
45
45
|
['Less than <', :lt],
|
46
|
-
['Less than or equal to
|
46
|
+
['Less than or equal to <=', :lteq],
|
47
47
|
]
|
48
48
|
when :belongs_to, :belongs_to_polymorphic, :has_many, :has_one
|
49
49
|
[
|
@@ -37,12 +37,16 @@ module Effective
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def to_s
|
40
|
-
name.presence || 'report scope'
|
40
|
+
[name, operation_label, value].compact.join(' ').presence || 'report scope'
|
41
41
|
end
|
42
42
|
|
43
43
|
def value
|
44
44
|
value_date || value_decimal || value_integer || value_price || value_string.presence || value_boolean
|
45
45
|
end
|
46
46
|
|
47
|
+
def operation_label
|
48
|
+
return '=' if advanced?
|
49
|
+
end
|
50
|
+
|
47
51
|
end
|
48
52
|
end
|
@@ -177,17 +177,17 @@
|
|
177
177
|
= frs.hidden_field :advanced, value: true
|
178
178
|
|
179
179
|
- if type == :boolean
|
180
|
-
= frs.radios :value_boolean, reportable_boolean_collection,
|
180
|
+
= frs.radios :value_boolean, reportable_boolean_collection, buttons: true, required: true, label: false
|
181
181
|
- elsif type == :date
|
182
|
-
= frs.date_field :value_date,
|
182
|
+
= frs.date_field :value_date, required: true, label: false
|
183
183
|
- elsif type == :decimal
|
184
|
-
= frs.date_field :value_decimal,
|
184
|
+
= frs.date_field :value_decimal, required: true, label: false
|
185
185
|
- elsif type == :integer
|
186
|
-
= frs.integer_field :value_integer,
|
186
|
+
= frs.integer_field :value_integer, required: true, label: false
|
187
187
|
- elsif type == :price
|
188
|
-
= frs.price_field :value_price,
|
188
|
+
= frs.price_field :value_price, required: true, label: false
|
189
189
|
- elsif type == :string
|
190
|
-
= frs.text_field :value_string,
|
190
|
+
= frs.text_field :value_string, required: true, label: false
|
191
191
|
- else
|
192
192
|
- raise("Unexpected scope datatype: #{type || 'nil'}")
|
193
193
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_reports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|