tramway-event 1.9.19.2 → 1.9.19.3

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: 2fa39c1639004038330bc20e061dde1b2737ebdd6e8029c6d067fa675d2112cc
4
- data.tar.gz: dc24aa87fdc2346c96a34d98a38f0bb4569e94ad6805be93271e6a6fe789f0df
3
+ metadata.gz: 9fd848d4774d69285cfa3c357b36834c18954c2b799e9e671184eaf833716f4f
4
+ data.tar.gz: 43275c678bf421112bafea09343a92ef4002815f962387fc72bc25da3750b8dc
5
5
  SHA512:
6
- metadata.gz: 8809bdb33077e8dc9aded16ccfc98d8c894f5f1d0823802f7b211fdbd6ae352d218ba18d9a1200e6ca8706e3912dbac1c2a81b93cca75ae0e9c57a84aec61c49
7
- data.tar.gz: e48bc4b4a56bfb11da3963564a59812854b35006ad70b762185c3749c9b64fffd0418c223e2e28ce620bf8123d384e04a1bda9c58329db1a3f735a95558df743
6
+ metadata.gz: 23f2a8c610c491f4bce5f1cd75e9cd9f7de29073d8bff369470003f9b54693b8ed0af2392eeb044bcad05fc4136e90555471a3b9fbd4b36e018a58d3c0446367
7
+ data.tar.gz: d3bef7ce5d1d5b5baedd3631152f7f8bea340a25bc9ca258924d58c76d791a516dc4c25b39d823a1750605d104f726469019c1e8de2c938d03058d09f06648dc
@@ -76,10 +76,14 @@ class Tramway::Event::EventDecorator < ::Tramway::Core::ApplicationDecorator
76
76
  end
77
77
 
78
78
  def approved_participants
79
- if DateTime.now < object.end_date
80
- I18n.t('activerecord.attributes.tramway/event/event.not_yet_held')
79
+ if object.end_date.present?
80
+ if DateTime.now < object.end_date
81
+ I18n.t('activerecord.attributes.tramway/event/event.not_yet_held')
82
+ else
83
+ object.participants.approved.count
84
+ end
81
85
  else
82
- object.participants.approved.count
86
+ I18n.t('activerecord.attributes.tramway/event/event.does_not_have_end_date')
83
87
  end
84
88
  end
85
89
 
@@ -25,6 +25,7 @@ ru:
25
25
  approved_participants: Количество пришедших
26
26
  not_yet_held: мероприятие ещё не проведено
27
27
  participants_list: Список участников
28
+ does_not_have_end_date: мероприятие не имеет даты окончания
28
29
  tramway/event/participant:
29
30
  comment: Примечание
30
31
  event: Мероприятие
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Event
5
- VERSION = '1.9.19.2'
5
+ VERSION = '1.9.19.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-event
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.19.2
4
+ version: 1.9.19.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-06 00:00:00.000000000 Z
11
+ date: 2019-12-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails engine for events
14
14
  email: