change the description while there is no notification after selecting a project filter

pull/10753/head
bsatarnejad 2 years ago
parent b519ca98e4
commit 58f1e10adf
  1. 4
      config/locales/js-en.yml
  2. 9
      frontend/src/app/features/in-app-notifications/center/in-app-notification-center.component.ts

@ -609,8 +609,8 @@ en:
total_count_warning: "Showing the %{newest_count} most recent notifications. %{more_count} more are not displayed."
empty_state:
no_notification: "Looks like you're all caught up."
no_notification_with_current_project_filter: "Change of involvement or go back to the Inbox to view notifications."
no_notification_with_current_filter: "Looks like you're all caught up for %{filter} filter"
no_notification_with_current_project_filter: "Looks like you're all caught up with the selected project."
no_notification_with_current_filter: "Looks like you're all caught up for %{filter} filter."
no_selection: "Click on a notification to view all activity details."
new_notifications:
message: 'There are new notifications.'

@ -95,7 +95,7 @@ export class InAppNotificationCenterComponent implements OnInit {
text = {
no_notification: this.I18n.t('js.notifications.center.empty_state.no_notification'),
no_notification_with_current_filter_project: this.I18n.t('js.notifications.center.empty_state.no_notification_with_current_filter'),
no_notification_with_current_filter_project: this.I18n.t('js.notifications.center.empty_state.no_notification_with_current_project_filter'),
no_notification_with_current_filter: this.I18n.t('js.notifications.center.empty_state.no_notification_with_current_filter', { filter: this.selectedFilter }),
no_selection: this.I18n.t('js.notifications.center.empty_state.no_selection'),
change_notification_settings: this.I18n.t(
@ -132,8 +132,9 @@ export class InAppNotificationCenterComponent implements OnInit {
}
noNotificationText(hasNotifications:boolean, totalNotifications:number):string {
return (!hasNotifications && totalNotifications > 0)
? (this.uiRouterGlobals.params.filter === 'project' ? this.text.no_notification_with_current_filter_project : this.text.no_notification_with_current_filter)
: this.text.no_notification;
if (!(!hasNotifications && totalNotifications > 0)) {
return this.text.no_notification;
}
return (this.uiRouterGlobals.params.filter === 'project' ? this.text.no_notification_with_current_filter_project : this.text.no_notification_with_current_filter);
}
}

Loading…
Cancel
Save