decidim-accountability 0.20.1 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/types/decidim/accountability/accountability_type.rb +32 -0
- data/app/types/decidim/accountability/result_type.rb +35 -0
- data/app/types/decidim/accountability/status_type.rb +20 -0
- data/app/types/decidim/accountability/timeline_entry_type.rb +18 -0
- data/config/locales/el.yml +1 -0
- data/lib/decidim/accountability/component.rb +1 -0
- data/lib/decidim/accountability/version.rb +1 -1
- metadata +25 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23e9e9da0373bafcee830512c9e911e0176767832d826719ccae2a52b441f2f2
|
4
|
+
data.tar.gz: 6cd880e63873b91f6a0dbdd79e066bbd9e04e9a235aacc895a2cb0bc9f0a483c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04a259f346030214c5963d31cfd3240ecc58cd6c4d0f222b52b4b20a215475043faa6a430370e285e48aba86d8582fbcf7c7b1246af885fb88e76782470a26c7
|
7
|
+
data.tar.gz: cd0f61547ca931bf560d0f1a5d9393c1c5548c8d220a86bad841e1ff64a6d07f0a52987919d137af4236dd40a815a723e2ed39dd84d8a99fff0854497be36178
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Accountability
|
5
|
+
AccountabilityType = GraphQL::ObjectType.define do
|
6
|
+
interfaces [-> { Decidim::Core::ComponentInterface }]
|
7
|
+
|
8
|
+
name "Accountability"
|
9
|
+
description "An accountability component of a participatory space."
|
10
|
+
|
11
|
+
connection :results, ResultType.connection_type do
|
12
|
+
resolve ->(component, _args, _ctx) {
|
13
|
+
ResultTypeHelper.base_scope(component).includes(:component)
|
14
|
+
}
|
15
|
+
end
|
16
|
+
|
17
|
+
field(:result, ResultType) do
|
18
|
+
argument :id, !types.ID
|
19
|
+
|
20
|
+
resolve ->(component, args, _ctx) {
|
21
|
+
ResultTypeHelper.base_scope(component).find_by(id: args[:id])
|
22
|
+
}
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module ResultTypeHelper
|
27
|
+
def self.base_scope(component)
|
28
|
+
Result.where(component: component)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Accountability
|
5
|
+
ResultType = GraphQL::ObjectType.define do
|
6
|
+
interfaces [
|
7
|
+
-> { Decidim::Core::ComponentInterface },
|
8
|
+
-> { Decidim::Core::CategorizableInterface },
|
9
|
+
-> { Decidim::Comments::CommentableInterface },
|
10
|
+
-> { Decidim::Core::ScopableInterface }
|
11
|
+
]
|
12
|
+
|
13
|
+
name "Result"
|
14
|
+
description "A result"
|
15
|
+
|
16
|
+
field :id, !types.ID, "The internal ID for this result"
|
17
|
+
field :title, Decidim::Core::TranslatedFieldType, "The title for this result"
|
18
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description for this result"
|
19
|
+
field :reference, types.String, "The reference for this result"
|
20
|
+
field :startDate, Decidim::Core::DateType, "The start date for this result", property: :start_date
|
21
|
+
field :endDate, Decidim::Core::DateType, "The end date for this result", property: :end_date
|
22
|
+
field :progress, types.Float, "The progress for this result"
|
23
|
+
field :createdAt, Decidim::Core::DateTimeType, "When this result was created", property: :created_at
|
24
|
+
field :updatedAt, Decidim::Core::DateTimeType, "When this result was updated", property: :updated_at
|
25
|
+
field :childrenCount, types.Int, "The number of children results", property: :children_count
|
26
|
+
field :weight, !types.Int, "The order of this result"
|
27
|
+
field :externalId, types.String, "The external ID for this result", property: :external_id
|
28
|
+
|
29
|
+
field :children, types[Decidim::Accountability::ResultType], "The childrens results"
|
30
|
+
field :parent, Decidim::Accountability::ResultType, "The parent result"
|
31
|
+
field :status, Decidim::Accountability::StatusType, "The status for this result"
|
32
|
+
field :timelineEntries, types[Decidim::Accountability::TimelineEntryType], "The timeline entries for this result", property: :timeline_entries
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Accountability
|
5
|
+
StatusType = GraphQL::ObjectType.define do
|
6
|
+
name "Status"
|
7
|
+
description "A status"
|
8
|
+
|
9
|
+
field :id, !types.ID, "The internal ID for this status"
|
10
|
+
field :key, types.String, "The key for this status"
|
11
|
+
field :name, Decidim::Core::TranslatedFieldType, "The name for this status"
|
12
|
+
field :createdAt, Decidim::Core::DateType, "When this status was created", property: :created_at
|
13
|
+
field :updatedAt, Decidim::Core::DateType, "When this status was updated", property: :updated_at
|
14
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description for this status"
|
15
|
+
field :progress, types.Int, "The progress for this status"
|
16
|
+
|
17
|
+
field :results, types[Decidim::Accountability::ResultType], "The results for this status"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Accountability
|
5
|
+
TimelineEntryType = GraphQL::ObjectType.define do
|
6
|
+
name "TimelineEntry"
|
7
|
+
description "A Timeline Entry"
|
8
|
+
|
9
|
+
field :id, !types.ID, "The internal ID for this timeline entry"
|
10
|
+
field :entryDate, Decidim::Core::DateType, "The entry date for this timeline entry", property: :entry_date
|
11
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description for this timeline entry"
|
12
|
+
field :createdAt, Decidim::Core::DateTimeType, "When this timeline entry was created", property: :created_at
|
13
|
+
field :updatedAt, Decidim::Core::DateTimeType, "When this timeline entry was updated", property: :updated_at
|
14
|
+
|
15
|
+
field :result, Decidim::Accountability::ResultType, "The result for this timeline entry"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
el:
|
@@ -8,6 +8,7 @@ Decidim.register_component(:accountability) do |component|
|
|
8
8
|
component.icon = "decidim/accountability/icon.svg"
|
9
9
|
component.stylesheet = "decidim/accountability/accountability"
|
10
10
|
component.permissions_class_name = "Decidim::Accountability::Permissions"
|
11
|
+
component.query_type = "Decidim::Accountability::AccountabilityType"
|
11
12
|
|
12
13
|
component.on(:before_destroy) do |instance|
|
13
14
|
raise StandardError, "Can't remove this component" if Decidim::Accountability::Result.where(component: instance).any?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-accountability
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-04-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-comments
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.21.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.21.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: decidim-core
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.
|
35
|
+
version: 0.21.0
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.
|
42
|
+
version: 0.21.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: kaminari
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,98 +74,98 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - '='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.
|
77
|
+
version: 0.21.0
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - '='
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.
|
84
|
+
version: 0.21.0
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: decidim-assemblies
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
89
|
- - '='
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: 0.
|
91
|
+
version: 0.21.0
|
92
92
|
type: :development
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - '='
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 0.
|
98
|
+
version: 0.21.0
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: decidim-comments
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
103
|
- - '='
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.
|
105
|
+
version: 0.21.0
|
106
106
|
type: :development
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - '='
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.
|
112
|
+
version: 0.21.0
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: decidim-dev
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - '='
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: 0.
|
119
|
+
version: 0.21.0
|
120
120
|
type: :development
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
124
|
- - '='
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: 0.
|
126
|
+
version: 0.21.0
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: decidim-meetings
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
131
|
- - '='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 0.
|
133
|
+
version: 0.21.0
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
138
|
- - '='
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: 0.
|
140
|
+
version: 0.21.0
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: decidim-participatory_processes
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
145
|
- - '='
|
146
146
|
- !ruby/object:Gem::Version
|
147
|
-
version: 0.
|
147
|
+
version: 0.21.0
|
148
148
|
type: :development
|
149
149
|
prerelease: false
|
150
150
|
version_requirements: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
152
152
|
- - '='
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
version: 0.
|
154
|
+
version: 0.21.0
|
155
155
|
- !ruby/object:Gem::Dependency
|
156
156
|
name: decidim-proposals
|
157
157
|
requirement: !ruby/object:Gem::Requirement
|
158
158
|
requirements:
|
159
159
|
- - '='
|
160
160
|
- !ruby/object:Gem::Version
|
161
|
-
version: 0.
|
161
|
+
version: 0.21.0
|
162
162
|
type: :development
|
163
163
|
prerelease: false
|
164
164
|
version_requirements: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
166
|
- - '='
|
167
167
|
- !ruby/object:Gem::Version
|
168
|
-
version: 0.
|
168
|
+
version: 0.21.0
|
169
169
|
description: An accountability component for decidim's participatory spaces.
|
170
170
|
email:
|
171
171
|
- josepjaume@gmail.com
|
@@ -228,6 +228,10 @@ files:
|
|
228
228
|
- app/services/decidim/accountability/result_search.rb
|
229
229
|
- app/services/decidim/accountability/result_stats_calculator.rb
|
230
230
|
- app/services/decidim/accountability/results_calculator.rb
|
231
|
+
- app/types/decidim/accountability/accountability_type.rb
|
232
|
+
- app/types/decidim/accountability/result_type.rb
|
233
|
+
- app/types/decidim/accountability/status_type.rb
|
234
|
+
- app/types/decidim/accountability/timeline_entry_type.rb
|
231
235
|
- app/views/decidim/accountability/admin/results/_form.html.erb
|
232
236
|
- app/views/decidim/accountability/admin/results/_proposals.html.erb
|
233
237
|
- app/views/decidim/accountability/admin/results/edit.html.erb
|
@@ -273,6 +277,7 @@ files:
|
|
273
277
|
- config/locales/cs.yml
|
274
278
|
- config/locales/de.yml
|
275
279
|
- config/locales/el-GR.yml
|
280
|
+
- config/locales/el.yml
|
276
281
|
- config/locales/en.yml
|
277
282
|
- config/locales/eo-UY.yml
|
278
283
|
- config/locales/es-MX.yml
|