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
use OnPush change detection
ulferts2c6044bd98d1
diff --git a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.tsindex e986f20515f..a327b4d6305 100644--- a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts+++ b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts@@ -1,4 +1,4 @@-import {Component, ElementRef, Input, OnDestroy, OnInit, SecurityContext, ViewChild, AfterViewInit, Output, EventEmitter, Injector, ViewEncapsulation} from "@angular/core";+import {Component, ElementRef, Input, OnDestroy, OnInit, SecurityContext, ViewChild, AfterViewInit, Output, EventEmitter, Injector, ViewEncapsulation, ChangeDetectionStrategy} from "@angular/core";import {FullCalendarComponent} from '@fullcalendar/angular';import {States} from "core-components/states.service";import * as moment from "moment";@@ -49,6 +49,7 @@ interface CalendarMoveEvent {styleUrls: ['./te-calendar.component.sass'],selector: 'te-calendar',encapsulation: ViewEncapsulation.None,+ changeDetection: ChangeDetectionStrategy.OnPush,providers: [TimeEntryEditService,TimeEntryCreateService,diff --git a/frontend/src/app/modules/time_entries/create/create.modal.ts b/frontend/src/app/modules/time_entries/create/create.modal.tsindex 6e08d9f5350..a1926be6ca5 100644--- a/frontend/src/app/modules/time_entries/create/create.modal.ts+++ b/frontend/src/app/modules/time_entries/create/create.modal.ts@@ -1,4 +1,4 @@-import {Component, ElementRef, Inject, ChangeDetectorRef, ViewChild} from "@angular/core";+import {Component, ElementRef, Inject, ChangeDetectorRef, ViewChild, ChangeDetectionStrategy} from "@angular/core";import {OpModalComponent} from "app/components/op-modals/op-modal.component";import {OpModalLocalsToken} from "app/components/op-modals/op-modal.service";import {OpModalLocalsMap} from "app/components/op-modals/op-modal.types";@@ -11,6 +11,7 @@ import {TimeEntryFormComponent} from "core-app/modules/time_entries/form/form.co@Component({templateUrl: './create.modal.html',styleUrls: ['../edit/edit.modal.sass'],+ changeDetection: ChangeDetectionStrategy.OnPush,providers: [HalResourceEditingService]diff --git a/frontend/src/app/modules/time_entries/edit/edit.modal.ts b/frontend/src/app/modules/time_entries/edit/edit.modal.tsindex 2de16f141a7..23f14e2154d 100644--- a/frontend/src/app/modules/time_entries/edit/edit.modal.ts+++ b/frontend/src/app/modules/time_entries/edit/edit.modal.ts@@ -1,4 +1,4 @@-import {Component, ElementRef, Inject, ChangeDetectorRef} from "@angular/core";+import {Component, ElementRef, Inject, ChangeDetectorRef, ChangeDetectionStrategy} from "@angular/core";import {OpModalComponent} from "app/components/op-modals/op-modal.component";import {OpModalLocalsToken} from "app/components/op-modals/op-modal.service";import {OpModalLocalsMap} from "app/components/op-modals/op-modal.types";@@ -11,6 +11,7 @@ import {SchemaResource} from "core-app/modules/hal/resources/schema-resource";@Component({templateUrl: './edit.modal.html',styleUrls: ['./edit.modal.sass'],+ changeDetection: ChangeDetectionStrategy.OnPush,providers: [HalResourceEditingService]diff --git a/frontend/src/app/modules/time_entries/form/form.component.ts b/frontend/src/app/modules/time_entries/form/form.component.tsindex 65cf62fd69d..26ff11b8f8c 100644--- a/frontend/src/app/modules/time_entries/form/form.component.ts+++ b/frontend/src/app/modules/time_entries/form/form.component.ts@@ -1,7 +1,7 @@import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service";import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource";import {I18nService} from "core-app/modules/common/i18n/i18n.service";-import { ViewEncapsulation, Component, Input, EventEmitter, Output, OnInit, OnDestroy, ViewChild } from '@angular/core';+import { ViewEncapsulation, Component, Input, EventEmitter, Output, OnInit, OnDestroy, ViewChild, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';import { untilComponentDestroyed } from 'ng2-rx-componentdestroyed';import {SchemaResource} from "core-app/modules/hal/resources/schema-resource";import {HalResource} from "core-app/modules/hal/resources/hal-resource";@@ -10,7 +10,8 @@ import { EditFormComponent } from 'core-app/modules/fields/edit/edit-form/edit-f@Component({templateUrl: './form.component.html',selector: 'te-form',- encapsulation: ViewEncapsulation.None+ encapsulation: ViewEncapsulation.None,+ changeDetection: ChangeDetectionStrategy.OnPush,})export class TimeEntryFormComponent implements OnInit, OnDestroy {@Input() entry:TimeEntryResource;@@ -34,6 +35,7 @@ export class TimeEntryFormComponent implements OnInit, OnDestroy {public customFields:{key:string, label:string}[] = [];constructor(readonly halEditing:HalResourceEditingService,+ readonly cdRef:ChangeDetectorRef,readonly i18n:I18nService) {}@@ -47,10 +49,12 @@ export class TimeEntryFormComponent implements OnInit, OnDestroy {.subscribe(changeset => {if (changeset && changeset.workPackage) {this.workPackageSelected = true;+ this.cdRef.markForCheck();}});this.setCustomFields(this.entry.schema);+ this.cdRef.detectChanges();}ngOnDestroy() {