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

Implementation/59987 add setedit reminder buttondialog to workpackage split view in notification center (#17457)

jjabari-op0bfb502790e2
diff --git a/frontend/src/app/features/work-packages/components/wp-buttons/wp-reminder-button/wp-reminder-button.html b/frontend/src/app/features/work-packages/components/wp-buttons/wp-reminder-button/wp-reminder-button.html
index 555002f5da0..bfb4dbfa723 100644
--- a/frontend/src/app/features/work-packages/components/wp-buttons/wp-reminder-button/wp-reminder-button.html
+++ b/frontend/src/app/features/work-packages/components/wp-buttons/wp-reminder-button/wp-reminder-button.html
@@ -1,5 +1,5 @@
<button
- class="button toolbar-icon d-flex flex-items-center"
+ class="button toolbar-icon"
data-test-selector="op-wp-reminder-button"
[attr.title]="buttonTitle"
(click)="openModal()"
diff --git a/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.component.ts b/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.component.ts
index ffa70468099..7c0fb14e65d 100644
--- a/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.component.ts
+++ b/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.component.ts
@@ -30,7 +30,7 @@ import {
HalResourceEditingService,
} from 'core-app/shared/components/fields/edit/services/hal-resource-editing.service';
import { I18nService } from 'core-app/core/i18n/i18n.service';
-import { Component, Input, OnInit } from '@angular/core';
+import { Component, Input, OnInit, ChangeDetectionStrategy } from '@angular/core';
import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';
import { ConfigurationService } from 'core-app/core/config/configuration.service';
import { CurrentUserService } from 'core-app/core/current-user/current-user.service';
@@ -39,6 +39,7 @@ import { Observable } from 'rxjs';
@Component({
selector: 'wp-details-toolbar',
templateUrl: './wp-details-toolbar.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
})
export class WorkPackageSplitViewToolbarComponent implements OnInit {
@Input() workPackage:WorkPackageResource;
@@ -46,6 +47,7 @@ export class WorkPackageSplitViewToolbarComponent implements OnInit {
@Input() displayNotificationsButton:boolean;
public displayShareButton$:false|Observable<boolean> = false;
+ public displayReminderButton$:false|Observable<boolean> = false;
public text = {
button_more: this.I18n.t('js.button_more'),
@@ -60,6 +62,9 @@ export class WorkPackageSplitViewToolbarComponent implements OnInit {
}
ngOnInit() {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
this.displayShareButton$ = this.currentUserService.hasCapabilities$('work_package_shares/index', this.workPackage.project.id);
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
+ this.displayReminderButton$ = this.currentUserService.hasCapabilities$('work_package_reminders/modal_body', this.workPackage.project.id);
}
}
diff --git a/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.html b/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.html
index 719812e30a6..d1d4ffb0610 100644
--- a/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.html
+++ b/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.html
@@ -14,6 +14,10 @@
*ngIf="displayShareButton$ | async">
</wp-share-button>
+ <wp-reminder-button [workPackage]="workPackage"
+ *ngIf="displayReminderButton$ | async">
+ </wp-reminder-button>
+
<button class="button dropdown-relative"
[attr.accesskey]="7"