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

Fix op-modal-banner in the top of the datepicker modals

Benjamin Bädorf6dabaea532c0
diff --git a/frontend/src/app/shared/components/datepicker/banner/datepicker-banner.component.html b/frontend/src/app/shared/components/datepicker/banner/datepicker-banner.component.html
index 14752803d47..25530634cc5 100644
--- a/frontend/src/app/shared/components/datepicker/banner/datepicker-banner.component.html
+++ b/frontend/src/app/shared/components/datepicker/banner/datepicker-banner.component.html
@@ -6,8 +6,7 @@
[actionButton]="text.show_relations_button"
actionButtonClasses="icon-view-timeline"
(buttonClicked)="openGantt($event)"
->
-</op-modal-banner>
+></op-modal-banner>
<op-modal-banner
*ngIf="!scheduleManually && isParent"
type="info"
@@ -16,8 +15,7 @@
[actionButton]="text.show_relations_button"
actionButtonClasses="icon-view-timeline"
(buttonClicked)="openGantt($event)"
->
-</op-modal-banner>
+></op-modal-banner>
<ng-container *ngIf="!scheduleManually && !isParent">
<op-modal-banner
*ngIf="(hasPrecedingRelations$ | async) === true && (hasFollowingRelations$ | async) === false && !isChild"
@@ -27,8 +25,7 @@
[actionButton]="text.show_relations_button"
actionButtonClasses="icon-view-timeline"
(buttonClicked)="openGantt($event)"
- >
- </op-modal-banner>
+ ></op-modal-banner>
<op-modal-banner
*ngIf="(hasFollowingRelations$ | async) === true || isChild"
@@ -38,6 +35,5 @@
[actionButton]="text.show_relations_button"
actionButtonClasses="icon-view-timeline"
(buttonClicked)="openGantt($event)"
- >
- </op-modal-banner>
+ ></op-modal-banner>
</ng-container>
diff --git a/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.ts b/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.ts
index 514f35f7ef4..a0cbc7a78de 100644
--- a/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.ts
+++ b/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.ts
@@ -265,6 +265,8 @@ export class OpWpMultiDateFormComponent extends UntilDestroyedMixin implements A
this.scheduleManually = !!this.changeset.value('scheduleManually');
this.ignoreNonWorkingDays = !!this.changeset.value('ignoreNonWorkingDays');
+ console.log('onInit', this.scheduleManually);
+
// Ensure we get the writable values from the loaded form
void this
.changeset
@@ -304,13 +306,15 @@ export class OpWpMultiDateFormComponent extends UntilDestroyedMixin implements A
}
changeSchedulingMode():void {
- this.initializeDatepicker();
-
+ console.log('change scheduling');
// If removing manual scheduling on parent, reset ignoreNWD to original value
if (this.scheduleManually === false && !this.ignoreNonWorkingDaysWritable) {
this.ignoreNonWorkingDays = !!this.changeset.value('ignoreNonWorkingDays');
+ console.log(this.ignoreNonWorkingDays, this.scheduleManually);
}
+
+ this.initializeDatepicker();
this.cdRef.detectChanges();
}
diff --git a/frontend/src/app/shared/components/modal/modal.module.ts b/frontend/src/app/shared/components/modal/modal.module.ts
index 42c53eb299c..fa26ed132f0 100644
--- a/frontend/src/app/shared/components/modal/modal.module.ts
+++ b/frontend/src/app/shared/components/modal/modal.module.ts
@@ -4,7 +4,6 @@ import { PortalModule } from '@angular/cdk/portal';
import { A11yModule } from '@angular/cdk/a11y';
import { FocusModule } from 'core-app/shared/directives/focus/focus.module';
import { IconModule } from 'core-app/shared/components/icon/icon.module';
-import { OpModalService } from './modal.service';
import { OpModalWrapperAugmentService } from './modal-wrapper-augment.service';
import { OpModalBannerComponent } from 'core-app/shared/components/modal/modal-banner/modal-banner.component';
import { OpModalOverlayComponent } from 'core-app/shared/components/modal/modal-overlay.component';
diff --git a/frontend/src/app/shared/shared.module.ts b/frontend/src/app/shared/shared.module.ts
index 8b8d926454d..c8b25610908 100644
--- a/frontend/src/app/shared/shared.module.ts
+++ b/frontend/src/app/shared/shared.module.ts
@@ -96,6 +96,7 @@ import { OpProjectIncludeListComponent } from './components/project-include/list
import { OpLoadingProjectListComponent } from './components/searchable-project-list/loading-project-list.component';
import { ViewsResourceService } from 'core-app/core/state/views/views.service';
import { OpenprojectContentLoaderModule } from 'core-app/shared/components/op-content-loader/openproject-content-loader.module';
+import { OpenprojectModalModule } from './components/modal/modal.module';
export function bootstrapModule(injector:Injector):void {
// Ensure error reporter is run
@@ -138,6 +139,7 @@ export function bootstrapModule(injector:Injector):void {
OpenprojectPrincipalRenderingModule,
OpenprojectContentLoaderModule,
OpenprojectAutocompleterModule,
+ OpenprojectModalModule,
FocusModule,
IconModule,