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

Refactor & tweak

Mir Bhatia77763a9db20c
diff --git a/frontend/src/stimulus/controllers/dynamic/meeting-outcome-form.controller.ts b/frontend/src/stimulus/controllers/dynamic/meeting-outcome-form.controller.ts
new file mode 100644
index 00000000000..79b76e85d46
--- /dev/null
+++ b/frontend/src/stimulus/controllers/dynamic/meeting-outcome-form.controller.ts
@@ -0,0 +1,41 @@
+/*
+ * -- copyright
+ * OpenProject is an open source project management software.
+ * Copyright (C) the OpenProject GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 3.
+ *
+ * OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+ * Copyright (C) 2006-2013 Jean-Philippe Lang
+ * Copyright (C) 2010-2013 the ChiliProject Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * See COPYRIGHT and LICENSE files for more details.
+ * ++
+ */
+
+import { Controller } from '@hotwired/stimulus';
+
+export default class extends Controller {
+ connect():void {
+ this.focusInput();
+ }
+
+ focusInput():void {
+ this.element.scrollIntoView({ block: 'center' });
+ }
+}
diff --git a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erb b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erb
index 487857fb109..47fa192e640 100644
--- a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erb
+++ b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erb
@@ -67,6 +67,7 @@
)
edit_action_item(menu) if @meeting_agenda_item.editable?
add_note_action_item(menu) if @meeting_agenda_item.editable? && @meeting_agenda_item.notes.blank?
+ menu.with_divider if add_outcome_action?
add_outcome_action_item(menu) if add_outcome_action?
unless first? && last?
menu.with_divider
diff --git a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb
index 9b5f99a9ab5..a450eb0dfe0 100644
--- a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb
+++ b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb
@@ -168,9 +168,9 @@ module MeetingAgendaItems
def notes_classes
if OpenProject::FeatureDecisions.meeting_outcomes_active? && [email protected]?
- "op-uc-container muted-color"
+ "op-uc-container override muted-color"
else
- "op-uc-container"
+ "op-uc-container override"
end
end
end
diff --git a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.sass b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.sass
index a0f07fdcbf7..49ce721065d 100644
--- a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.sass
+++ b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.sass
@@ -40,6 +40,9 @@ $meeting-agenda-item--presenter-width--mobile: 150px
.muted-color
color: var(--fgColor-muted)
+ .override
+ padding-bottom: 0
+
@media screen and (max-width: $breakpoint-lg)
grid-template-columns: 20px auto 1fr auto 50px
grid-template-areas: "drag-handle content content content actions" ". title title title title" ". presenter duration . ." ". notes notes notes notes" ". outcomes outcomes outcomes outcomes"
diff --git a/modules/meeting/app/components/meeting_agenda_items/outcomes/base_component.rb b/modules/meeting/app/components/meeting_agenda_items/outcomes/base_component.rb
index 5c0be5d7c09..089acade6e5 100644
--- a/modules/meeting/app/components/meeting_agenda_items/outcomes/base_component.rb
+++ b/modules/meeting/app/components/meeting_agenda_items/outcomes/base_component.rb
@@ -30,7 +30,6 @@
module MeetingAgendaItems
class Outcomes::BaseComponent < ApplicationComponent
- include ApplicationHelper
include OpTurbo::Streamable
include OpPrimer::ComponentHelpers
diff --git a/modules/meeting/app/components/meeting_agenda_items/outcomes/form_component.html.erb b/modules/meeting/app/components/meeting_agenda_items/outcomes/form_component.html.erb
index 9aeb8f7fb32..26c7cd642d8 100644
--- a/modules/meeting/app/components/meeting_agenda_items/outcomes/form_component.html.erb
+++ b/modules/meeting/app/components/meeting_agenda_items/outcomes/form_component.html.erb
@@ -8,8 +8,10 @@
grid_layout("op-meeting-outcome-form", tag: :div) do |grid|
grid.with_area(
:notes,
- display: display_notes_input_value,
- data: { "test-selector": "meeting-outcome-input" }
+ data: {
+ "test-selector": "meeting-outcome-input",
+ "meeting-outcome-form-target": "notesInput"
+ }
) do
render(MeetingAgendaItem::Outcome::Notes.new(f))
end
diff --git a/modules/meeting/app/components/meeting_agenda_items/outcomes/form_component.rb b/modules/meeting/app/components/meeting_agenda_items/outcomes/form_component.rb
index 0f7aa28e65e..7600051dfe3 100644
--- a/modules/meeting/app/components/meeting_agenda_items/outcomes/form_component.rb
+++ b/modules/meeting/app/components/meeting_agenda_items/outcomes/form_component.rb
@@ -30,12 +30,10 @@
module MeetingAgendaItems::Outcomes
class FormComponent < ApplicationComponent
- include ApplicationHelper
include OpTurbo::Streamable
include OpPrimer::ComponentHelpers
- def initialize(meeting:, meeting_agenda_item:, meeting_outcome:, method:, submit_path:, cancel_path:,
- display_notes_input: nil)
+ def initialize(meeting:, meeting_agenda_item:, meeting_outcome:, method:, submit_path:, cancel_path:)
super
@meeting = meeting
@meeting_agenda_item = meeting_agenda_item
@@ -43,49 +41,19 @@ module MeetingAgendaItems::Outcomes
@method = method
@submit_path = submit_path
@cancel_path = cancel_path
- @display_notes_input = display_notes_input
end
def wrapper_uniq_by
@meeting_outcome.id
end
- def render?
- # User.current.allowed_in_project?(:manage_agendas, @meeting.project)
- true
- end
-
private
def wrapper_data_attributes
# {
- # controller: "meeting-agenda-item-form",
- # "application-target": "dynamic",
- # "meeting-agenda-item-form-cancel-url-value": @cancel_path
+ # controller: "meeting-outcome-form",
+ # "application-target": "dynamic"
# }
- nil
- end
-
- def display_notes_input_value
- :block
- # if @display_notes_input
- # :block
- # elsif @meeting_agenda_item.notes.blank?
- # :none
- # else
- # :block
- # end
- end
-
- def display_notes_add_button_value
- :block
- # if @display_notes_input
- # :none
- # elsif @meeting_agenda_item.notes.blank?
- # :block
- # else
- # :none
- # end
end
end
end
diff --git a/modules/meeting/app/components/meeting_agenda_items/outcomes/form_component.sass b/modules/meeting/app/components/meeting_agenda_items/outcomes/form_component.sass
index b23bf2389a2..4f7a4951010 100644
--- a/modules/meeting/app/components/meeting_agenda_items/outcomes/form_component.sass
+++ b/modules/meeting/app/components/meeting_agenda_items/outcomes/form_component.sass
@@ -11,4 +11,4 @@
@media screen and (max-width: $breakpoint-md)
grid-template-columns: 100px minmax(0, 100%)
- grid-template-areas: "title title" "duration presenter" "notes notes" "add_note actions"
+ grid-template-areas: "notes notes" ". actions"
diff --git a/modules/meeting/app/components/meeting_agenda_items/outcomes/input_component.rb b/modules/meeting/app/components/meeting_agenda_items/outcomes/input_component.rb
index fb970f38854..d2ef923b5e3 100644
--- a/modules/meeting/app/components/meeting_agenda_items/outcomes/input_component.rb
+++ b/modules/meeting/app/components/meeting_agenda_items/outcomes/input_component.rb
@@ -30,7 +30,6 @@
module MeetingAgendaItems::Outcomes
class InputComponent < ApplicationComponent
- include ApplicationHelper
include OpTurbo::Streamable
include OpPrimer::ComponentHelpers
@@ -44,7 +43,7 @@ module MeetingAgendaItems::Outcomes
private
def wrapper_uniq_by
- @meeting_agenda_item&.id
+ @meeting_agenda_item.id
end
def build_meeting_outcome
@@ -66,7 +65,7 @@ module MeetingAgendaItems::Outcomes
if @meeting_outcome.id.present?
meeting_outcome_path(@meeting, @meeting_outcome.id, format: :turbo_stream)
else
- meeting_outcomes_path(@meeting, meeting_agenda_item_id: @meeting_agenda_item&.id, format: :turbo_stream)
+ meeting_outcomes_path(@meeting, meeting_agenda_item_id: @meeting_agenda_item.id, format: :turbo_stream)
end
end
@@ -74,7 +73,7 @@ module MeetingAgendaItems::Outcomes
if @meeting_outcome.id.present?
cancel_edit_meeting_outcome_path(@meeting, @meeting_outcome)
else
- cancel_new_meeting_outcomes_path(@meeting, meeting_agenda_item_id: @meeting_agenda_item&.id)
+ cancel_new_meeting_outcomes_path(@meeting, meeting_agenda_item_id: @meeting_agenda_item.id)
end
end
end
diff --git a/modules/meeting/app/components/meeting_agenda_items/outcomes/new_button_component.html.erb b/modules/meeting/app/components/meeting_agenda_items/outcomes/new_button_component.html.erb
index f96c264fbe6..1b5a4b40bf8 100644
--- a/modules/meeting/app/components/meeting_agenda_items/outcomes/new_button_component.html.erb
+++ b/modules/meeting/app/components/meeting_agenda_items/outcomes/new_button_component.html.erb
@@ -1,18 +1,16 @@
<%=
component_wrapper(style: "position: relative") do
- render(Primer::Alpha::ActionMenu.new(classes: "hide-when-print")) do |component|
- component.with_show_button(scheme: button_scheme) do |button|
- button.with_leading_visual_icon(icon: :plus)
- t("outcome.add_button")
- end
- component.with_item(
- label: t("outcome.add_button"),
+ render(
+ Primer::Beta::Button.new(
+ scheme: :secondary,
tag: :a,
- content_arguments: {
- href: new_meeting_outcome_path(@meeting, meeting_agenda_item_id: @meeting_agenda_item&.id),
- data: { "turbo-stream": true }
- }
+ href: new_meeting_outcome_path(@meeting, meeting_agenda_item_id: @meeting_agenda_item.id),
+ classes: "hide-when-print",
+ data: { "turbo-stream": true }
)
+ ) do |button|
+ button.with_leading_visual_icon(icon: :plus)
+ t(:label_agenda_outcome)
end
end
%>
diff --git a/modules/meeting/app/components/meeting_agenda_items/outcomes/new_button_component.rb b/modules/meeting/app/components/meeting_agenda_items/outcomes/new_button_component.rb
index ffa38919be9..0135675733f 100644
--- a/modules/meeting/app/components/meeting_agenda_items/outcomes/new_button_component.rb
+++ b/modules/meeting/app/components/meeting_agenda_items/outcomes/new_button_component.rb
@@ -30,11 +30,10 @@
module MeetingAgendaItems::Outcomes
class NewButtonComponent < ApplicationComponent
- include ApplicationHelper
include OpTurbo::Streamable
include OpPrimer::ComponentHelpers
- def initialize(meeting:, meeting_agenda_item: nil)
+ def initialize(meeting:, meeting_agenda_item:)
super
@meeting = meeting
@meeting_agenda_item = meeting_agenda_item
@@ -43,15 +42,11 @@ module MeetingAgendaItems::Outcomes
private
def wrapper_uniq_by
- @meeting_agenda_item&.id
+ @meeting_agenda_item.id
end
def render?
@meeting.in_progress? && User.current.allowed_in_project?(:create_meeting_minutes, @meeting.project)
end
-
- def button_scheme
- :secondary
- end
end
end
diff --git a/modules/meeting/app/components/meeting_agenda_items/outcomes/show_notes_component.html.erb b/modules/meeting/app/components/meeting_agenda_items/outcomes/show_notes_component.html.erb
index c0e683eeb01..ed6c4d75acb 100644
--- a/modules/meeting/app/components/meeting_agenda_items/outcomes/show_notes_component.html.erb
+++ b/modules/meeting/app/components/meeting_agenda_items/outcomes/show_notes_component.html.erb
@@ -1,9 +1,9 @@
<%=
component_wrapper do
- render(Primer::Box.new(p: 3, classes: "outcome-container", border_radius: 2)) do
- grid_layout("op-meeting-outcome-notes", tag: :div, id: "item-#{@meeting_outcome.id}") do |grid|
+ render(Primer::Box.new(pt: 3, pl: 3, pr: 3, classes: "outcome-container", border_radius: 2)) do
+ grid_layout("op-meeting-outcome-notes", tag: :div, id: "outcome-#{@meeting_outcome.id}") do |grid|
grid.with_area(:title, tag: :span, classes: "title") do
- render(Primer::Beta::Heading.new(tag: :h5)) { "Outcome" }
+ render(Primer::Beta::Heading.new(tag: :h5)) { t(:label_agenda_outcome) }
end
grid.with_area(:content, tag: :div) do
@@ -17,7 +17,7 @@
render(Primer::Alpha::ActionMenu.new) do |menu|
menu.with_show_button(
icon: "kebab-horizontal",
- "aria-label": I18n.t(:label_agenda_outcome_actions),
+ "aria-label": t(:label_agenda_outcome_actions),
scheme: :invisible,
ml: 2,
test_selector: "op-meeting-outcome-actions"
diff --git a/modules/meeting/app/components/meetings/side_panel/state_component.html.erb b/modules/meeting/app/components/meetings/side_panel/state_component.html.erb
index f189745701a..dbd429f0a30 100644
--- a/modules/meeting/app/components/meetings/side_panel/state_component.html.erb
+++ b/modules/meeting/app/components/meetings/side_panel/state_component.html.erb
@@ -27,6 +27,7 @@
end
end
end
+
when "closed"
flex_layout(classes: "op-meeting-sidebar-state") do |closed_state|
closed_state.with_row do
@@ -49,6 +50,7 @@
end
end
end
+
when "in_progress"
flex_layout(classes: "op-meeting-sidebar-state") do |in_progress_state|
in_progress_state.with_row do
@@ -72,7 +74,6 @@
end
end
end
-
end
end
end
diff --git a/modules/meeting/app/components/meetings/side_panel/status_button_component.rb b/modules/meeting/app/components/meetings/side_panel/status_button_component.rb
new file mode 100644
index 00000000000..eb170fe4145
--- /dev/null
+++ b/modules/meeting/app/components/meetings/side_panel/status_button_component.rb
@@ -0,0 +1,103 @@
+# frozen_string_literal: true
+
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module Meetings
+ class SidePanel::StatusButtonComponent < ApplicationComponent
+ include ApplicationHelper
+ include OpTurbo::Streamable
+ include OpPrimer::ComponentHelpers
+
+ def initialize(meeting:, size: :medium)
+ super
+
+ @meeting = meeting
+ @project = meeting.project
+ @size = size
+ end
+
+ def call
+ render(OpPrimer::StatusButtonComponent.new(current_status: current_status,
+ items: [open_status, in_progress_status, closed_status],
+ readonly: !edit_enabled?,
+ disabled: !edit_enabled?,
+ button_arguments: { title: t("label_meeting_state"), size: @size}))
+ end
+
+ private
+
+ def edit_enabled?
+ User.current.allowed_in_project?(:close_meeting_agendas, @project)
+ end
+
+ def current_status
+ case @meeting.state
+ when "open"
+ open_status
+ when "in_progress"
+ in_progress_status
+ when "closed"
+ closed_status
+ end
+ end
+
+ def open_status
+ OpPrimer::StatusButtonOption.new(name: t("label_meeting_state_open"),
+ color: Color.new(hexcode: "#1F883D"),
+ icon: :"issue-opened",
+ tag: :a,
+ href: change_state_project_meeting_path(@project, @meeting, state: "open"),
+ content_arguments: {
+ data: { "turbo-stream": true, "turbo-method": "put" }
+ })
+ end
+
+ def in_progress_status
+ OpPrimer::StatusButtonOption.new(name: t("label_meeting_state_in_progress"),
+ color: Color.new(hexcode: "#9A6700"),
+ icon: :play,
+ tag: :a,
+ href: change_state_project_meeting_path(@project, @meeting, state: "in_progress"),
+ content_arguments: {
+ data: { "turbo-stream": true, "turbo-method": "put" }
+ })
+ end
+
+ def closed_status
+ OpPrimer::StatusButtonOption.new(name: t("label_meeting_state_closed"),
+ color: Color.new(hexcode: "#8250DF"),
+ icon: :"codescan-checkmark",
+ tag: :a,
+ href: change_state_project_meeting_path(@project, @meeting, state: "closed"),
+ content_arguments: {
+ data: { "turbo-stream": true, "turbo-method": "put" }
+ })
+ end
+ end
+end
diff --git a/modules/meeting/app/controllers/meeting_outcomes_controller.rb b/modules/meeting/app/controllers/meeting_outcomes_controller.rb
index 26cf98c2561..5c52117ccd9 100644
--- a/modules/meeting/app/controllers/meeting_outcomes_controller.rb
+++ b/modules/meeting/app/controllers/meeting_outcomes_controller.rb
@@ -29,7 +29,6 @@
#++
class MeetingOutcomesController < ApplicationController
- # include AttachableServiceCall
include OpTurbo::ComponentStream
include Meetings::AgendaComponentStreams
@@ -71,6 +70,7 @@ class MeetingOutcomesController < ApplicationController
if call.success?
render_base_outcome_component_via_turbo_stream(meeting: @meeting, meeting_agenda_item: @meeting_agenda_item,
meeting_outcome: @meeting_outcome, edit: false)
+ update_header_component_via_turbo_stream
else
render_base_error_in_flash_message_via_turbo_stream(call.errors)
update_all_via_turbo_stream
@@ -112,6 +112,7 @@ class MeetingOutcomesController < ApplicationController
if call.success?
render_base_outcome_component_via_turbo_stream(meeting: @meeting, meeting_agenda_item: @meeting_agenda_item,
meeting_outcome: call.result, edit: false)
+ update_header_component_via_turbo_stream
else
render_base_error_in_flash_message_via_turbo_stream(call.errors)
end
@@ -130,6 +131,7 @@ class MeetingOutcomesController < ApplicationController
if call.success?
render_base_outcome_component_via_turbo_stream(meeting: @meeting, meeting_agenda_item: @meeting_agenda_item,
meeting_outcome: nil, edit: false)
+ update_header_component_via_turbo_stream
else
render_base_error_in_flash_message_via_turbo_stream(call.errors)
end
@@ -153,12 +155,4 @@ class MeetingOutcomesController < ApplicationController
def set_meeting_outcome
@meeting_outcome = MeetingOutcome.find(params[:id])
end
-
- def generic_call_failure_response(call)
- # A failure might imply that the meeting was already closed and the action was triggered from a stale browser window
- # updating all components resolves the stale state of that window
- update_all_via_turbo_stream
- # show additional base error message
- render_base_error_in_flash_message_via_turbo_stream(call.errors)
- end
end
diff --git a/modules/meeting/app/models/meeting.rb b/modules/meeting/app/models/meeting.rb
index 0e20324183f..47a4f2bc321 100644
--- a/modules/meeting/app/models/meeting.rb
+++ b/modules/meeting/app/models/meeting.rb
@@ -125,7 +125,7 @@ class Meeting < ApplicationRecord
##
# Cache key for detecting changes to be shown to the user
- def changed_hash
+ def changed_hash # rubocop:disable Metrics/AbcSize
parts = Meeting
.unscoped
.where(id:)
diff --git a/modules/meeting/app/models/meeting_outcome.rb b/modules/meeting/app/models/meeting_outcome.rb
index dfb7f24ceb0..3c26051e121 100644
--- a/modules/meeting/app/models/meeting_outcome.rb
+++ b/modules/meeting/app/models/meeting_outcome.rb
@@ -42,6 +42,6 @@ class MeetingOutcome < ApplicationRecord
validates_presence_of :work_package, if: -> { work_package_kind? }
def editable?
- meeting_agenda_item.meeting&.in_progress?
+ meeting_agenda_item.meeting.in_progress?
end
end
diff --git a/modules/meeting/app/services/meeting_outcomes/create_service.rb b/modules/meeting/app/services/meeting_outcomes/create_service.rb
index b4034281f69..0925509f460 100644
--- a/modules/meeting/app/services/meeting_outcomes/create_service.rb
+++ b/modules/meeting/app/services/meeting_outcomes/create_service.rb
@@ -30,15 +30,5 @@
module MeetingOutcomes
class CreateService < ::BaseServices::Create
- # include AfterPerformHook
- #
- # alias_method :original_after_perform, :after_perform
- #
- # def after_perform(call)
- # # The reload is required because, the time slot calculations are changing the
- # # `start_time`, `end_time` attributes and they should be available for rendering.
- # call.result.reload
- # original_after_perform(call)
- # end
end
end
diff --git a/modules/meeting/app/services/meeting_outcomes/set_attributes_service.rb b/modules/meeting/app/services/meeting_outcomes/set_attributes_service.rb
index aff8033963d..bfa61e6594e 100644
--- a/modules/meeting/app/services/meeting_outcomes/set_attributes_service.rb
+++ b/modules/meeting/app/services/meeting_outcomes/set_attributes_service.rb
@@ -30,10 +30,5 @@
module MeetingOutcomes
class SetAttributesService < ::BaseServices::SetAttributes
- # def set_default_attributes(_params)
- # model.change_by_system do
- # model.author = user
- # end
- # end
end
end
diff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.yml
index 444af587fec..49fbc163af6 100644
--- a/modules/meeting/config/locales/en.yml
+++ b/modules/meeting/config/locales/en.yml
@@ -362,9 +362,6 @@ en:
end_series_dialog:
title: "End meeting series"
- outcome:
- add_button: "Outcome"
-
notice_successful_notification: "Notification sent successfully"
notice_timezone_missing: No time zone is set and %{zone} is assumed. To choose your time zone, please click here.
notice_meeting_updated: "This page has been updated by someone else. Reload to view changes."
@@ -427,6 +424,7 @@ en:
label_agenda_item_work_package: "Agenda item work package"
+ label_agenda_outcome: "Outcome"
label_agenda_outcome_actions: "Agenda outcome actions"
label_agenda_outcome_edit: "Edit outcome"
label_agenda_outcome_delete: "Remove outcome"
@@ -454,7 +452,7 @@ en:
label_meeting_reopen_action: "Reopen meeting"
label_meeting_close_action: "Close meeting"
label_meeting_in_progress_action: "Mark as in progress"
- text_meeting_open_description: "This meeting is open. You can add/remove agenda items and edit them as you please. After the meeting is over, close it to lock it."
+ text_meeting_open_description: "This meeting is open. You can add/remove agenda items and edit them as you please. Once the agenda is ready, mark it as in progress to document outcomes."
text_meeting_closed_description: "This meeting is closed. You cannot add/remove agenda items anymore."
text_meeting_in_progress_description: "This meeting is in progress. You can document outcomes for each agenda item, re-arrange them, and even add new ones. Once the meeting is complete, you can mark it as closed to lock it."
diff --git a/modules/meeting/config/routes.rb b/modules/meeting/config/routes.rb
index e69ce8f8942..0f5c36bce1f 100644
--- a/modules/meeting/config/routes.rb
+++ b/modules/meeting/config/routes.rb
@@ -125,8 +125,6 @@ Rails.application.routes.draw do
end
member do
get :cancel_edit
- # put :drop
- # put :move
end
end
diff --git a/modules/meeting/lib/open_project/meeting/engine.rb b/modules/meeting/lib/open_project/meeting/engine.rb
index ab232217cae..72165bce1d7 100644
--- a/modules/meeting/lib/open_project/meeting/engine.rb
+++ b/modules/meeting/lib/open_project/meeting/engine.rb
@@ -115,7 +115,7 @@ module OpenProject::Meeting
permission :create_meeting_minutes,
{
meeting_minutes: %i[update preview],
- meeting_outcomes: %i[new cancel_new create edit cancel_edit update destroy drop move] # TODO
+ meeting_outcomes: %i[new cancel_new create edit cancel_edit update destroy]
},
permissible_on: :project,
require: :member
diff --git a/modules/meeting/spec/features/structured_meetings/structured_meeting_update_flash_spec.rb b/modules/meeting/spec/features/structured_meetings/structured_meeting_update_flash_spec.rb
index f6e6ebe5115..dbe13be1a43 100644
--- a/modules/meeting/spec/features/structured_meetings/structured_meeting_update_flash_spec.rb
+++ b/modules/meeting/spec/features/structured_meetings/structured_meeting_update_flash_spec.rb
@@ -154,6 +154,8 @@ RSpec.describe "Structured meetings CRUD",
## Close meeting
find_test_selector("close-meeting-button").click
+ expect(page).to have_text "This meeting is in progress."
+ find_test_selector("close-meeting-button").click
expect(page).to have_text "This meeting is closed."
show_page.visit!
diff --git a/modules/meeting/spec/support/pages/structured_meeting/show.rb b/modules/meeting/spec/support/pages/structured_meeting/show.rb
index 6cc8186dcfa..e02b26dbf4c 100644
--- a/modules/meeting/spec/support/pages/structured_meeting/show.rb
+++ b/modules/meeting/spec/support/pages/structured_meeting/show.rb
@@ -211,9 +211,6 @@ module Pages::StructuredMeeting
def add_outcome(item, &)
page.within("#meeting-agenda-items-outcomes-base-component-#{item.id}") do
click_link_or_button "Outcome"
- page.within(".ActionListItem") do
- click_link_or_button "Outcome"
- end
end
expect_outcome_form(item)
page.within("#meeting-agenda-items-outcomes-input-component-#{item.id}", &)
@@ -306,13 +303,20 @@ module Pages::StructuredMeeting
end
def close_meeting
- click_on("Close meeting")
+ retry_block do
+ click_on("Open")
+ page.find(".Overlay")
+ end
+
+ page.within(".Overlay") do
+ click_on("Closed")
+ end
expect(page).to have_link("Reopen meeting")
end
def reopen_meeting
click_on("Reopen meeting")
- expect(page).to have_link("Close meeting")
+ expect(page).to have_link("Mark as in progress")
end
def close_dialog