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

Remove ui-router in my account

Oliver Günther814a98bfe63e
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index 317220b42c1..0b698f5a010 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -31,7 +31,7 @@ class MyController < ApplicationController
include Accounts::UserPasswordChange
include ActionView::Helpers::TagHelper
- layout 'my'
+ layout "my"
before_action :require_login
before_action :set_current_user
@@ -83,7 +83,7 @@ class MyController < ApplicationController
# When making changes here, also check AccountController.change_password
def change_password
change_password_flow(user: @user, params:, update_legacy: false) do
- redirect_to action: 'password'
+ redirect_to action: "password"
end
end
@@ -92,88 +92,93 @@ class MyController < ApplicationController
@storage_tokens = OAuthClientToken
.preload(:oauth_client)
.joins(:oauth_client)
- .where(user: @user, oauth_client: { integration_type: 'Storages::Storage' })
+ .where(user: @user, oauth_client: { integration_type: "Storages::Storage" })
end
def delete_storage_token
token = OAuthClientToken
.preload(:oauth_client)
.joins(:oauth_client)
- .where(user: @user, oauth_client: { integration_type: 'Storages::Storage' }).find_by(id: params[:id])
+ .where(user: @user, oauth_client: { integration_type: "Storages::Storage" }).find_by(id: params[:id])
if token&.destroy
- flash[:info] = I18n.t('my_account.access_tokens.storages.removed')
+ flash[:info] = I18n.t("my_account.access_tokens.storages.removed")
else
- flash[:error] = I18n.t('my_account.access_tokens.storages.failed')
+ flash[:error] = I18n.t("my_account.access_tokens.storages.failed")
end
redirect_to action: :access_token
end
# Configure user's in app notifications
def notifications
- render html: '',
- layout: 'angular/angular',
+ render html: "",
+ layout: "angular/angular",
locals: {
menu_name: :my_menu,
- page_title: [I18n.t(:label_my_account), I18n.t('js.notifications.settings.title')]
+ component: "opce-notification-settings",
+ page_title: [I18n.t(:label_my_account), I18n.t("js.notifications.settings.title")]
}
end
# Configure user's mail reminders
def reminders
- render html: '',
- layout: 'angular/angular',
- locals: { menu_name: :my_menu }
+ render html: "",
+ layout: "angular/angular",
+ locals: {
+ menu_name: :my_menu,
+ component: "opce-reminder-settings",
+ page_title: [I18n.t(:label_my_account), I18n.t("js.reminders.settings.title")]
+ }
end
# Create a new feeds key
def generate_rss_key
token = Token::RSS.create!(user: current_user)
flash[:info] = [
- t('my.access_token.notice_reset_token', type: 'RSS').html_safe,
+ t("my.access_token.notice_reset_token", type: "RSS").html_safe,
content_tag(:strong, token.plain_value),
- t('my.access_token.token_value_warning')
+ t("my.access_token.token_value_warning")
]
rescue StandardError => e
Rails.logger.error "Failed to reset user ##{current_user.id} RSS key: #{e}"
- flash[:error] = t('my.access_token.failed_to_reset_token', error: e.message)
+ flash[:error] = t("my.access_token.failed_to_reset_token", error: e.message)
ensure
- redirect_to action: 'access_token'
+ redirect_to action: "access_token"
end
def revoke_rss_key
current_user.rss_token.destroy
- flash[:info] = t('my.access_token.notice_rss_token_revoked')
+ flash[:info] = t("my.access_token.notice_rss_token_revoked")
rescue StandardError => e
Rails.logger.error "Failed to revoke rss token ##{current_user.id}: #{e}"
- flash[:error] = t('my.access_token.failed_to_reset_token', error: e.message)
+ flash[:error] = t("my.access_token.failed_to_reset_token", error: e.message)
ensure
- redirect_to action: 'access_token'
+ redirect_to action: "access_token"
end
# Create a new API key
def generate_api_key
token = Token::API.create!(user: current_user)
flash[:info] = [
- t('my.access_token.notice_reset_token', type: 'API').html_safe,
+ t("my.access_token.notice_reset_token", type: "API").html_safe,
content_tag(:strong, token.plain_value),
- t('my.access_token.token_value_warning')
+ t("my.access_token.token_value_warning")
]
rescue StandardError => e
Rails.logger.error "Failed to reset user ##{current_user.id} API key: #{e}"
- flash[:error] = t('my.access_token.failed_to_reset_token', error: e.message)
+ flash[:error] = t("my.access_token.failed_to_reset_token", error: e.message)
ensure
- redirect_to action: 'access_token'
+ redirect_to action: "access_token"
end
def revoke_api_key
current_user.api_token.destroy
- flash[:info] = t('my.access_token.notice_api_token_revoked')
+ flash[:info] = t("my.access_token.notice_api_token_revoked")
rescue StandardError => e
Rails.logger.error "Failed to revoke api token ##{current_user.id}: #{e}"
- flash[:error] = t('my.access_token.failed_to_reset_token', error: e.message)
+ flash[:error] = t("my.access_token.failed_to_reset_token", error: e.message)
ensure
- redirect_to action: 'access_token'
+ redirect_to action: "access_token"
end
def revoke_ical_token
@@ -182,9 +187,9 @@ class MyController < ApplicationController
flash[:info] = message
rescue StandardError => e
Rails.logger.error "Failed to revoke all ical tokens for ##{current_user.id}: #{e}"
- flash[:error] = t('my.access_token.failed_to_reset_token', error: e.message)
+ flash[:error] = t("my.access_token.failed_to_reset_token", error: e.message)
ensure
- redirect_to action: 'access_token'
+ redirect_to action: "access_token"
end
private
@@ -200,7 +205,7 @@ class MyController < ApplicationController
def redirect_if_password_change_not_allowed_for(user)
unless user.change_password_allowed?
flash[:error] = I18n.t(:notice_can_t_change_password)
- redirect_to action: 'account'
+ redirect_to action: "account"
return true
end
false
@@ -249,7 +254,7 @@ class MyController < ApplicationController
end
def error_account_update_failed(result)
- errors = result ? result.errors.full_messages.join("\n") : ''
+ errors = result ? result.errors.full_messages.join("\n") : ""
[t(:notice_account_update_failed), errors]
end
@@ -274,7 +279,7 @@ class MyController < ApplicationController
def ical_destroy_info_message
t(
- 'my.access_token.notice_ical_token_revoked',
+ "my.access_token.notice_ical_token_revoked",
token_name: @ical_token.ical_token_query_assignment.name,
calendar_name: @ical_token.query.name,
project_name: @ical_token.query.project.name
diff --git a/app/views/layouts/angular/angular.html.erb b/app/views/layouts/angular/angular.html.erb
index a510cd28eda..e6e534689a4 100644
--- a/app/views/layouts/angular/angular.html.erb
+++ b/app/views/layouts/angular/angular.html.erb
@@ -34,7 +34,11 @@ See COPYRIGHT and LICENSE files for more details.
<% end -%>
<%= content_for :content_body do %>
- <openproject-base></openproject-base>
+ <% if local_assigns[:component] %>
+ <%= angular_component_tag local_assigns[:component] %>
+ <% else %>
+ <openproject-base></openproject-base>
+ <% end %>
<%# Allow projection pages to show rails rendered content after initialization %>
<div id="projected-content" hidden>
diff --git a/app/views/users/_notifications.html.erb b/app/views/users/_notifications.html.erb
index bef42420d6f..95ad5574eb6 100644
--- a/app/views/users/_notifications.html.erb
+++ b/app/views/users/_notifications.html.erb
@@ -26,4 +26,4 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
++#%>
-<openproject-base></openproject-base>
+<%= angular_component_tag "opce-notification-settings", inputs: { userId: @user.id } %>
diff --git a/app/views/users/_reminders.html.erb b/app/views/users/_reminders.html.erb
index bd905421abc..f2f3fc85842 100644
--- a/app/views/users/_reminders.html.erb
+++ b/app/views/users/_reminders.html.erb
@@ -26,4 +26,4 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See docs/COPYRIGHT.rdoc for more details.
++#%>
-<openproject-base></openproject-base>
+<%= angular_component_tag "opce-reminder-settings", inputs: { userId: @user.id } %>
diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts
index 3f51c5de798..85a1357c173 100644
--- a/frontend/src/app/app.module.ts
+++ b/frontend/src/app/app.module.ts
@@ -157,6 +157,13 @@ import { CopyProjectComponent } from 'core-app/features/projects/components/copy
import { ProjectsComponent } from 'core-app/features/projects/components/projects/projects.component';
import { DisplayJobPageComponent } from 'core-app/features/job-status/display-job-page/display-job-page.component';
import { OpenProjectJobStatusModule } from 'core-app/features/job-status/openproject-job-status.module';
+import {
+ NotificationsSettingsPageComponent,
+} from 'core-app/features/user-preferences/notifications-settings/page/notifications-settings-page.component';
+import {
+ ReminderSettingsPageComponent,
+} from 'core-app/features/user-preferences/reminder-settings/page/reminder-settings-page.component';
+import { OpenProjectMyAccountModule } from 'core-app/features/user-preferences/user-preferences.module';
export function initializeServices(injector:Injector) {
return () => {
@@ -261,6 +268,9 @@ export function initializeServices(injector:Injector) {
// Loading
OpenprojectContentLoaderModule,
+
+ // My account
+ OpenProjectMyAccountModule,
],
providers: [
{ provide: States, useValue: new States() },
@@ -346,5 +356,7 @@ export class OpenProjectModule {
registerCustomElement('opce-project-settings', ProjectsComponent, { injector });
registerCustomElement('opce-copy-project', CopyProjectComponent, { injector });
registerCustomElement('opce-display-job-status-page', DisplayJobPageComponent, { injector });
+ registerCustomElement('opce-notification-settings', NotificationsSettingsPageComponent, { injector });
+ registerCustomElement('opce-reminder-settings', ReminderSettingsPageComponent, { injector });
}
}
diff --git a/frontend/src/app/core/routing/openproject.routes.ts b/frontend/src/app/core/routing/openproject.routes.ts
index be65ffa58d0..7e9b905eca8 100644
--- a/frontend/src/app/core/routing/openproject.routes.ts
+++ b/frontend/src/app/core/routing/openproject.routes.ts
@@ -34,7 +34,6 @@ import { FirstRouteService } from 'core-app/core/routing/first-route-service';
import { Ng2StateDeclaration, StatesModule } from '@uirouter/angular';
import { appBaseSelector, ApplicationBaseComponent } from 'core-app/core/routing/base/application-base.component';
import { BackRoutingService } from 'core-app/features/work-packages/components/back-routing/back-routing.service';
-import { MY_ACCOUNT_LAZY_ROUTES } from 'core-app/features/user-preferences/user-preferences.lazy-routes';
import { IAN_LAZY_ROUTES } from 'core-app/features/in-app-notifications/in-app-notifications.lazy-routes';
import { StateObject } from '@uirouter/core/lib/state/stateObject';
import {
@@ -88,7 +87,6 @@ export const OPENPROJECT_ROUTES:Ng2StateDeclaration[] = [
url: '/cost_reports',
loadChildren: () => import('../../features/reporting/openproject-reporting.module').then((m) => m.OpenprojectReportingModule),
},
- ...MY_ACCOUNT_LAZY_ROUTES,
...IAN_LAZY_ROUTES,
...TEAM_PLANNER_LAZY_ROUTES,
...CALENDAR_LAZY_ROUTES,
diff --git a/frontend/src/app/features/user-preferences/notifications-settings/overdue-reminder-available-times.ts b/frontend/src/app/features/user-preferences/notifications-settings/overdue-reminder-available-times.ts
index 74b67337850..b05974538aa 100644
--- a/frontend/src/app/features/user-preferences/notifications-settings/overdue-reminder-available-times.ts
+++ b/frontend/src/app/features/user-preferences/notifications-settings/overdue-reminder-available-times.ts
@@ -1,33 +1,37 @@
-export const REMINDER_AVAILABLE_TIMEFRAMES:{ value:string, title:string }[] = [
- {
- value: 'PT0S',
- title: window.I18n.t('js.notifications.settings.reminders.timeframes.normal.PT0S'),
- },
- {
- value: 'P1D',
- title: window.I18n.t('js.notifications.settings.reminders.timeframes.normal.P1D'),
- },
- {
- value: 'P3D',
- title: window.I18n.t('js.notifications.settings.reminders.timeframes.normal.P3D'),
- },
- {
- value: 'P7D',
- title: window.I18n.t('js.notifications.settings.reminders.timeframes.normal.P7D'),
- },
-];
+export function reminderAvailableTimeframes():{ value:string, title:string }[] {
+ return [
+ {
+ value: 'PT0S',
+ title: window.I18n.t('js.notifications.settings.reminders.timeframes.normal.PT0S'),
+ },
+ {
+ value: 'P1D',
+ title: window.I18n.t('js.notifications.settings.reminders.timeframes.normal.P1D'),
+ },
+ {
+ value: 'P3D',
+ title: window.I18n.t('js.notifications.settings.reminders.timeframes.normal.P3D'),
+ },
+ {
+ value: 'P7D',
+ title: window.I18n.t('js.notifications.settings.reminders.timeframes.normal.P7D'),
+ },
+ ];
+}
-export const OVERDUE_REMINDER_AVAILABLE_TIMEFRAMES:{ value:string, title:string }[] = [
- {
- value: 'P1D',
- title: window.I18n.t('js.notifications.settings.reminders.timeframes.overdue.P1D'),
- },
- {
- value: 'P3D',
- title: window.I18n.t('js.notifications.settings.reminders.timeframes.overdue.P3D'),
- },
- {
- value: 'P7D',
- title: window.I18n.t('js.notifications.settings.reminders.timeframes.overdue.P7D'),
- },
-];
+export function overDueReminderTimes():{ value:string, title:string }[] {
+ return [
+ {
+ value: 'P1D',
+ title: window.I18n.t('js.notifications.settings.reminders.timeframes.overdue.P1D'),
+ },
+ {
+ value: 'P3D',
+ title: window.I18n.t('js.notifications.settings.reminders.timeframes.overdue.P3D'),
+ },
+ {
+ value: 'P7D',
+ title: window.I18n.t('js.notifications.settings.reminders.timeframes.overdue.P7D'),
+ },
+ ];
+}
diff --git a/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.ts b/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.ts
index 73e10c4267d..3e2b31a49f7 100644
--- a/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.ts
+++ b/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.ts
@@ -1,17 +1,6 @@
-import {
- ChangeDetectionStrategy,
- ChangeDetectorRef,
- Component,
- Input,
- OnInit,
-} from '@angular/core';
-import {
- UntypedFormGroup,
- UntypedFormArray,
- UntypedFormControl,
-} from '@angular/forms';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Input, OnInit } from '@angular/core';
+import { UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { take } from 'rxjs/internal/operators/take';
-import { UIRouterGlobals } from '@uirouter/core';
import { I18nService } from 'core-app/core/i18n/i18n.service';
import { CurrentUserService } from 'core-app/core/current-user/current-user.service';
import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';
@@ -19,8 +8,9 @@ import { UserPreferencesService } from 'core-app/features/user-preferences/state
import { INotificationSetting } from 'core-app/features/user-preferences/state/notification-setting.model';
import { BannersService } from 'core-app/core/enterprise/banners.service';
import { enterpriseDocsUrl } from 'core-app/core/setup/globals/constants.const';
-import { OVERDUE_REMINDER_AVAILABLE_TIMEFRAMES, REMINDER_AVAILABLE_TIMEFRAMES } from '../overdue-reminder-available-times';
+import { overDueReminderTimes, reminderAvailableTimeframes } from '../overdue-reminder-available-times';
import { ConfigurationService } from 'core-app/core/config/configuration.service';
+import { populateInputsFromDataset } from 'core-app/shared/components/dataset-inputs';
export const myNotificationsPageComponentSelector = 'op-notifications-page';
@@ -53,7 +43,6 @@ interface IFullNotificationSettingsValue extends IToastSettingsValue {
}
@Component({
- selector: myNotificationsPageComponentSelector,
templateUrl: './notifications-settings-page.component.html',
styleUrls: ['./notifications-settings-page.component.sass'],
changeDetection: ChangeDetectionStrategy.OnPush,
@@ -61,9 +50,9 @@ interface IFullNotificationSettingsValue extends IToastSettingsValue {
export class NotificationsSettingsPageComponent extends UntilDestroyedMixin implements OnInit {
@Input() userId:string;
- public availableTimes = REMINDER_AVAILABLE_TIMEFRAMES;
+ public availableTimes = reminderAvailableTimeframes();
- public availableTimesOverdue = OVERDUE_REMINDER_AVAILABLE_TIMEFRAMES;
+ public availableTimesOverdue = overDueReminderTimes();
public eeShowBanners = false;
@@ -137,20 +126,20 @@ export class NotificationsSettingsPageComponent extends UntilDestroyedMixin impl
};
constructor(
- private changeDetectorRef:ChangeDetectorRef,
- private I18n:I18nService,
- private storeService:UserPreferencesService,
- private currentUserService:CurrentUserService,
- private uiRouterGlobals:UIRouterGlobals,
+ readonly elementRef:ElementRef,
+ readonly changeDetectorRef:ChangeDetectorRef,
+ readonly I18n:I18nService,
+ readonly storeService:UserPreferencesService,
+ readonly currentUserService:CurrentUserService,
readonly bannersService:BannersService,
readonly configurationService:ConfigurationService,
) {
super();
+ populateInputsFromDataset(this);
}
ngOnInit():void {
this.form.disable();
- this.userId = (this.userId || this.uiRouterGlobals.params.userId) as string;
this.eeShowBanners = this.bannersService.eeShowBanners;
this
diff --git a/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts b/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts
index 706ffa50634..b978758c2ee 100644
--- a/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts
+++ b/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts
@@ -1,18 +1,13 @@
// noinspection ES6UnusedImports
-import {
- Component,
- ChangeDetectionStrategy,
- Input,
- OnInit,
-} from '@angular/core';
-import { UntypedFormArray, UntypedFormGroup, UntypedFormControl } from '@angular/forms';
+import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
+import { UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';
import { I18nService } from 'core-app/core/i18n/i18n.service';
import idFromLink from 'core-app/features/hal/helpers/id-from-link';
import { HalSourceLink } from 'core-app/features/hal/resources/hal-resource';
import { BannersService } from 'core-app/core/enterprise/banners.service';
-import { OVERDUE_REMINDER_AVAILABLE_TIMEFRAMES, REMINDER_AVAILABLE_TIMEFRAMES } from '../overdue-reminder-available-times';
+import { overDueReminderTimes, reminderAvailableTimeframes } from '../overdue-reminder-available-times';
import { ConfigurationService } from 'core-app/core/config/configuration.service';
@Component({
@@ -33,7 +28,7 @@ export class NotificationSettingsTableComponent implements OnInit {
value: null,
title: this.I18n.t('js.notifications.settings.reminders.no_notification'),
},
- ...REMINDER_AVAILABLE_TIMEFRAMES,
+ ...reminderAvailableTimeframes(),
];
public availableTimesOverdue = [
@@ -41,7 +36,7 @@ export class NotificationSettingsTableComponent implements OnInit {
value: null,
title: this.I18n.t('js.notifications.settings.reminders.no_notification'),
},
- ...OVERDUE_REMINDER_AVAILABLE_TIMEFRAMES,
+ ...overDueReminderTimes(),
];
text = {
diff --git a/frontend/src/app/features/user-preferences/reminder-settings/page/reminder-settings-page.component.ts b/frontend/src/app/features/user-preferences/reminder-settings/page/reminder-settings-page.component.ts
index 1efe7cd8d7d..8d271291f78 100644
--- a/frontend/src/app/features/user-preferences/reminder-settings/page/reminder-settings-page.component.ts
+++ b/frontend/src/app/features/user-preferences/reminder-settings/page/reminder-settings-page.component.ts
@@ -1,38 +1,24 @@
-import {
- ChangeDetectionStrategy,
- ChangeDetectorRef,
- Component,
- Input,
- OnInit,
-} from '@angular/core';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Input, OnInit } from '@angular/core';
import { I18nService } from 'core-app/core/i18n/i18n.service';
import { CurrentUserService } from 'core-app/core/current-user/current-user.service';
import { take } from 'rxjs/internal/operators/take';
-import { UIRouterGlobals } from '@uirouter/core';
import { UserPreferencesService } from 'core-app/features/user-preferences/state/user-preferences.service';
-import {
- UntypedFormArray,
- UntypedFormBuilder,
-} from '@angular/forms';
+import { UntypedFormArray, UntypedFormBuilder } from '@angular/forms';
import {
DailyRemindersSettings,
ImmediateRemindersSettings,
- PauseRemindersSettings,
IUserPreference,
+ PauseRemindersSettings,
} from 'core-app/features/user-preferences/state/user-preferences.model';
import {
emailAlerts,
EmailAlertType,
} from 'core-app/features/user-preferences/reminder-settings/email-alerts/email-alerts-settings.component';
import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';
-import {
- filter,
- withLatestFrom,
-} from 'rxjs/operators';
+import { filter, withLatestFrom } from 'rxjs/operators';
import { filterObservable } from 'core-app/shared/helpers/rxjs/filterWith';
import { INotificationSetting } from 'core-app/features/user-preferences/state/notification-setting.model';
-
-export const myReminderPageComponentSelector = 'op-reminders-page';
+import { populateInputsFromDataset } from 'core-app/shared/components/dataset-inputs';
interface IReminderSettingsFormValue {
immediateReminders:ImmediateRemindersSettings,
@@ -43,7 +29,6 @@ interface IReminderSettingsFormValue {
}
@Component({
- selector: myReminderPageComponentSelector,
templateUrl: './reminder-settings-page.component.html',
styleUrls: ['./reminder-settings-page.component.sass'],
changeDetection: ChangeDetectionStrategy.OnPush,
@@ -93,18 +78,18 @@ export class ReminderSettingsPageComponent extends UntilDestroyedMixin implement
formInitialized = false;
constructor(
- private I18n:I18nService,
- private storeService:UserPreferencesService,
- private currentUserService:CurrentUserService,
- private uiRouterGlobals:UIRouterGlobals,
- private fb:UntypedFormBuilder,
- private cdRef:ChangeDetectorRef,
+ readonly elementRef:ElementRef,
+ readonly I18n:I18nService,
+ readonly storeService:UserPreferencesService,
+ readonly currentUserService:CurrentUserService,
+ readonly fb:UntypedFormBuilder,
+ readonly cdRef:ChangeDetectorRef,
) {
super();
+ populateInputsFromDataset(this);
}
ngOnInit():void {
- this.userId = (this.userId || this.uiRouterGlobals.params.userId) as string;
this
.currentUserService
.user$
diff --git a/frontend/src/app/features/user-preferences/user-preferences.lazy-routes.ts b/frontend/src/app/features/user-preferences/user-preferences.lazy-routes.ts
deleted file mode 100644
index 3c071840c66..00000000000
--- a/frontend/src/app/features/user-preferences/user-preferences.lazy-routes.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-// -- copyright
-// OpenProject is an open source project management software.
-// Copyright (C) 2012-2024 the OpenProject GmbH
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License version 3.
-//
-// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
-// Copyright (C) 2006-2013 Jean-Philippe Lang
-// Copyright (C) 2010-2013 the ChiliProject Team
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-// See COPYRIGHT and LICENSE files for more details.
-//++
-
-import { Ng2StateDeclaration } from '@uirouter/angular';
-
-export const MY_ACCOUNT_LAZY_ROUTES:Ng2StateDeclaration[] = [
- {
- name: 'my_notifications.**',
- url: '/my/notifications',
- loadChildren: () => import('./user-preferences.module').then((m) => m.OpenProjectMyAccountModule),
- },
- {
- name: 'user_notifications.**',
- url: '/users/:userId/edit/notifications',
- loadChildren: () => import('./user-preferences.module').then((m) => m.OpenProjectMyAccountModule),
- },
- {
- name: 'my_reminders.**',
- url: '/my/reminders',
- loadChildren: () => import('./user-preferences.module').then((m) => m.OpenProjectMyAccountModule),
- },
- {
- name: 'user_reminders.**',
- url: '/users/:userId/edit/reminders',
- loadChildren: () => import('./user-preferences.module').then((m) => m.OpenProjectMyAccountModule),
- },
-];
diff --git a/frontend/src/app/features/user-preferences/user-preferences.module.ts b/frontend/src/app/features/user-preferences/user-preferences.module.ts
index 2e55662d83a..79ebd491751 100644
--- a/frontend/src/app/features/user-preferences/user-preferences.module.ts
+++ b/frontend/src/app/features/user-preferences/user-preferences.module.ts
@@ -1,22 +1,33 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-import { UIRouterModule } from '@uirouter/angular';
-import {
- FormsModule,
- ReactiveFormsModule,
-} from '@angular/forms';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { OpSharedModule } from 'core-app/shared/shared.module';
-import { OpenprojectAutocompleterModule } from 'core-app/shared/components/autocompleter/openproject-autocompleter.module';
+import {
+ OpenprojectAutocompleterModule,
+} from 'core-app/shared/components/autocompleter/openproject-autocompleter.module';
import { UserPreferencesService } from 'core-app/features/user-preferences/state/user-preferences.service';
-import { NotificationsSettingsPageComponent } from 'core-app/features/user-preferences/notifications-settings/page/notifications-settings-page.component';
-import { NotificationSettingInlineCreateComponent } from 'core-app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component';
-import { MY_ACCOUNT_ROUTES } from 'core-app/features/user-preferences/user-preferences.routes';
-import { NotificationsSettingsToolbarComponent } from './notifications-settings/toolbar/notifications-settings-toolbar.component';
-import { NotificationSettingsTableComponent } from './notifications-settings/table/notification-settings-table.component';
+import {
+ NotificationsSettingsPageComponent,
+} from 'core-app/features/user-preferences/notifications-settings/page/notifications-settings-page.component';
+import {
+ NotificationSettingInlineCreateComponent,
+} from 'core-app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component';
+import {
+ NotificationsSettingsToolbarComponent,
+} from './notifications-settings/toolbar/notifications-settings-toolbar.component';
+import {
+ NotificationSettingsTableComponent,
+} from './notifications-settings/table/notification-settings-table.component';
import { ReminderSettingsPageComponent } from './reminder-settings/page/reminder-settings-page.component';
-import { ReminderSettingsDailyTimeComponent } from 'core-app/features/user-preferences/reminder-settings/reminder-time/reminder-settings-daily-time.component';
-import { ImmediateReminderSettingsComponent } from 'core-app/features/user-preferences/reminder-settings/immediate-reminders/immediate-reminder-settings.component';
-import { EmailAlertsSettingsComponent } from 'core-app/features/user-preferences/reminder-settings/email-alerts/email-alerts-settings.component';
+import {
+ ReminderSettingsDailyTimeComponent,
+} from 'core-app/features/user-preferences/reminder-settings/reminder-time/reminder-settings-daily-time.component';
+import {
+ ImmediateReminderSettingsComponent,
+} from 'core-app/features/user-preferences/reminder-settings/immediate-reminders/immediate-reminder-settings.component';
+import {
+ EmailAlertsSettingsComponent,
+} from 'core-app/features/user-preferences/reminder-settings/email-alerts/email-alerts-settings.component';
import { WorkdaysSettingsComponent } from './reminder-settings/workdays/workdays-settings.component';
import { PauseRemindersComponent } from './reminder-settings/pause-reminders/pause-reminders.component';
@@ -42,10 +53,6 @@ import { PauseRemindersComponent } from './reminder-settings/pause-reminders/pau
OpenprojectAutocompleterModule,
FormsModule,
ReactiveFormsModule,
- // Routes for /my/*
- UIRouterModule.forChild({
- states: MY_ACCOUNT_ROUTES,
- }),
],
})
export class OpenProjectMyAccountModule { }
diff --git a/frontend/src/app/features/user-preferences/user-preferences.routes.ts b/frontend/src/app/features/user-preferences/user-preferences.routes.ts
deleted file mode 100644
index 7b9d2115f64..00000000000
--- a/frontend/src/app/features/user-preferences/user-preferences.routes.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-// -- copyright
-// OpenProject is an open source project management software.
-// Copyright (C) 2012-2024 the OpenProject GmbH
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License version 3.
-//
-// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
-// Copyright (C) 2006-2013 Jean-Philippe Lang
-// Copyright (C) 2010-2013 the ChiliProject Team
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-// See COPYRIGHT and LICENSE files for more details.
-//++
-
-import { Ng2StateDeclaration } from '@uirouter/angular';
-import { NotificationsSettingsPageComponent } from 'core-app/features/user-preferences/notifications-settings/page/notifications-settings-page.component';
-import { ReminderSettingsPageComponent } from './reminder-settings/page/reminder-settings-page.component';
-
-export const MY_ACCOUNT_ROUTES:Ng2StateDeclaration[] = [
- {
- name: 'my_notifications',
- url: '/my/notifications',
- component: NotificationsSettingsPageComponent,
- },
- {
- name: 'user_notifications',
- url: '/users/:userId/edit/notifications',
- component: NotificationsSettingsPageComponent,
- },
- {
- name: 'my_reminders',
- url: '/my/reminders',
- component: ReminderSettingsPageComponent,
- },
- {
- name: 'user_reminders',
- url: '/users/:userId/edit/reminders',
- component: ReminderSettingsPageComponent,
- },
-];