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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
activity form in the turbo endpoint
Klaus Zanders66017f6e3757
diff --git a/modules/costs/app/components/time_entries/time_entry_form_component.html.erb b/modules/costs/app/components/time_entries/time_entry_form_component.html.erbindex c129af7fb19..1bc213d80bf 100644--- a/modules/costs/app/components/time_entries/time_entry_form_component.html.erb+++ b/modules/costs/app/components/time_entries/time_entry_form_component.html.erb@@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.body.with_row(mb: 3) { render(TimeEntries::UserForm.new(form)) }body.with_row(mb: 3) { render(TimeEntries::DaysAndHoursForm.new(form)) }body.with_row(mb: 3) { render(TimeEntries::WorkPackageForm.new(form)) }- body.with_row(mb: 3) { render(TimeEntries::ActivityFormComponent.new(form: form)) }+ body.with_row(mb: 3, id: 'time-entries-activity-form') { render(TimeEntries::ActivityForm.new(form)) }body.with_row(mb: 3) { render(TimeEntries::CommentsForm.new(form)) }body.with_row(mb: 3) { render(TimeEntries::CustomFieldsForm.new(form)) }enddiff --git a/modules/costs/app/controllers/time_entries_controller.rb b/modules/costs/app/controllers/time_entries_controller.rbindex 1f6490febd4..5fe18175e28 100644--- a/modules/costs/app/controllers/time_entries_controller.rb+++ b/modules/costs/app/controllers/time_entries_controller.rb@@ -63,17 +63,24 @@ class TimeEntriesController < ApplicationControllerdef time_entry_activitieswork_package = WorkPackage.visible.find_by(id: params[:work_package_id])- time_entry = TimeEntry.new(project: work_package.project, work_package: work_package)+ time_entry = TimeEntry.new(project: work_package&.project, work_package: work_package)form = Primer::Forms::Builder.new(TimeEntry.model_name.param_key,time_entry,- helpers,- {}+ TimeEntries::TimeEntryFormComponent.new(time_entry: time_entry),+ {+ allow_method_names_outside_object: true,+ skip_default_ids: false,+ data: { turbo: true },+ id: "time-entry-form",+ method: :post,+ builder: Primer::Forms::Builder+ })replace_via_turbo_stream(- component: TimeEntries::ActivityFormComponent.new(form:)+ component: TimeEntries::ActivityForm.new(form))respond_with_turbo_streams