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
Change datepickers for work package and project filters
Benjamin Bädorfcb065f1edc6a
diff --git a/app/views/projects/filters/date/_between_dates.html.erb b/app/views/projects/filters/date/_between_dates.html.erbindex b156cab89f3..ea25818fb2a 100644--- a/app/views/projects/filters/date/_between_dates.html.erb+++ b/app/views/projects/filters/date/_between_dates.html.erb@@ -1,6 +1,6 @@<div class="between-dates"><span><%= t(:label_date_from) %>:</span>- <%= angular_component_tag 'op-single-date-picker',+ <%= angular_component_tag 'op-basic-single-date-picker',inputs: {value: from_value,id: "between-dates-from-value-#{filter.name}",@@ -8,7 +8,7 @@}%><span><%= t(:label_date_to) %>:</span>- <%= angular_component_tag 'op-single-date-picker',+ <%= angular_component_tag 'op-basic-single-date-picker',inputs: {value: to_value,id: "between-dates-to-value-#{filter.name}",diff --git a/app/views/projects/filters/date/_on_date.html.erb b/app/views/projects/filters/date/_on_date.html.erbindex 5fed2dc5252..01f1ade947c 100644--- a/app/views/projects/filters/date/_on_date.html.erb+++ b/app/views/projects/filters/date/_on_date.html.erb@@ -1,6 +1,6 @@<div class="on-date"><div class="form--field-container -visible-overflow">- <%= angular_component_tag 'op-single-date-picker',+ <%= angular_component_tag 'op-basic-single-date-picker',inputs: {value: value,id: "on-date-value-#{filter.name}",diff --git a/frontend/src/app/features/work-packages/components/filters/filter-date-time-value/filter-date-time-value.component.html b/frontend/src/app/features/work-packages/components/filters/filter-date-time-value/filter-date-time-value.component.htmlindex eafcc4c2368..97e00c37d36 100644--- a/frontend/src/app/features/work-packages/components/filters/filter-date-time-value/filter-date-time-value.component.html+++ b/frontend/src/app/features/work-packages/components/filters/filter-date-time-value/filter-date-time-value.component.html@@ -1,4 +1,4 @@-<op-single-date-picker+<op-basic-single-date-picker[id]="'values-' + filter.id"[name]="'v[' + filter.id + ']'"class="advanced-filters--date-field"@@ -8,8 +8,7 @@[value]="isoDateFormatter(value)"[opAutofocus]="shouldFocus"--></op-single-date-picker>+></op-basic-single-date-picker><spanclass="advanced-filters--tooltip-trigger -multiline"diff --git a/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.html b/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.htmlindex 5912f06cf65..b16909d1045 100644--- a/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.html+++ b/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.html@@ -1,11 +1,23 @@-<op-multi-date-picker- [id]="'values-' + filter.id"- [name]="'v[' + filter.id + ']'"- class="advanced-filters--date-field"-- [(ngModel)]="value"+<op-basic-single-date-picker+ (valueChange)="begin = isoDateParser($event)"+ [value]="isoDateFormatter(begin)"[opAutofocus]="shouldFocus"-></op-multi-date-picker>+ required="true"+ [id]="'values-' + filter.id + '-begin'"+ [name]="'v[' + filter.id + ']-begin'"+ classes="advanced-filters--date-field"+></op-basic-single-date-picker>++<span class="advanced-filters--affix" [textContent]="text.spacer">+</span>++<op-basic-single-date-picker+ (valueChange)="end = isoDateParser($event)"+ [value]="isoDateFormatter(end)"+ [id]="'values-' + filter.id + '-end'"+ [name]="'v[' + filter.id + ']-end'"+ classes="advanced-filters--date-field"+></op-basic-single-date-picker><spanclass="advanced-filters--tooltip-trigger -multiline"diff --git a/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.ts b/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.tsindex 859986e555e..9fe4a6af965 100644--- a/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.ts+++ b/frontend/src/app/features/work-packages/components/filters/filter-date-times-value/filter-date-times-value.component.ts@@ -70,23 +70,24 @@ export class FilterDateTimesValueComponent extends AbstractDateTimeValueControllsuper(I18n, timezoneService);}- public get value():(HalResource[]|string[]) {- return this.filter.values;+ public get begin():HalResource|string {+ return this.filter.values[0];}- public set value(val:(HalResource[]|string[])) {- this.filter.values = val.map(d => this.isoDateParser(d));+ public set begin(val) {+ this.filter.values[0] = val || '';this.filterChanged.emit(this.filter);}- public get begin() {- return this.filter.values[0];- }-public get end() {return this.filter.values[1];}+ public set end(val) {+ this.filter.values[1] = val || '';+ this.filterChanged.emit(this.filter);+ }+public get lowerBoundary():Moment|null {if (this.begin && this.timezoneService.isValidISODateTime(this.begin.toString())) {return this.timezoneService.parseDatetime(this.begin.toString());