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: 5c1c05c8943d42999d6cb9bc8f788af7b1efd9490108fc32a31a06d4429d9455
4
- data.tar.gz: 7ad823fb06f1837bbe2d450f10d7d4e4c07064675fa7009847235c2f49b9cdaa
3
+ metadata.gz: 4a0eb1f2073ced73e4323f8bbf4996fa42bd1f275954ce4fd0cd880f06924555
4
+ data.tar.gz: 8b05f4cc6d5f8c62f9b749427997e4cb376902a069e817acd9eb98aadf83a671
5
5
  SHA512:
6
- metadata.gz: 72df2d6b3d8f52aa3c348707b706f22204b22b3c1e1faa766f4fcdd069122fcfd41b0253f3e5d5c275ef2cd9fcced88cb182f1a34ff569b61ea48106ffbdab68
7
- data.tar.gz: 263b2b601838d2eaa0823093264dbd6ce0f16c82572a0dc05e0a63b78edc8b5a0a75dad25ca2ad03924f6ae466387f0efe407f0f14cd0e99e4377bc56d8d0931
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 <', :lteq],
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, label: 'Value', buttons: true, required: true, label: false
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, label: 'Value', required: true, label: false
182
+ = frs.date_field :value_date, required: true, label: false
183
183
  - elsif type == :decimal
184
- = frs.date_field :value_decimal, label: 'Value', required: true, label: false
184
+ = frs.date_field :value_decimal, required: true, label: false
185
185
  - elsif type == :integer
186
- = frs.integer_field :value_integer, label: 'Value', required: true, label: false
186
+ = frs.integer_field :value_integer, required: true, label: false
187
187
  - elsif type == :price
188
- = frs.price_field :value_price, label: 'Value', required: true, label: false
188
+ = frs.price_field :value_price, required: true, label: false
189
189
  - elsif type == :string
190
- = frs.text_field :value_string, label: 'Value', required: true, label: false
190
+ = frs.text_field :value_string, required: true, label: false
191
191
  - else
192
192
  - raise("Unexpected scope datatype: #{type || 'nil'}")
193
193
 
@@ -1,5 +1,5 @@
1
1
  - if report.description.present?
2
- %p= report.description.to_s
2
+ %p= simple_format(report.description)
3
3
 
4
4
  - if report.filtered_report_columns.present? || report.report_scopes.present?
5
5
  %p The results of this report have been filtered by the following:
@@ -1,3 +1,3 @@
1
1
  module EffectiveReports
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
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.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-04 00:00:00.000000000 Z
11
+ date: 2023-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails