Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

added section move buttons

Jonas Jabari43f99a13db6d
diff --git a/modules/meeting/app/components/meeting_sections/header_component.html.erb b/modules/meeting/app/components/meeting_sections/header_component.html.erb
index e1f89dc32a4..be4d99a8c3d 100644
--- a/modules/meeting/app/components/meeting_sections/header_component.html.erb
+++ b/modules/meeting/app/components/meeting_sections/header_component.html.erb
@@ -17,7 +17,7 @@
render(Primer::Alpha::ActionMenu.new(data: { test_selector: "meeting-section-action-menu" })) do |menu|
menu.with_show_button(icon: "kebab-horizontal", 'aria-label': t("settings.project_attributes.label_section_actions"), scheme: :invisible)
edit_action_item(menu)
- # move_actions(menu)
+ move_actions(menu)
if @meeting_agenda_items.empty?
delete_action_item(menu)
else
diff --git a/modules/meeting/app/components/meeting_sections/header_component.rb b/modules/meeting/app/components/meeting_sections/header_component.rb
index 7e0145ca0b5..7293583a6e2 100644
--- a/modules/meeting/app/components/meeting_sections/header_component.rb
+++ b/modules/meeting/app/components/meeting_sections/header_component.rb
@@ -72,7 +72,7 @@ module MeetingSections
def move_action_item(menu, move_to, label_text, icon)
menu.with_item(label: label_text,
- href: move_admin_settings_section_path(@meeting_section, move_to:),
+ href: move_meeting_section_path(@meeting_section.meeting, @meeting_section, move_to:),
form_arguments: {
method: :put, data: { "turbo-stream": true,
test_selector: "meeting-section-move-#{move_to}" }
diff --git a/modules/meeting/app/controllers/meeting_sections_controller.rb b/modules/meeting/app/controllers/meeting_sections_controller.rb
index ec46f6c7341..f2e74828a5d 100644
--- a/modules/meeting/app/controllers/meeting_sections_controller.rb
+++ b/modules/meeting/app/controllers/meeting_sections_controller.rb
@@ -139,10 +139,8 @@ class MeetingSectionsController < ApplicationController
.new(user: current_user, model: @meeting_section)
.call(position: params[:position].to_i)
- p call.errors
-
if call.success?
- update_all_via_turbo_stream
+ update_all_via_turbo_stream # TODO: more specific UI update
else
generic_call_failure_response(call)
end
@@ -156,8 +154,7 @@ class MeetingSectionsController < ApplicationController
.call(move_to: params[:move_to]&.to_sym)
if call.success?
- move_item_via_turbo_stream
- update_header_component_via_turbo_stream
+ update_all_via_turbo_stream # TODO: more specific UI update
else
generic_call_failure_response(call)
end