decidim-accountability 0.30.3 → 0.31.0.rc2
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 +4 -4
- data/app/cells/decidim/accountability/project/milestones.erb +22 -0
- data/app/cells/decidim/accountability/project_cell.rb +9 -9
- data/app/commands/decidim/accountability/admin/{create_timeline_entry.rb → create_milestone.rb} +3 -3
- data/app/commands/decidim/accountability/admin/{update_timeline_entry.rb → update_milestone.rb} +2 -2
- data/app/controllers/decidim/accountability/admin/import_components_controller.rb +1 -1
- data/app/controllers/decidim/accountability/admin/import_results_controller.rb +1 -1
- data/app/controllers/decidim/accountability/admin/milestones_controller.rb +87 -0
- data/app/controllers/decidim/accountability/admin/results_controller.rb +2 -2
- data/app/controllers/decidim/accountability/admin/statuses_controller.rb +2 -2
- data/app/controllers/decidim/accountability/results_controller.rb +20 -4
- data/app/controllers/decidim/accountability/versions_controller.rb +1 -1
- data/app/forms/decidim/accountability/admin/{timeline_entry_form.rb → milestone_form.rb} +2 -2
- data/app/models/decidim/accountability/{timeline_entry.rb → milestone.rb} +4 -4
- data/app/models/decidim/accountability/result.rb +2 -2
- data/app/packs/entrypoints/decidim_accountability.js +0 -2
- data/app/packs/entrypoints/decidim_accountability_admin_imports.js +1 -1
- data/app/packs/src/decidim/accountability/admin/index.js +4 -1
- data/app/packs/src/decidim/accountability/admin/result_form.js +1 -1
- data/app/packs/src/decidim/accountability/controllers/.gitkeep +0 -0
- data/app/packs/stylesheets/accountability.scss +35 -5
- data/app/permissions/decidim/accountability/admin/permissions.rb +3 -3
- data/app/presenters/decidim/accountability/admin_log/{timeline_entry_presenter.rb → milestone_presenter.rb} +4 -4
- data/app/presenters/decidim/accountability/result_presenter.rb +2 -5
- data/app/views/decidim/accountability/admin/import_components/_form.html.erb +3 -3
- data/app/views/decidim/accountability/admin/import_results/new.html.erb +1 -1
- data/app/views/decidim/accountability/admin/{timeline_entries → milestones}/edit.html.erb +1 -1
- data/app/views/decidim/accountability/admin/milestones/index.html.erb +66 -0
- data/app/views/decidim/accountability/admin/{timeline_entries → milestones}/new.html.erb +1 -1
- data/app/views/decidim/accountability/admin/results/_actions.html.erb +102 -29
- data/app/views/decidim/accountability/admin/results/_form.html.erb +1 -1
- data/app/views/decidim/accountability/admin/results/_result-tr.html.erb +7 -7
- data/app/views/decidim/accountability/admin/results/bulk_actions/_dropdown.html.erb +25 -29
- data/app/views/decidim/accountability/admin/results/index.html.erb +12 -12
- data/app/views/decidim/accountability/admin/results/manage_trash.html.erb +2 -1
- data/app/views/decidim/accountability/admin/shared/_subnav.html.erb +1 -1
- data/app/views/decidim/accountability/admin/statuses/index.html.erb +40 -12
- data/app/views/decidim/accountability/results/_filters.html.erb +4 -0
- data/app/views/decidim/accountability/results/_home_aside.html.erb +12 -0
- data/app/views/decidim/accountability/results/_home_taxonomies.html.erb +8 -31
- data/app/views/decidim/accountability/results/_one_level_taxonomies.html.erb +17 -0
- data/app/views/decidim/accountability/results/_projects_aside.html.erb +1 -3
- data/app/views/decidim/accountability/results/_root_taxonomies_selector.html.erb +17 -0
- data/app/views/decidim/accountability/results/_two_levels_taxonomies.html.erb +30 -0
- data/app/views/decidim/accountability/results/home.html.erb +11 -25
- data/config/assets.rb +2 -2
- data/config/locales/ar.yml +0 -42
- data/config/locales/bg.yml +0 -41
- data/config/locales/bs-BA.yml +4 -25
- data/config/locales/ca-IT.yml +42 -44
- data/config/locales/ca.yml +42 -44
- data/config/locales/cs.yml +42 -44
- data/config/locales/da.yml +0 -21
- data/config/locales/de.yml +42 -44
- data/config/locales/el.yml +0 -37
- data/config/locales/en.yml +42 -44
- data/config/locales/es-MX.yml +42 -44
- data/config/locales/es-PY.yml +42 -44
- data/config/locales/es.yml +42 -44
- data/config/locales/eu.yml +43 -45
- data/config/locales/fi-plain.yml +42 -44
- data/config/locales/fi.yml +42 -44
- data/config/locales/fr-CA.yml +42 -44
- data/config/locales/fr.yml +42 -44
- data/config/locales/ga-IE.yml +0 -11
- data/config/locales/gl.yml +0 -25
- data/config/locales/gn-PY.yml +0 -2
- data/config/locales/he-IL.yml +0 -41
- data/config/locales/hu.yml +0 -41
- data/config/locales/id-ID.yml +0 -23
- data/config/locales/is-IS.yml +0 -24
- data/config/locales/it.yml +40 -43
- data/config/locales/ja.yml +42 -44
- data/config/locales/kaa.yml +0 -5
- data/config/locales/ko.yml +0 -15
- data/config/locales/lb.yml +0 -25
- data/config/locales/lt.yml +0 -37
- data/config/locales/lv.yml +0 -23
- data/config/locales/nl.yml +0 -29
- data/config/locales/no.yml +0 -29
- data/config/locales/pl.yml +0 -41
- data/config/locales/pt-BR.yml +39 -43
- data/config/locales/pt.yml +0 -26
- data/config/locales/ro-RO.yml +6 -41
- data/config/locales/ru.yml +0 -23
- data/config/locales/si-LK.yml +0 -12
- data/config/locales/sk.yml +0 -23
- data/config/locales/sl.yml +0 -18
- data/config/locales/sq-AL.yml +0 -41
- data/config/locales/sr-CS.yml +0 -23
- data/config/locales/sv.yml +42 -44
- data/config/locales/th-TH.yml +0 -27
- data/config/locales/tr-TR.yml +0 -43
- data/config/locales/uk.yml +0 -21
- data/config/locales/zh-CN.yml +0 -23
- data/config/locales/zh-TW.yml +0 -37
- data/db/migrate/20250606155946_rename_timeline_table_to_milestone.rb +11 -0
- data/lib/decidim/accountability/admin_engine.rb +1 -1
- data/lib/decidim/accountability/api.rb +1 -1
- data/lib/decidim/accountability/component.rb +18 -1
- data/lib/decidim/accountability/engine.rb +5 -13
- data/lib/decidim/accountability/seeds.rb +9 -9
- data/lib/decidim/accountability/test/factories.rb +3 -3
- data/lib/decidim/accountability/version.rb +1 -1
- data/lib/decidim/accountability.rb +0 -7
- data/lib/decidim/api/{timeline_entry_type.rb → milestone_type.rb} +8 -7
- data/lib/decidim/api/result_type.rb +17 -3
- data/lib/decidim/api/status_type.rb +1 -0
- metadata +38 -34
- data/app/cells/decidim/accountability/project/timeline.erb +0 -22
- data/app/controllers/decidim/accountability/admin/timeline_entries_controller.rb +0 -87
- data/app/packs/src/decidim/accountability/index.js +0 -11
- data/app/packs/src/decidim/accountability/version_diff.js +0 -33
- data/app/queries/decidim/accountability/metrics/results_metric_manage.rb +0 -56
- data/app/views/decidim/accountability/admin/timeline_entries/index.html.erb +0 -42
- /data/app/views/decidim/accountability/admin/{timeline_entries → milestones}/_form.html.erb +0 -0
data/config/locales/zh-TW.yml
CHANGED
|
@@ -17,9 +17,6 @@ zh-TW:
|
|
|
17
17
|
key: 金鑰
|
|
18
18
|
name: 名稱
|
|
19
19
|
progress: 進度
|
|
20
|
-
timeline_entry:
|
|
21
|
-
description: 說明
|
|
22
|
-
title: 標題
|
|
23
20
|
models:
|
|
24
21
|
decidim/accountability/proposal_linked_event: 在結果的建議
|
|
25
22
|
decidim/accountability/result_progress_updated_event: 結果程序已更新
|
|
@@ -30,13 +27,10 @@ zh-TW:
|
|
|
30
27
|
decidim:
|
|
31
28
|
accountability:
|
|
32
29
|
actions:
|
|
33
|
-
attachment_collections: 資料夾
|
|
34
|
-
attachments: 附件
|
|
35
30
|
confirm_destroy: 確定要刪除 %{name} ?
|
|
36
31
|
destroy: 刪除
|
|
37
32
|
edit: 編輯
|
|
38
33
|
preview: 預覽
|
|
39
|
-
timeline_entries: 專案評估
|
|
40
34
|
title: 操作
|
|
41
35
|
admin:
|
|
42
36
|
exports:
|
|
@@ -89,23 +83,6 @@ zh-TW:
|
|
|
89
83
|
update:
|
|
90
84
|
invalid: 更新狀態時發生錯誤.
|
|
91
85
|
success: 狀態成功更新.
|
|
92
|
-
timeline_entries:
|
|
93
|
-
create:
|
|
94
|
-
invalid: 建立資料時發生錯誤.
|
|
95
|
-
success: 資料成功建立.
|
|
96
|
-
destroy:
|
|
97
|
-
success: 資料成功刪除.
|
|
98
|
-
edit:
|
|
99
|
-
title: 編輯資料
|
|
100
|
-
update: 更新資料
|
|
101
|
-
index:
|
|
102
|
-
title: 專案時程資料
|
|
103
|
-
new:
|
|
104
|
-
create: 建立資料
|
|
105
|
-
title: 新資料
|
|
106
|
-
update:
|
|
107
|
-
invalid: 更新資料時發生錯誤.
|
|
108
|
-
success: 資料成功更新.
|
|
109
86
|
admin_log:
|
|
110
87
|
result:
|
|
111
88
|
create: "%{user_name} 建立結果 %{resource_name} 在 %{space_name}"
|
|
@@ -115,10 +92,6 @@ zh-TW:
|
|
|
115
92
|
create: "%{user_name} 建立了 %{resource_name} 狀態"
|
|
116
93
|
delete: "%{user_name} 刪除了 %{resource_name} 狀態"
|
|
117
94
|
update: "%{user_name} 更新了 %{resource_name} 狀態"
|
|
118
|
-
timeline_entry:
|
|
119
|
-
create: "%{user_name} 建立了 %{resource_name} 時間表資料"
|
|
120
|
-
delete: "%{user_name} 刪除了 %{resource_name} 時間表資料"
|
|
121
|
-
update: "%{user_name} 更新了 %{resource_name} 時間表資料"
|
|
122
95
|
value_types:
|
|
123
96
|
parent_presenter:
|
|
124
97
|
not_found: '資料庫中找不到上一層 (ID: %{id})'
|
|
@@ -156,9 +129,6 @@ zh-TW:
|
|
|
156
129
|
key: 金鑰
|
|
157
130
|
name: 名稱
|
|
158
131
|
progress: 進度
|
|
159
|
-
timeline_entry:
|
|
160
|
-
fields:
|
|
161
|
-
title: 標題
|
|
162
132
|
results:
|
|
163
133
|
count:
|
|
164
134
|
results_count:
|
|
@@ -170,8 +140,6 @@ zh-TW:
|
|
|
170
140
|
show:
|
|
171
141
|
stats:
|
|
172
142
|
back_to_resource: 返回至結果
|
|
173
|
-
timeline:
|
|
174
|
-
title: 專案評估
|
|
175
143
|
admin:
|
|
176
144
|
filters:
|
|
177
145
|
results:
|
|
@@ -202,11 +170,6 @@ zh-TW:
|
|
|
202
170
|
email_outro: 收到這個通知表示正在訂閱 "%{proposal_title}" ,而這個提案包含在結果 "%{resource_title}" ,透過下面連結可以停止接收通知。
|
|
203
171
|
email_subject: '%{resource_title} 的更新進度'
|
|
204
172
|
notification_title: 這個結果 <a href="%{resource_path}">%{resource_title}</a> 包含提案 <a href="%{proposal_path}">%{proposal_title}</a>,現在完成 %{progress}% 。
|
|
205
|
-
metrics:
|
|
206
|
-
results:
|
|
207
|
-
description: 產生的結果數量
|
|
208
|
-
object: 結果
|
|
209
|
-
title: 結果
|
|
210
173
|
participatory_spaces:
|
|
211
174
|
highlighted_results:
|
|
212
175
|
see_all: 檢視所有結果 (%{count})
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class RenameTimelineTableToMilestone < ActiveRecord::Migration[7.2]
|
|
4
|
+
def change
|
|
5
|
+
rename_table :decidim_accountability_timeline_entries, :decidim_accountability_milestones
|
|
6
|
+
|
|
7
|
+
rename_index :decidim_accountability_milestones,
|
|
8
|
+
"index_decidim_accountability_timeline_entries_on_results_id",
|
|
9
|
+
"index_decidim_accountability_milestones_on_results_id"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -30,7 +30,7 @@ module Decidim
|
|
|
30
30
|
|
|
31
31
|
resources :attachment_collections, except: [:show]
|
|
32
32
|
resources :attachments, except: [:show]
|
|
33
|
-
resources :
|
|
33
|
+
resources :milestones, except: [:show]
|
|
34
34
|
end
|
|
35
35
|
resources :import_components, only: [:new, :create] do
|
|
36
36
|
get :preview, on: :collection
|
|
@@ -5,6 +5,6 @@ module Decidim
|
|
|
5
5
|
autoload :AccountabilityType, "decidim/api/accountability_type"
|
|
6
6
|
autoload :ResultType, "decidim/api/result_type"
|
|
7
7
|
autoload :StatusType, "decidim/api/status_type"
|
|
8
|
-
autoload :
|
|
8
|
+
autoload :MilestoneType, "decidim/api/milestone_type"
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
Decidim.register_component(:accountability) do |component|
|
|
4
|
+
include Decidim::TranslatableAttributes
|
|
5
|
+
|
|
4
6
|
component.engine = Decidim::Accountability::Engine
|
|
5
7
|
component.admin_engine = Decidim::Accountability::AdminEngine
|
|
6
8
|
component.icon = "media/images/decidim_accountability.svg"
|
|
@@ -31,9 +33,24 @@ Decidim.register_component(:accountability) do |component|
|
|
|
31
33
|
settings.attribute :intro, type: :text, translated: true, editor: true
|
|
32
34
|
settings.attribute :display_progress_enabled, type: :boolean, default: true
|
|
33
35
|
settings.attribute :geocoding_enabled, type: :boolean, default: false
|
|
36
|
+
settings.attribute :default_taxonomy, type: :select, include_blank: true, raw_choices: true, choices: lambda { |context|
|
|
37
|
+
context[:component].available_root_taxonomies.map { |taxonomy| [translated_attribute(taxonomy.name), taxonomy.id] }
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
component.register_stat :results_count,
|
|
42
|
+
primary: true,
|
|
43
|
+
priority: Decidim::StatsRegistry::MEDIUM_PRIORITY,
|
|
44
|
+
icon_name: "briefcase-2-line",
|
|
45
|
+
tooltip_key: "results_count_tooltip" do |components, _start_at, _end_at|
|
|
46
|
+
Decidim::Accountability::Result.where(component: components).count
|
|
34
47
|
end
|
|
35
48
|
|
|
36
|
-
component.register_stat :
|
|
49
|
+
component.register_stat :comments_count,
|
|
50
|
+
priority: Decidim::StatsRegistry::HIGH_PRIORITY,
|
|
51
|
+
icon_name: "chat-1-line",
|
|
52
|
+
tooltip_key: "comments_count",
|
|
53
|
+
tag: :comments do |components, _start_at, _end_at|
|
|
37
54
|
Decidim::Accountability::Result.where(component: components).count
|
|
38
55
|
end
|
|
39
56
|
|
|
@@ -13,6 +13,10 @@ module Decidim
|
|
|
13
13
|
routes do
|
|
14
14
|
resources :results, only: [:index, :show] do
|
|
15
15
|
resources :versions, only: [:show]
|
|
16
|
+
|
|
17
|
+
collection do
|
|
18
|
+
get :home
|
|
19
|
+
end
|
|
16
20
|
end
|
|
17
21
|
root to: "results#home"
|
|
18
22
|
end
|
|
@@ -38,19 +42,7 @@ module Decidim
|
|
|
38
42
|
Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Accountability::Engine.root}/app/views")
|
|
39
43
|
end
|
|
40
44
|
|
|
41
|
-
initializer "decidim_accountability.
|
|
42
|
-
Decidim.metrics_registry.register(:results) do |metric_registry|
|
|
43
|
-
metric_registry.manager_class = "Decidim::Accountability::Metrics::ResultsMetricManage"
|
|
44
|
-
|
|
45
|
-
metric_registry.settings do |settings|
|
|
46
|
-
settings.attribute :highlighted, type: :boolean, default: false
|
|
47
|
-
settings.attribute :scopes, type: :array, default: %w(home)
|
|
48
|
-
settings.attribute :weight, type: :integer, default: 4
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
initializer "decidim_accountability.webpacker.assets_path" do
|
|
45
|
+
initializer "decidim_accountability.shakapacker.assets_path" do
|
|
54
46
|
Decidim.register_assets_path File.expand_path("app/packs", root)
|
|
55
47
|
end
|
|
56
48
|
end
|
|
@@ -16,7 +16,7 @@ module Decidim
|
|
|
16
16
|
|
|
17
17
|
create_statuses!(component:)
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
number_of_records.times do
|
|
20
20
|
taxonomies = create_taxonomies!
|
|
21
21
|
|
|
22
22
|
taxonomies.each do |taxonomy|
|
|
@@ -27,7 +27,7 @@ module Decidim
|
|
|
27
27
|
|
|
28
28
|
def create_component!
|
|
29
29
|
params = {
|
|
30
|
-
name: Decidim::Components::Namer.new(
|
|
30
|
+
name: Decidim::Components::Namer.new(organization.available_locales, :accountability).i18n_name,
|
|
31
31
|
manifest_name: :accountability,
|
|
32
32
|
published_at: Time.current,
|
|
33
33
|
participatory_space:,
|
|
@@ -53,19 +53,19 @@ module Decidim
|
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
def root_taxonomy
|
|
56
|
-
@root_taxonomy ||=
|
|
57
|
-
|
|
56
|
+
@root_taxonomy ||= organization.taxonomies.roots.find_by("name->>'#{I18n.locale}'= ?",
|
|
57
|
+
"Categories") || organization.taxonomies.roots.sample
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def create_taxonomies!
|
|
61
|
-
parent_taxonomy = root_taxonomy.children.sample ||
|
|
61
|
+
parent_taxonomy = root_taxonomy.children.sample || create_taxonomy!(name: ::Faker::Lorem.sentence(word_count: 5), parent: root_taxonomy)
|
|
62
62
|
taxonomies = [parent_taxonomy]
|
|
63
63
|
|
|
64
64
|
2.times do
|
|
65
65
|
taxonomies << if parent_taxonomy.children.count > 1
|
|
66
66
|
parent_taxonomy.children.sample
|
|
67
67
|
else
|
|
68
|
-
|
|
68
|
+
create_taxonomy!(name: ::Faker::Lorem.sentence(word_count: 5), parent: parent_taxonomy)
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
@@ -96,7 +96,7 @@ module Decidim
|
|
|
96
96
|
|
|
97
97
|
Decidim::Comments::Seed.comments_for(result)
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
number_of_records.times do
|
|
100
100
|
child_result = Decidim.traceability.create!(
|
|
101
101
|
Decidim::Accountability::Result,
|
|
102
102
|
admin_user,
|
|
@@ -115,8 +115,8 @@ module Decidim
|
|
|
115
115
|
visibility: "all"
|
|
116
116
|
)
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
child_result.
|
|
118
|
+
number_of_records.times do |i|
|
|
119
|
+
child_result.milestones.create!(
|
|
120
120
|
entry_date: child_result.start_date + i.days,
|
|
121
121
|
title: Decidim::Faker::Localized.sentence(word_count: 2),
|
|
122
122
|
description: Decidim::Faker::Localized.paragraph(sentence_count: 1)
|
|
@@ -50,13 +50,13 @@ FactoryBot.define do
|
|
|
50
50
|
longitude { Faker::Address.longitude }
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
-
factory :
|
|
53
|
+
factory :milestone, class: "Decidim::Accountability::Milestone" do
|
|
54
54
|
transient do
|
|
55
55
|
skip_injection { false }
|
|
56
56
|
end
|
|
57
57
|
result { create(:result, skip_injection:) }
|
|
58
58
|
entry_date { "12/7/2017" }
|
|
59
|
-
title { generate_localized_title(:
|
|
60
|
-
description { generate_localized_title(:
|
|
59
|
+
title { generate_localized_title(:milestone_title, skip_injection:) }
|
|
60
|
+
description { generate_localized_title(:milestone_description, skip_injection:) }
|
|
61
61
|
end
|
|
62
62
|
end
|
|
@@ -10,12 +10,5 @@ module Decidim
|
|
|
10
10
|
# Base module for this engine.
|
|
11
11
|
module Accountability
|
|
12
12
|
autoload :ResultSerializer, "decidim/accountability/result_serializer"
|
|
13
|
-
|
|
14
|
-
include ActiveSupport::Configurable
|
|
15
|
-
|
|
16
|
-
# Public Setting that defines whether proposals can be linked to meetings
|
|
17
|
-
config_accessor :enable_proposal_linking do
|
|
18
|
-
Decidim.const_defined?("Proposals")
|
|
19
|
-
end
|
|
20
13
|
end
|
|
21
14
|
end
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
module Decidim
|
|
4
4
|
module Accountability
|
|
5
|
-
class
|
|
5
|
+
class MilestoneType < Decidim::Api::Types::BaseObject
|
|
6
6
|
implements Decidim::Core::TimestampsInterface
|
|
7
|
+
implements Decidim::Core::TraceableInterface
|
|
7
8
|
|
|
8
|
-
description "A
|
|
9
|
+
description "A Milestone"
|
|
9
10
|
|
|
10
|
-
field :description, Decidim::Core::TranslatedFieldType, "The description for this
|
|
11
|
-
field :entry_date, Decidim::Core::DateType, "The entry date for this
|
|
12
|
-
field :id, GraphQL::Types::ID, "The internal ID for this
|
|
13
|
-
field :result, Decidim::Accountability::ResultType, "The result for this
|
|
14
|
-
field :title, Decidim::Core::TranslatedFieldType, "The title for this
|
|
11
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description for this milestone", null: true
|
|
12
|
+
field :entry_date, Decidim::Core::DateType, "The entry date for this milestone", null: true
|
|
13
|
+
field :id, GraphQL::Types::ID, "The internal ID for this milestone", null: false
|
|
14
|
+
field :result, Decidim::Accountability::ResultType, "The result for this milestone", null: true
|
|
15
|
+
field :title, Decidim::Core::TranslatedFieldType, "The title for this milestone", null: true
|
|
15
16
|
end
|
|
16
17
|
end
|
|
17
18
|
end
|
|
@@ -3,9 +3,14 @@
|
|
|
3
3
|
module Decidim
|
|
4
4
|
module Accountability
|
|
5
5
|
class ResultType < Decidim::Api::Types::BaseObject
|
|
6
|
+
implements Decidim::Core::ReferableInterface
|
|
7
|
+
implements Decidim::Comments::CommentableInterface
|
|
8
|
+
implements Decidim::Core::AttachableInterface
|
|
9
|
+
implements Decidim::Core::AttachableCollectionInterface
|
|
10
|
+
implements Decidim::Core::LocalizableInterface
|
|
6
11
|
implements Decidim::Core::TaxonomizableInterface
|
|
7
12
|
implements Decidim::Core::TimestampsInterface
|
|
8
|
-
implements Decidim::
|
|
13
|
+
implements Decidim::Core::TraceableInterface
|
|
9
14
|
|
|
10
15
|
description "A result"
|
|
11
16
|
|
|
@@ -15,14 +20,23 @@ module Decidim
|
|
|
15
20
|
field :end_date, Decidim::Core::DateType, "The end date for this result", null: true
|
|
16
21
|
field :external_id, GraphQL::Types::String, "The external ID for this result", null: true
|
|
17
22
|
field :id, GraphQL::Types::ID, "The internal ID for this result", null: false
|
|
23
|
+
field :milestones, [Decidim::Accountability::MilestoneType, { null: true }], "The milestones for this result", null: true
|
|
18
24
|
field :parent, Decidim::Accountability::ResultType, "The parent result", null: true
|
|
19
25
|
field :progress, GraphQL::Types::Float, "The progress for this result", null: true
|
|
20
|
-
field :
|
|
26
|
+
field :proposals, [Decidim::Proposals::ProposalType, { null: true }], "The proposal URLs for this result", null: true
|
|
21
27
|
field :start_date, Decidim::Core::DateType, "The start date for this result", null: true
|
|
22
28
|
field :status, Decidim::Accountability::StatusType, "The status for this result", null: true
|
|
23
|
-
field :timeline_entries, [Decidim::Accountability::TimelineEntryType, { null: true }], "The timeline entries for this result", null: true
|
|
24
29
|
field :title, Decidim::Core::TranslatedFieldType, "The title for this result", null: true
|
|
30
|
+
field :url, String, "The URL for this result", null: false
|
|
25
31
|
field :weight, GraphQL::Types::Int, "The order of this result", null: false
|
|
32
|
+
|
|
33
|
+
def url
|
|
34
|
+
Decidim::ResourceLocatorPresenter.new(object).url
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def proposals
|
|
38
|
+
object.linked_resources(:proposals, "included_proposals").sort_by(&:id)
|
|
39
|
+
end
|
|
26
40
|
end
|
|
27
41
|
end
|
|
28
42
|
end
|
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.31.0.rc2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josep Jaume Rey Peroy
|
|
@@ -18,126 +18,126 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - '='
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 0.
|
|
21
|
+
version: 0.31.0.rc2
|
|
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.31.0.rc2
|
|
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.31.0.rc2
|
|
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.31.0.rc2
|
|
43
43
|
- !ruby/object:Gem::Dependency
|
|
44
44
|
name: decidim-admin
|
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
|
46
46
|
requirements:
|
|
47
47
|
- - '='
|
|
48
48
|
- !ruby/object:Gem::Version
|
|
49
|
-
version: 0.
|
|
49
|
+
version: 0.31.0.rc2
|
|
50
50
|
type: :development
|
|
51
51
|
prerelease: false
|
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
|
53
53
|
requirements:
|
|
54
54
|
- - '='
|
|
55
55
|
- !ruby/object:Gem::Version
|
|
56
|
-
version: 0.
|
|
56
|
+
version: 0.31.0.rc2
|
|
57
57
|
- !ruby/object:Gem::Dependency
|
|
58
58
|
name: decidim-assemblies
|
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
|
60
60
|
requirements:
|
|
61
61
|
- - '='
|
|
62
62
|
- !ruby/object:Gem::Version
|
|
63
|
-
version: 0.
|
|
63
|
+
version: 0.31.0.rc2
|
|
64
64
|
type: :development
|
|
65
65
|
prerelease: false
|
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
|
67
67
|
requirements:
|
|
68
68
|
- - '='
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
|
-
version: 0.
|
|
70
|
+
version: 0.31.0.rc2
|
|
71
71
|
- !ruby/object:Gem::Dependency
|
|
72
72
|
name: decidim-comments
|
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
|
74
74
|
requirements:
|
|
75
75
|
- - '='
|
|
76
76
|
- !ruby/object:Gem::Version
|
|
77
|
-
version: 0.
|
|
77
|
+
version: 0.31.0.rc2
|
|
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.31.0.rc2
|
|
85
85
|
- !ruby/object:Gem::Dependency
|
|
86
86
|
name: decidim-dev
|
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
|
88
88
|
requirements:
|
|
89
89
|
- - '='
|
|
90
90
|
- !ruby/object:Gem::Version
|
|
91
|
-
version: 0.
|
|
91
|
+
version: 0.31.0.rc2
|
|
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.31.0.rc2
|
|
99
99
|
- !ruby/object:Gem::Dependency
|
|
100
100
|
name: decidim-meetings
|
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
|
102
102
|
requirements:
|
|
103
103
|
- - '='
|
|
104
104
|
- !ruby/object:Gem::Version
|
|
105
|
-
version: 0.
|
|
105
|
+
version: 0.31.0.rc2
|
|
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.31.0.rc2
|
|
113
113
|
- !ruby/object:Gem::Dependency
|
|
114
114
|
name: decidim-participatory_processes
|
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
|
116
116
|
requirements:
|
|
117
117
|
- - '='
|
|
118
118
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: 0.
|
|
119
|
+
version: 0.31.0.rc2
|
|
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.31.0.rc2
|
|
127
127
|
- !ruby/object:Gem::Dependency
|
|
128
128
|
name: decidim-proposals
|
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
|
130
130
|
requirements:
|
|
131
131
|
- - '='
|
|
132
132
|
- !ruby/object:Gem::Version
|
|
133
|
-
version: 0.
|
|
133
|
+
version: 0.31.0.rc2
|
|
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.31.0.rc2
|
|
141
141
|
description: An accountability component for decidim's participatory spaces.
|
|
142
142
|
email:
|
|
143
143
|
- josepjaume@gmail.com
|
|
@@ -154,8 +154,8 @@ files:
|
|
|
154
154
|
- app/cells/decidim/accountability/highlighted_results_cell.rb
|
|
155
155
|
- app/cells/decidim/accountability/highlighted_results_for_component/show.erb
|
|
156
156
|
- app/cells/decidim/accountability/highlighted_results_for_component_cell.rb
|
|
157
|
+
- app/cells/decidim/accountability/project/milestones.erb
|
|
157
158
|
- app/cells/decidim/accountability/project/show.erb
|
|
158
|
-
- app/cells/decidim/accountability/project/timeline.erb
|
|
159
159
|
- app/cells/decidim/accountability/project_cell.rb
|
|
160
160
|
- app/cells/decidim/accountability/result_activity_cell.rb
|
|
161
161
|
- app/cells/decidim/accountability/result_card_cell.rb
|
|
@@ -173,28 +173,28 @@ files:
|
|
|
173
173
|
- app/cells/decidim/accountability/status/status.erb
|
|
174
174
|
- app/cells/decidim/accountability/status_cell.rb
|
|
175
175
|
- app/commands/decidim/accountability/admin/create_imported_result.rb
|
|
176
|
+
- app/commands/decidim/accountability/admin/create_milestone.rb
|
|
176
177
|
- app/commands/decidim/accountability/admin/create_result.rb
|
|
177
178
|
- app/commands/decidim/accountability/admin/create_status.rb
|
|
178
|
-
- app/commands/decidim/accountability/admin/create_timeline_entry.rb
|
|
179
179
|
- app/commands/decidim/accountability/admin/has_result_command.rb
|
|
180
180
|
- app/commands/decidim/accountability/admin/import_component_to_accountability.rb
|
|
181
181
|
- app/commands/decidim/accountability/admin/update_imported_result.rb
|
|
182
|
+
- app/commands/decidim/accountability/admin/update_milestone.rb
|
|
182
183
|
- app/commands/decidim/accountability/admin/update_result.rb
|
|
183
184
|
- app/commands/decidim/accountability/admin/update_result_dates.rb
|
|
184
185
|
- app/commands/decidim/accountability/admin/update_result_status.rb
|
|
185
186
|
- app/commands/decidim/accountability/admin/update_result_taxonomies.rb
|
|
186
187
|
- app/commands/decidim/accountability/admin/update_status.rb
|
|
187
|
-
- app/commands/decidim/accountability/admin/update_timeline_entry.rb
|
|
188
188
|
- app/controllers/concerns/decidim/accountability/admin/filterable.rb
|
|
189
189
|
- app/controllers/decidim/accountability/admin/application_controller.rb
|
|
190
190
|
- app/controllers/decidim/accountability/admin/attachment_collections_controller.rb
|
|
191
191
|
- app/controllers/decidim/accountability/admin/attachments_controller.rb
|
|
192
192
|
- app/controllers/decidim/accountability/admin/import_components_controller.rb
|
|
193
193
|
- app/controllers/decidim/accountability/admin/import_results_controller.rb
|
|
194
|
+
- app/controllers/decidim/accountability/admin/milestones_controller.rb
|
|
194
195
|
- app/controllers/decidim/accountability/admin/results_bulk_actions_controller.rb
|
|
195
196
|
- app/controllers/decidim/accountability/admin/results_controller.rb
|
|
196
197
|
- app/controllers/decidim/accountability/admin/statuses_controller.rb
|
|
197
|
-
- app/controllers/decidim/accountability/admin/timeline_entries_controller.rb
|
|
198
198
|
- app/controllers/decidim/accountability/application_controller.rb
|
|
199
199
|
- app/controllers/decidim/accountability/results_controller.rb
|
|
200
200
|
- app/controllers/decidim/accountability/versions_controller.rb
|
|
@@ -203,10 +203,10 @@ files:
|
|
|
203
203
|
- app/events/decidim/accountability/result_progress_updated_event.rb
|
|
204
204
|
- app/forms/decidim/accountability/admin/import_component_form.rb
|
|
205
205
|
- app/forms/decidim/accountability/admin/import_results_form.rb
|
|
206
|
+
- app/forms/decidim/accountability/admin/milestone_form.rb
|
|
206
207
|
- app/forms/decidim/accountability/admin/result_bulk_actions_form.rb
|
|
207
208
|
- app/forms/decidim/accountability/admin/result_form.rb
|
|
208
209
|
- app/forms/decidim/accountability/admin/status_form.rb
|
|
209
|
-
- app/forms/decidim/accountability/admin/timeline_entry_form.rb
|
|
210
210
|
- app/helpers/decidim/accountability/admin/application_helper.rb
|
|
211
211
|
- app/helpers/decidim/accountability/admin/filterable_helper.rb
|
|
212
212
|
- app/helpers/decidim/accountability/application_helper.rb
|
|
@@ -219,9 +219,9 @@ files:
|
|
|
219
219
|
- app/mailers/decidim/accountability/import_projects_mailer.rb
|
|
220
220
|
- app/mailers/decidim/accountability/import_proposals_mailer.rb
|
|
221
221
|
- app/models/decidim/accountability/application_record.rb
|
|
222
|
+
- app/models/decidim/accountability/milestone.rb
|
|
222
223
|
- app/models/decidim/accountability/result.rb
|
|
223
224
|
- app/models/decidim/accountability/status.rb
|
|
224
|
-
- app/models/decidim/accountability/timeline_entry.rb
|
|
225
225
|
- app/packs/entrypoints/decidim_accountability.js
|
|
226
226
|
- app/packs/entrypoints/decidim_accountability_admin_form.js
|
|
227
227
|
- app/packs/entrypoints/decidim_accountability_admin_imports.js
|
|
@@ -236,17 +236,15 @@ files:
|
|
|
236
236
|
- app/packs/src/decidim/accountability/admin/index/counter.js
|
|
237
237
|
- app/packs/src/decidim/accountability/admin/index/select_all.js
|
|
238
238
|
- app/packs/src/decidim/accountability/admin/result_form.js
|
|
239
|
-
- app/packs/src/decidim/accountability/
|
|
240
|
-
- app/packs/src/decidim/accountability/version_diff.js
|
|
239
|
+
- app/packs/src/decidim/accountability/controllers/.gitkeep
|
|
241
240
|
- app/packs/stylesheets/accountability.scss
|
|
242
241
|
- app/permissions/decidim/accountability/admin/permissions.rb
|
|
243
242
|
- app/permissions/decidim/accountability/permissions.rb
|
|
243
|
+
- app/presenters/decidim/accountability/admin_log/milestone_presenter.rb
|
|
244
244
|
- app/presenters/decidim/accountability/admin_log/result_presenter.rb
|
|
245
245
|
- app/presenters/decidim/accountability/admin_log/status_presenter.rb
|
|
246
|
-
- app/presenters/decidim/accountability/admin_log/timeline_entry_presenter.rb
|
|
247
246
|
- app/presenters/decidim/accountability/admin_log/value_types/parent_presenter.rb
|
|
248
247
|
- app/presenters/decidim/accountability/result_presenter.rb
|
|
249
|
-
- app/queries/decidim/accountability/metrics/results_metric_manage.rb
|
|
250
248
|
- app/services/decidim/accountability/diff_renderer.rb
|
|
251
249
|
- app/services/decidim/accountability/results_calculator.rb
|
|
252
250
|
- app/services/decidim/accountability/results_csv_importer.rb
|
|
@@ -254,6 +252,10 @@ files:
|
|
|
254
252
|
- app/views/decidim/accountability/admin/import_components/_form.html.erb
|
|
255
253
|
- app/views/decidim/accountability/admin/import_components/new.html.erb
|
|
256
254
|
- app/views/decidim/accountability/admin/import_results/new.html.erb
|
|
255
|
+
- app/views/decidim/accountability/admin/milestones/_form.html.erb
|
|
256
|
+
- app/views/decidim/accountability/admin/milestones/edit.html.erb
|
|
257
|
+
- app/views/decidim/accountability/admin/milestones/index.html.erb
|
|
258
|
+
- app/views/decidim/accountability/admin/milestones/new.html.erb
|
|
257
259
|
- app/views/decidim/accountability/admin/results/_actions.html.erb
|
|
258
260
|
- app/views/decidim/accountability/admin/results/_form.html.erb
|
|
259
261
|
- app/views/decidim/accountability/admin/results/_result-tr.html.erb
|
|
@@ -272,18 +274,19 @@ files:
|
|
|
272
274
|
- app/views/decidim/accountability/admin/statuses/edit.html.erb
|
|
273
275
|
- app/views/decidim/accountability/admin/statuses/index.html.erb
|
|
274
276
|
- app/views/decidim/accountability/admin/statuses/new.html.erb
|
|
275
|
-
- app/views/decidim/accountability/admin/timeline_entries/_form.html.erb
|
|
276
|
-
- app/views/decidim/accountability/admin/timeline_entries/edit.html.erb
|
|
277
|
-
- app/views/decidim/accountability/admin/timeline_entries/index.html.erb
|
|
278
|
-
- app/views/decidim/accountability/admin/timeline_entries/new.html.erb
|
|
279
277
|
- app/views/decidim/accountability/import_mailer/import.html.erb
|
|
280
278
|
- app/views/decidim/accountability/import_projects_mailer/import.html.erb
|
|
281
279
|
- app/views/decidim/accountability/import_proposals_mailer/import.html.erb
|
|
280
|
+
- app/views/decidim/accountability/results/_filters.html.erb
|
|
281
|
+
- app/views/decidim/accountability/results/_home_aside.html.erb
|
|
282
282
|
- app/views/decidim/accountability/results/_home_taxonomies.html.erb
|
|
283
283
|
- app/views/decidim/accountability/results/_linked_results.html.erb
|
|
284
|
+
- app/views/decidim/accountability/results/_one_level_taxonomies.html.erb
|
|
284
285
|
- app/views/decidim/accountability/results/_project.html.erb
|
|
285
286
|
- app/views/decidim/accountability/results/_projects_aside.html.erb
|
|
287
|
+
- app/views/decidim/accountability/results/_root_taxonomies_selector.html.erb
|
|
286
288
|
- app/views/decidim/accountability/results/_search.html.erb
|
|
289
|
+
- app/views/decidim/accountability/results/_two_levels_taxonomies.html.erb
|
|
287
290
|
- app/views/decidim/accountability/results/home.html.erb
|
|
288
291
|
- app/views/decidim/accountability/results/index.html.erb
|
|
289
292
|
- app/views/decidim/accountability/results/index.js.erb
|
|
@@ -390,6 +393,7 @@ files:
|
|
|
390
393
|
- db/migrate/20220331150155_move_legacy_description_to_title_of_timeline_entries.rb
|
|
391
394
|
- db/migrate/20240828103202_add_deleted_at_to_decidim_accountability_results.rb
|
|
392
395
|
- db/migrate/20240916112128_add_geolocation_fields_to_results.rb
|
|
396
|
+
- db/migrate/20250606155946_rename_timeline_table_to_milestone.rb
|
|
393
397
|
- decidim-accountability.gemspec
|
|
394
398
|
- lib/decidim/accountability.rb
|
|
395
399
|
- lib/decidim/accountability/admin.rb
|
|
@@ -402,9 +406,9 @@ files:
|
|
|
402
406
|
- lib/decidim/accountability/test/factories.rb
|
|
403
407
|
- lib/decidim/accountability/version.rb
|
|
404
408
|
- lib/decidim/api/accountability_type.rb
|
|
409
|
+
- lib/decidim/api/milestone_type.rb
|
|
405
410
|
- lib/decidim/api/result_type.rb
|
|
406
411
|
- lib/decidim/api/status_type.rb
|
|
407
|
-
- lib/decidim/api/timeline_entry_type.rb
|
|
408
412
|
homepage: https://decidim.org
|
|
409
413
|
licenses:
|
|
410
414
|
- AGPL-3.0-or-later
|