tramway-event 1.8.1.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d91a1dc4a7e517bffc4a29b0a7785406e853a253e7994b9f84b3612aaf174184
|
4
|
+
data.tar.gz: ac9725effcbcce5644cf1dbb19835052071345d9a23a069f64da3f49b8ee3e39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73cb708fad65283d4add750f5876492b09bb6dba4244a64ba322ef8dbfcbf77ca82315a3d419bbece16fa4eb5f34188e0c184a7ad712c0b49420573b5fc434b1
|
7
|
+
data.tar.gz: 3ded032babbcd3f735c6b021436911c5bfdd70545fc58baa81b993a1003d2ca9659b0e1e3a33b66eda0f412416c4da695817253571f954f88f507ada51c6c6db
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class Tramway::Event::ParticipantDecorator < ::Tramway::Core::ApplicationDecorator
|
2
2
|
class << self
|
3
3
|
def collections
|
4
|
-
[ :requested, :waiting, :prev_approved, :without_answer, :approved, :rejected, :all ]
|
4
|
+
[ :requested, :waiting, :prev_approved, :without_answer, :approved, :rejected, :reserved, :all ]
|
5
5
|
end
|
6
6
|
|
7
7
|
def list_attributes
|
@@ -69,6 +69,8 @@ class Tramway::Event::ParticipantDecorator < ::Tramway::Core::ApplicationDecorat
|
|
69
69
|
:warning
|
70
70
|
when :reject
|
71
71
|
:danger
|
72
|
+
when :reserve
|
73
|
+
:warning
|
72
74
|
end
|
73
75
|
end
|
74
76
|
end
|
@@ -8,6 +8,7 @@ class Tramway::Event::Participant < ::Tramway::Event::ApplicationRecord
|
|
8
8
|
state :rejected
|
9
9
|
state :approved
|
10
10
|
state :without_answer
|
11
|
+
state :reserved
|
11
12
|
|
12
13
|
event :previous_approve do
|
13
14
|
transition [ :requested, :without_answer, :waiting ] => :prev_approved
|
@@ -22,12 +23,16 @@ class Tramway::Event::Participant < ::Tramway::Event::ApplicationRecord
|
|
22
23
|
end
|
23
24
|
|
24
25
|
event :approve do
|
25
|
-
transition prev_approved: :approved
|
26
|
+
transition [ :prev_approved, :reserved ] => :approved
|
26
27
|
end
|
27
28
|
|
28
29
|
event :not_got_answer do
|
29
30
|
transition requested: :without_answer
|
30
31
|
end
|
32
|
+
|
33
|
+
event :reserve do
|
34
|
+
transition [ :requested, :without_answer, :waiting ] => :reserved
|
35
|
+
end
|
31
36
|
end
|
32
37
|
|
33
38
|
scope :requested, -> { where participation_state: :requested }
|
@@ -36,4 +41,5 @@ class Tramway::Event::Participant < ::Tramway::Event::ApplicationRecord
|
|
36
41
|
scope :rejected, -> { where participation_state: :rejected }
|
37
42
|
scope :approved, -> { where participation_state: :approved }
|
38
43
|
scope :without_answer, -> { where participation_state: :without_answer }
|
44
|
+
scope :reserved, -> { where participation_state: :reserved }
|
39
45
|
end
|
data/config/locales/models.yml
CHANGED
@@ -14,9 +14,11 @@ ru:
|
|
14
14
|
rejected: Заявка отклонена
|
15
15
|
approved: Окончательное подтверждение
|
16
16
|
without_answer: Без ответа
|
17
|
+
reserved: В резерве
|
17
18
|
events:
|
18
19
|
previous_approve: Предварительно подтвердить
|
19
20
|
wait_for_decision: Ожидать ответа
|
20
21
|
reject: Отклонить
|
21
22
|
approve: Окончательно подтвердить
|
22
23
|
not_got_answer: Связаться не удалось
|
24
|
+
reserve: Отправить в резерв
|