effective_messaging 0.7.3 → 0.7.4

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: 5daa32cf8a7384da19b824c0dcf5cdea5cf3797e03fbadc420ecf8b99275d3e2
4
- data.tar.gz: f7bfb3dfefc8a06cb959ecd874e7ae8f4c389b17639496d96637e78b865412bc
3
+ metadata.gz: 78e95fc092d81efe4f4ff0db0c4d571ec86b7938400dcc7f378963f9e288aeb4
4
+ data.tar.gz: b206a600a6fc26b75fdba1a26c86754e1ceb66d4be50f0d80b07aa158afec313
5
5
  SHA512:
6
- metadata.gz: 99d125bebd71348909a9f60a336778cf0f53e70c1dca482b8a83250348054ea1ab8f6525dd494b05299d39da20756f1bbaa396f811ec20bd3beb4784593370d3
7
- data.tar.gz: c1debff84d85589cd398fa01d2c0cfcabf8c450a4f05f2986253678df606787f3a3675de60b7b7bdd5040502e73460b3aeb681912dd958d20b38fa74527046df
6
+ metadata.gz: 85de886b3e80411543f91188ebaa4de3f750a020f61513e81c82f8ef26e5ea8a792cbabd512ef821e13f34374fd30639a1e97d11f1ec00583d952339e8a336b3
7
+ data.tar.gz: 37f925c590a863999c61bd24008d96423d73a0aa9e2b10d3a914329e07c84589ece96b3aaba013557886d308895fbe544926c9941b951106018384de0197f17c
@@ -15,7 +15,13 @@ class EffectiveChatsDatatable < Effective::Datatable
15
15
  end
16
16
 
17
17
  collection do
18
- Effective::Chat.deep.where(id: current_user.chats)
18
+ chats = Effective::Chat.deep.where(id: current_user.chats)
19
+
20
+ if attributes[:year].present?
21
+ chats = chats.where('created_at >= ?', Time.zone.local(attributes[:year]))
22
+ end
23
+
24
+ chats
19
25
  end
20
26
 
21
27
  end
@@ -1,10 +1,9 @@
1
1
  %h2= t('effective_messaging.dashboard')
2
2
 
3
- - if current_user.chats.present?
4
- %p You are a #{etd(Effective::ChatUser)} of #{pluralize(current_user.chats.length, etd(Effective::Chat))}.
3
+ - datatable = EffectiveResources.best('EffectiveChatsDatatable').new(self, namespace: :effective)
5
4
 
6
- - datatable = EffectiveResources.best('EffectiveChatsDatatable').new(self, namespace: :effective)
5
+ - if datatable.present?
6
+ %p You are a #{etd(Effective::ChatUser)} of #{pluralize(datatable.collection.length, etd(Effective::Chat))}.
7
7
  = render_datatable(datatable, simple: true)
8
-
9
8
  - else
10
9
  %p You haven't received any #{etsd(Effective::ChatMessage)}. When you do, we'll show it here.
@@ -1,3 +1,3 @@
1
1
  module EffectiveMessaging
2
- VERSION = '0.7.3'.freeze
2
+ VERSION = '0.7.4'.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.7.3
4
+ version: 0.7.4
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: 2024-02-14 00:00:00.000000000 Z
11
+ date: 2024-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails