effective_messaging 0.4.0 → 0.4.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: f51a06c64a043da3819c077710fe75189bf0c9de2480c8bc7229fff8c1c984b8
4
- data.tar.gz: 9a271eff256b981894a89f6fca51ff4e6c0abe731d2b1d7177ef3dd31a77287e
3
+ metadata.gz: ee0fc8653681a36c4de9e9756c348c2438e376bff57409b584a5d7e514a1e596
4
+ data.tar.gz: bf10b4a5f6641193eac7f0da6300d6851b3d51417fe72b36095e6702823936f9
5
5
  SHA512:
6
- metadata.gz: 9d41b44b4829586760bdb2d177fab1aa2bf871f9250ed8679605f98a3704196560f8fc6489b90a78c264b66a9c400a91ae051388ccf379953c799d9fab04b3ef
7
- data.tar.gz: 9c6fe1ace4437ac55f032a8834dab9156afa0c3290e5ecd9ec59e9567459af404298dc76cd3a6b98dc39115e05abb1b83cf8a79856cd2823bec64e9be6b75998
6
+ metadata.gz: 6fdbe70ef0e37d29dc8126ac9416361e4cfd87929f20975dcff60d4281d2804b96c3def8d0a2303be2210e98985310a1858beddaeeb332366ec33bb0bfe69fb6
7
+ data.tar.gz: 22dafc2abd52b17461126ceafc84164c6d9446f8fe2ff8f997da2b29ff8db5cdc959a1c59123f75ad45499df19057cc04cfd98a03074f12ce6a4958a4406d77e
@@ -32,7 +32,7 @@ module Admin
32
32
  col :scheduled_method, visible: false
33
33
  col :scheduled_dates, visible: false
34
34
 
35
- col :report, search: Effective::Report.notifiable.sorted
35
+ col :report, search: Effective::Report.notifiable.sorted, action: :show
36
36
 
37
37
  col(:rows_count) do |notification|
38
38
  notification.report.collection().count
@@ -203,7 +203,7 @@ module Effective
203
203
  end
204
204
 
205
205
  def renderer
206
- view_context || ApplicationController.renderer
206
+ view_context || nil # This isn't ideal
207
207
  end
208
208
 
209
209
  def rows_count
@@ -11,29 +11,34 @@
11
11
 
12
12
  = f.select :audience_emails, f.object.audience_emails, label: 'Send to', multiple: true, tags: true, hint: 'Add one or more email address by pressing enter'
13
13
 
14
+ %h2 Enabled
15
+ %p When unchecked, no emails will be sent
16
+ = f.check_box :enabled, label: "Yes, this notification is enabled and notification emails should be sent"
17
+
14
18
  %h2 Schedule
15
19
  %p Please select how and when the notifications should be sent
16
20
 
17
- = f.check_box :enabled, label: "Yes, this notification is enabled and notification emails should be sent"
21
+ .row
22
+ .col-md-6
23
+ = f.select :schedule_type, Effective::Notification::SCHEDULE_TYPES
18
24
 
19
- = f.show_if(:enabled, true) do
20
- = f.select :schedule_type, Effective::Notification::SCHEDULE_TYPES
25
+ = f.show_if(:schedule_type, 'immediate') do
26
+ .d-flex
27
+ Send notification immediately and then every
28
+ .mx-3= f.number_field :immediate_days, label: false, min: 0, max: 365
29
+ day(s) thereafter, for
30
+ .mx-3= f.number_field :immediate_times, label: false, min: 1, max: 1000
31
+ total notification(s).
21
32
 
22
- = f.show_if(:schedule_type, 'immediate') do
23
- .d-flex
24
- Send notification immediately and then every
25
- .mx-3= f.number_field :immediate_days, label: false, min: 0, max: 365
26
- day(s) thereafter, for
27
- .mx-3= f.number_field :immediate_times, label: false, min: 1, max: 1000
28
- total notification(s).
33
+ = f.show_if(:schedule_type, 'scheduled') do
34
+ = f.hidden_field :scheduled_method, value: 'dates'
29
35
 
30
- = f.show_if(:schedule_type, 'scheduled') do
31
- /= f.radios :scheduled_method, Effective::Notification::SCHEDULED_METHODS, label: false, required: true
32
- = f.hidden_field :scheduled_method, value: 'dates'
36
+ %p Send notification on the following scheduled dates:
33
37
 
34
- /= f.show_if(:scheduled_method, 'dates') do
35
- %p Send notification on the following scheduled dates:
36
- = f.select :scheduled_dates, f.object.scheduled_dates, label: false, multiple: true, tags: true, hint: 'Add one or more dates by pressing enter. Please input in the format YYYY-MM-DD'
38
+ .row
39
+ .col-md-6
40
+ = f.select :scheduled_dates, f.object.scheduled_dates, multiple: true, tags: true,
41
+ hint: 'Add one or more dates by pressing enter. Please input in the format YYYY-MM-DD'
37
42
 
38
43
  %h2 Report
39
44
  .row
@@ -1,3 +1,3 @@
1
1
  module EffectiveMessaging
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.4.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.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-08-24 00:00:00.000000000 Z
11
+ date: 2023-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails