effective_messaging 0.7.3 → 0.7.5

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: 7407b82bbf657f12efd728834391a82d5a3f6d2d45e2833e4e092c442a9f87c8
4
+ data.tar.gz: 9d5d26c07a3b88e0c8a9786e6c5b35cf75505b647116bd55732b543c163f4756
5
5
  SHA512:
6
- metadata.gz: 99d125bebd71348909a9f60a336778cf0f53e70c1dca482b8a83250348054ea1ab8f6525dd494b05299d39da20756f1bbaa396f811ec20bd3beb4784593370d3
7
- data.tar.gz: c1debff84d85589cd398fa01d2c0cfcabf8c450a4f05f2986253678df606787f3a3675de60b7b7bdd5040502e73460b3aeb681912dd958d20b38fa74527046df
6
+ metadata.gz: 79a35234d7e9857bd44190646ed0cb10eeafe10a92998fe90ca56137ca85943516c6759b3ba0fede7b6902296c5d10a3231569cb49fcd39e5f053be50b83e7f7
7
+ data.tar.gz: 28e9c078ca521aecdb71da681074cb5e6fc5b9fa6f14f34e4b5a8625a33c6fc7cda767f21b4dcc3fe19f8db804f92b6d95c7b17f31082090adf1593ebecc680e
@@ -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]).all_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, year: local_assigns[:year])
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.5'.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.5
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