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

Split the datepicker range field into start, finish date and duration.

Dombi Attilade8644913531
diff --git a/app/forms/projects/life_cycles/form.rb b/app/forms/projects/life_cycles/form.rb
index 419234c92a6..10ce34e6eb9 100644
--- a/app/forms/projects/life_cycles/form.rb
+++ b/app/forms/projects/life_cycles/form.rb
@@ -58,12 +58,12 @@ module Projects::LifeCycles
def start_date_input(form)
input_attributes = { name: :start_date, label: attribute_name(:start_date) }
- form.single_date_picker **datepicker_attributes, **input_attributes
+ form.text_field **datepicker_attributes, **input_attributes
end
def finish_date_input(form)
input_attributes = { name: :finish_date, label: attribute_name(:finish_date) }
- form.single_date_picker **datepicker_attributes, **input_attributes
+ form.text_field **datepicker_attributes, **input_attributes
end
def duration_input(form)
diff --git a/app/forms/projects/life_cycles/form.sass b/app/forms/projects/life_cycles/form.sass
index f5459fd7d05..16ca0a6124c 100644
--- a/app/forms/projects/life_cycles/form.sass
+++ b/app/forms/projects/life_cycles/form.sass
@@ -1,11 +1,11 @@
#edit-project-life-cycles-dialog
.FormControl-horizontalGroup
- primer-datepicker-field
- flex: 1 1 100%
primer-text-field
+ flex: 1 1 100%
+ primer-text-field:last-child
flex: 1 0 170px
@media screen and (max-width: $breakpoint-sm)
.FormControl-horizontalGroup
flex-direction: column
- primer-text-field
+ primer-text-field:last-child
flex-basis: auto
diff --git a/modules/overviews/app/components/overviews/project_phases/edit_component.html.erb b/modules/overviews/app/components/overviews/project_phases/edit_component.html.erb
index 4d7e766733b..97314527397 100644
--- a/modules/overviews/app/components/overviews/project_phases/edit_component.html.erb
+++ b/modules/overviews/app/components/overviews/project_phases/edit_component.html.erb
@@ -14,7 +14,26 @@
"test-selector": "async-dialog-content"
}
) do |f|
- render(Projects::LifeCycles::Form.new(f))
+ flex_layout do |flex|
+ flex.with_row do
+ render(Projects::LifeCycles::Form.new(f))
+ end
+ flex.with_row do
+ helpers.angular_component_tag "opce-wp-date-picker-instance",
+ inputs: {
+ start_date: model.start_date,
+ due_date: model.finish_date,
+ ignore_non_working_days: false,
+ schedule_manually: true,
+ is_schedulable: true,
+ is_milestone: false,
+ date_mode: "range",
+ start_date_field_id: "project_phase_start_date",
+ due_date_field_id: "project_phase_finish_date",
+ duration_field_id: "project_phase_duration"
+ }
+ end
+ end
end
end
%>
diff --git a/modules/overviews/app/components/overviews/project_phases/item_component.sass b/modules/overviews/app/components/overviews/project_phases/item_component.sass
index 9946cc5cf49..74d6222edce 100644
--- a/modules/overviews/app/components/overviews/project_phases/item_component.sass
+++ b/modules/overviews/app/components/overviews/project_phases/item_component.sass
@@ -1,7 +1,7 @@
-a.hover-input
+a.hover-input, a.hover-input:visited
border: 1px solid transparent !important
border-radius: var(--borderRadius-medium, 6px) !important
- color: inherit
+ color: inherit !important
display: inline-block
width: 100%
padding: var(--base-size-4, 4px) !important