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

show input type date when a filtert for showing changes is selected

bsatarnejad118ddeb53df0
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index 92ecd2e8309..3c6355d4f49 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -1345,7 +1345,8 @@ en:
clear: 'Clear'
apply: 'Apply'
header_description: 'View changes made to work packages in the current view within a time period.'
- Show_changes_since: 'Show changes since'
+ show_changes_since: 'Show changes since'
+ time: 'Time'
drop_down:
none: '-'
yesterday: 'yesterday'
diff --git a/frontend/src/app/shared/components/show-changes/show-changes.component.html b/frontend/src/app/shared/components/show-changes/show-changes.component.html
index 0051b01c6c0..8d7d275f2d7 100644
--- a/frontend/src/app/shared/components/show-changes/show-changes.component.html
+++ b/frontend/src/app/shared/components/show-changes/show-changes.component.html
@@ -28,9 +28,10 @@
class="spot-container op-show-changes-modal--body"
>
<spot-form-field
- [label]="text.Show_changes_since">
+ [label]="text.show_changes_since">
<select
+ (change)="valueSelected($event.target.value)"
slot="input">
<option
*ngFor="let availableValue of showChangesAvailableValues"
@@ -40,6 +41,25 @@
</select>
</spot-form-field>
+
+ <spot-form-field
+ [label]="text.time"
+ *ngIf="filterSelected"
+ class="op-show-changes-modal--time">
+
+ <input
+ slot="input"
+ id="appt-time"
+ type="time"
+ name="appt-time"
+ class="op-show-changes-modal--time-input"/>
+ <div
+ slot="action"
+ class="op-show-changes-modal--time-help"
+ >
+ </div>
+ </spot-form-field>
+
<div class="spot-action-bar">
<div class="spot-action-bar--right">
diff --git a/frontend/src/app/shared/components/show-changes/show-changes.component.ts b/frontend/src/app/shared/components/show-changes/show-changes.component.ts
index 193bfae6a3c..465f1af2479 100644
--- a/frontend/src/app/shared/components/show-changes/show-changes.component.ts
+++ b/frontend/src/app/shared/components/show-changes/show-changes.component.ts
@@ -51,11 +51,14 @@ export class OpShowChangesComponent extends UntilDestroyedMixin {
header_description: this.I18n.t('js.show_changes.header_description'),
clear: this.I18n.t('js.show_changes.clear'),
apply: this.I18n.t('js.show_changes.apply'),
- Show_changes_since: this.I18n.t('js.show_changes.Show_changes_since'),
+ show_changes_since: this.I18n.t('js.show_changes.show_changes_since'),
+ time: this.I18n.t('js.show_changes.time'),
};
public opened = false;
+ public filterSelected = false;
+
public showChangesAvailableValues = [
{
value: '0',
@@ -113,4 +116,12 @@ export class OpShowChangesComponent extends UntilDestroyedMixin {
public close():void {
this.opened = false;
}
+
+ public valueSelected(value:string):void {
+ if (value !== '0') {
+ this.filterSelected = true;
+ } else {
+ this.filterSelected = false;
+ }
+ }
}