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
Make property and/or overdue bold
Oliver Günther45e33af2136a
diff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex 14c413e7c2c..bee2fdc2982 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -593,9 +593,10 @@ en:dateAlert: 'Date alert'date_alerts:work_package_is: 'Work package is'- overdue_since: 'Overdue since %{difference_in_days}'- property_is: '%{property} is in %{difference_in_days}'- property_was: '%{property} was %{difference_in_days} ago'+ overdue: 'Overdue'+ overdue_since: 'since %{difference_in_days}'+ property_is: 'is in %{difference_in_days}'+ property_was: 'was %{difference_in_days} ago'facets:unread: 'Unread'unread_title: 'Show unread'diff --git a/frontend/src/app/features/in-app-notifications/entry/date-alert/in-app-notification-date-alert.component.html b/frontend/src/app/features/in-app-notifications/entry/date-alert/in-app-notification-date-alert.component.htmlindex b36f0d2b30a..aac5db6c572 100644--- a/frontend/src/app/features/in-app-notifications/entry/date-alert/in-app-notification-date-alert.component.html+++ b/frontend/src/app/features/in-app-notifications/entry/date-alert/in-app-notification-date-alert.component.html@@ -1,7 +1,12 @@<divclass="op-ian-date-alert"+ [ngClass]="{ 'op-ian-date-alert_overdue': isOverdue }"><span- [ngClass]="{ 'op-ian-date-alert_overdue': isOverdue }"+ class="op-ian-date-alert--property"+ [textContent]="propertyText"></span>+ &ngsp;+ <span+ class="op-ian-date-alert--days"[textContent]="alertText"></span></div>diff --git a/frontend/src/app/features/in-app-notifications/entry/date-alert/in-app-notification-date-alert.component.sass b/frontend/src/app/features/in-app-notifications/entry/date-alert/in-app-notification-date-alert.component.sassindex a7d4459816e..6fc6ec10d3b 100644--- a/frontend/src/app/features/in-app-notifications/entry/date-alert/in-app-notification-date-alert.component.sass+++ b/frontend/src/app/features/in-app-notifications/entry/date-alert/in-app-notification-date-alert.component.sass@@ -1,3 +1,8 @@.op-ian-date-alert+ color: var(--gray-dark)+&_overduecolor: var(--warn)++ &--property+ font-weight: bolddiff --git a/frontend/src/app/features/in-app-notifications/entry/date-alert/in-app-notification-date-alert.component.ts b/frontend/src/app/features/in-app-notifications/entry/date-alert/in-app-notification-date-alert.component.tsindex 5571dd55dfa..44f84cd6b8f 100644--- a/frontend/src/app/features/in-app-notifications/entry/date-alert/in-app-notification-date-alert.component.ts+++ b/frontend/src/app/features/in-app-notifications/entry/date-alert/in-app-notification-date-alert.component.ts@@ -33,17 +33,19 @@ export class InAppNotificationDateAlertComponent implements OnInit {isOverdue:boolean;- private propertyText:string;+ propertyText:string;private daysDiff:string;text = {work_package_is: this.I18n.t('js.notifications.date_alerts.work_package_is'),- overdue_since: (difference_in_days:string) => this.I18n.t('js.notifications.date_alerts.overdue_since', { difference_in_days }),- property_is: (property:string, difference_in_days:string) =>- this.I18n.t('js.notifications.date_alerts.property_is', { property, difference_in_days }),- property_was: (property:string, difference_in_days:string) =>- this.I18n.t('js.notifications.date_alerts.property_was', { property, difference_in_days }),+ overdue: this.I18n.t('js.notifications.date_alerts.overdue'),+ overdue_since: (difference_in_days:string):string =>+ this.I18n.t('js.notifications.date_alerts.overdue_since', { difference_in_days }),+ property_is: (difference_in_days:string):string =>+ this.I18n.t('js.notifications.date_alerts.property_is', { difference_in_days }),+ property_was: (difference_in_days:string):string =>+ this.I18n.t('js.notifications.date_alerts.property_was', { difference_in_days }),startDate: this.I18n.t('js.work_packages.properties.startDate'),dueDate: this.I18n.t('js.work_packages.properties.dueDate'),date: this.I18n.t('js.work_packages.properties.date'),@@ -61,7 +63,7 @@ export class InAppNotificationDateAlertComponent implements OnInit {this.dateIsPast = dateValue.isBefore();this.isOverdue = this.dateIsPast && ['date', 'dueDate'].includes(property);this.daysDiff = this.dateDiff(dateValue);- this.propertyText = this.text[property] || property;+ this.propertyText = this.isOverdue ? this.text.overdue : this.text[property];this.alertText = this.buildAlertText();}@@ -71,10 +73,10 @@ export class InAppNotificationDateAlertComponent implements OnInit {}if (this.dateIsPast) {- return this.text.property_was(this.propertyText, this.daysDiff);+ return this.text.property_was(this.daysDiff);}- return this.text.property_is(this.propertyText, this.daysDiff);+ return this.text.property_is(this.daysDiff);}private dateDiff(reference:Moment):string {