From 98a0eb6db5a02a66c84bd1dd5cc000ba86306504 Mon Sep 17 00:00:00 2001 From: dominik003 Date: Tue, 24 Oct 2023 17:36:38 +0200 Subject: [PATCH 1/2] feat: Add custom input dialog --- frontend/src/app/app.module.ts | 2 + .../confirmation-dialog.component.html | 4 +- .../confirmation-dialog.component.ts | 2 +- .../input-dialog/input-dialog.component.html | 37 ++++ .../input-dialog/input-dialog.component.ts | 49 +++++ .../move-model/move-model.component.ts | 2 +- .../project-user-settings.component.ts | 169 ++++++++++++------ .../user-settings/user-settings.component.ts | 159 ++++++++-------- 8 files changed, 289 insertions(+), 135 deletions(-) create mode 100644 frontend/src/app/helpers/input-dialog/input-dialog.component.html create mode 100644 frontend/src/app/helpers/input-dialog/input-dialog.component.ts diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 89dd3a26e..79f11f684 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -64,6 +64,7 @@ import { VersionComponent } from './general/metadata/version/version.component'; import { NavBarMenuComponent } from './general/nav-bar-menu/nav-bar-menu.component'; import { NoticeComponent } from './general/notice/notice.component'; import { DisplayValueComponent } from './helpers/display-value/display-value.component'; +import { InputDialogComponent } from './helpers/input-dialog/input-dialog.component'; import { MatIconComponent } from './helpers/mat-icon/mat-icon.component'; import { ButtonSkeletonLoaderComponent } from './helpers/skeleton-loaders/button-skeleton-loader/button-skeleton-loader.component'; import { FormFieldSkeletonLoaderComponent } from './helpers/skeleton-loaders/form-field-skeleton-loader/form-field-skeleton-loader.component'; @@ -176,6 +177,7 @@ import { SettingsComponent } from './settings/settings.component'; GitSettingsComponent, HeaderComponent, InitModelComponent, + InputDialogComponent, JobRunOverviewComponent, LegalComponent, LicencesComponent, diff --git a/frontend/src/app/general/confirmation-dialog/confirmation-dialog.component.html b/frontend/src/app/general/confirmation-dialog/confirmation-dialog.component.html index e67c495dc..89bc7925b 100644 --- a/frontend/src/app/general/confirmation-dialog/confirmation-dialog.component.html +++ b/frontend/src/app/general/confirmation-dialog/confirmation-dialog.component.html @@ -3,7 +3,7 @@ ~ SPDX-License-Identifier: Apache-2.0 --> -
+

{{ data.title }}

{{ data.text }}

@@ -28,7 +28,7 @@

{{ data.title }}

mat-flat-button color="primary" type="button" - (click)="onCancelClick()" + (click)="onCancel()" > Cancel diff --git a/frontend/src/app/general/confirmation-dialog/confirmation-dialog.component.ts b/frontend/src/app/general/confirmation-dialog/confirmation-dialog.component.ts index 87ac46735..bd803a830 100644 --- a/frontend/src/app/general/confirmation-dialog/confirmation-dialog.component.ts +++ b/frontend/src/app/general/confirmation-dialog/confirmation-dialog.component.ts @@ -34,7 +34,7 @@ export class ConfirmationDialogComponent implements OnInit { } } - onCancelClick(): void { + onCancel(): void { this.dialogRef.close(false); } diff --git a/frontend/src/app/helpers/input-dialog/input-dialog.component.html b/frontend/src/app/helpers/input-dialog/input-dialog.component.html new file mode 100644 index 000000000..b872c480d --- /dev/null +++ b/frontend/src/app/helpers/input-dialog/input-dialog.component.html @@ -0,0 +1,37 @@ + + +
+ +

{{ data.title }}

+

{{ data.text }}

+ + + Reason + + + Please enter something or click on cancel! + + +
+ + +
+ +
diff --git a/frontend/src/app/helpers/input-dialog/input-dialog.component.ts b/frontend/src/app/helpers/input-dialog/input-dialog.component.ts new file mode 100644 index 000000000..764f32c1d --- /dev/null +++ b/frontend/src/app/helpers/input-dialog/input-dialog.component.ts @@ -0,0 +1,49 @@ +/* + * SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Component, Inject, OnInit } from '@angular/core'; +import { FormControl, FormGroup, Validators } from '@angular/forms'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; + +export interface InputDialogData { + title: string; + text: string; +} + +export interface InputDialogResult { + text?: string; + success: boolean; +} + +@Component({ + selector: 'app-input-dialog', + templateUrl: './input-dialog.component.html', +}) +export class InputDialogComponent implements OnInit { + form = new FormGroup({ + result: new FormControl(undefined, [ + Validators.required, + ]), + }); + + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: InputDialogData, + ) {} + + ngOnInit(): void { + this.dialogRef.updateSize('500px'); + } + + onSubmit(): void { + if (this.form.valid) { + this.dialogRef.close({ text: this.form.value.result!, success: true }); + } + } + + onCancel(): void { + this.dialogRef.close({ text: undefined, success: false }); + } +} diff --git a/frontend/src/app/projects/project-detail/model-overview/move-model/move-model.component.ts b/frontend/src/app/projects/project-detail/model-overview/move-model/move-model.component.ts index 72e472e6a..79631cd7f 100644 --- a/frontend/src/app/projects/project-detail/model-overview/move-model/move-model.component.ts +++ b/frontend/src/app/projects/project-detail/model-overview/move-model/move-model.component.ts @@ -10,7 +10,7 @@ import { MatDialogRef, } from '@angular/material/dialog'; import { Observable, map } from 'rxjs'; -import { ConfirmationDialogComponent } from 'src/app/general/confirmation-dialog/confirmation-dialog.component'; +import { ConfirmationDialogComponent } from 'src/app/helpers/confirmation-dialog/confirmation-dialog.component'; import { ToastService } from 'src/app/helpers/toast/toast.service'; import { Model, diff --git a/frontend/src/app/projects/project-detail/project-users/project-user-settings.component.ts b/frontend/src/app/projects/project-detail/project-users/project-user-settings.component.ts index 07775bec8..085094f05 100644 --- a/frontend/src/app/projects/project-detail/project-users/project-user-settings.component.ts +++ b/frontend/src/app/projects/project-detail/project-users/project-user-settings.component.ts @@ -7,6 +7,10 @@ import { Component, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { filter, take } from 'rxjs'; +import { + InputDialogComponent, + InputDialogResult, +} from 'src/app/helpers/input-dialog/input-dialog.component'; import { ToastService } from 'src/app/helpers/toast/toast.service'; import { AddUserToProjectDialogComponent } from 'src/app/projects/project-detail/project-users/add-user-to-project/add-user-to-project.component'; import { ProjectAuditLogComponent } from 'src/app/projects/project-detail/project-users/project-audit-log/project-audit-log.component'; @@ -33,7 +37,7 @@ export class ProjectUserSettingsComponent implements OnInit { public userService: UserService, private toastService: ToastService, private projectService: ProjectService, - private matDialog: MatDialog, + private dialog: MatDialog, ) {} ngOnInit(): void { @@ -45,83 +49,132 @@ export class ProjectUserSettingsComponent implements OnInit { } removeUserFromProject(user: User): void { - const reason = this.getReason(); - if (!reason || !this.project) { + if (!this.project) { return; } - this.projectUserService - .deleteUserFromProject(this.project.slug, user.id, reason) - .subscribe(() => { - this.projectUserService.loadProjectUsers(this.project!.slug); - this.toastService.showSuccess( - `User removed`, - `User '${user.name}' has been removed from project '${this.project?.name}'`, - ); - }); + const projectName = this.project.name; + const projectSlug = this.project.slug; + + const dialogRef = this.dialog.open(InputDialogComponent, { + data: { + title: 'Remove User from Project', + text: `Do you really want to remove '${user.name}' from the project '${projectName}')? Please provide a reason.`, + }, + }); + + dialogRef.afterClosed().subscribe((result: InputDialogResult) => { + if (result.success && result.text) { + this.projectUserService + .deleteUserFromProject(projectSlug, user.id, result.text) + .subscribe({ + next: () => { + this.projectUserService.loadProjectUsers(projectSlug); + this.toastService.showSuccess( + `User removed`, + `User '${user.name}' has been removed from project '${projectName}'`, + ); + }, + }); + } + }); } upgradeUserToProjectManager(user: User): void { - const reason = this.getReason(); - if (!reason || !this.project) { + if (!this.project) { return; } - this.projectUserService - .changeRoleOfProjectUser(this.project.slug, user.id, 'manager', reason) - .subscribe(() => { - this.toastService.showSuccess( - `User modified`, - `User '${user.name}' can now manage the project '${this.project?.name}'`, - ); - }); + const projectName = this.project.name; + const projectSlug = this.project.slug; + + const dialogRef = this.dialog.open(InputDialogComponent, { + data: { + title: 'Upgrade to Project Manager Role', + text: `Do you really want to upgrade '${user.name}' to Project Manager in the project '${projectName}'? Please provide a reason.`, + }, + }); + + dialogRef.afterClosed().subscribe((result: InputDialogResult) => { + if (result.success && result.text) { + this.projectUserService + .changeRoleOfProjectUser(projectSlug, user.id, 'manager', result.text) + .subscribe({ + next: () => + this.toastService.showSuccess( + `User modified`, + `User '${user.name}' can now manage the project '${projectName}'`, + ), + }); + } + }); } downgradeUserToUserRole(user: User): void { - const reason = this.getReason(); - if (!reason || !this.project) { + if (!this.project) { return; } - this.projectUserService - .changeRoleOfProjectUser(this.project.slug, user.id, 'user', reason) - .subscribe(() => { - this.toastService.showSuccess( - `User modified`, - `User '${user.name}' is no longer project lead in the project '${this.project?.name}'`, - ); - }); + const projectName = this.project.name; + const projectSlug = this.project.slug; + + const dialogRef = this.dialog.open(InputDialogComponent, { + data: { + title: "Downgrade to 'User' Role", + text: `Do you really want to downgrade '${user.name}' to 'User' in the project '${projectName}'? Please provide a reason.`, + }, + }); + + dialogRef.afterClosed().subscribe((result: InputDialogResult) => { + if (result.success && result.text) { + this.projectUserService + .changeRoleOfProjectUser(projectSlug, user.id, 'user', result.text) + .subscribe({ + next: () => + this.toastService.showSuccess( + `User modified`, + `User '${user.name}' is no longer project lead in the project '${projectName}'`, + ), + }); + } + }); } setUserPermission(user: User, permission: ProjectUserPermission): void { - const reason = this.getReason(); - if (!reason || !this.project) { + if (!this.project) { return; } - this.projectUserService - .changePermissionOfProjectUser( - this.project.slug, - user.id, - permission, - reason, - ) - .subscribe(() => { - this.projectUserService.loadProjectUsers(this.project!.slug); - this.toastService.showSuccess( - `User modified`, - `User '${user.name}' has the permission '${permission}' in the project '${this.project?.name}' now`, - ); - }); - } + const projectName = this.project.name; + const projectSlug = this.project.slug; - getReason(): string | undefined { - const reason = window.prompt('Please enter a reason!'); - if (!reason) { - this.toastService.showError('Reason missing', 'You must enter a reason!'); - return; - } - return reason; + const dialogRef = this.dialog.open(InputDialogComponent, { + data: { + title: 'Modify Permission', + text: `Do you really want to set the permission of '${user.name}' to '${permission}' in the project '${projectName}'? Please provide a reason.`, + }, + }); + + dialogRef.afterClosed().subscribe((result: InputDialogResult) => { + if (result.success && result.text) { + this.projectUserService + .changePermissionOfProjectUser( + projectSlug, + user.id, + permission, + result.text, + ) + .subscribe({ + next: () => { + this.projectUserService.loadProjectUsers(projectSlug); + this.toastService.showSuccess( + `User modified`, + `User '${user.name}' has the permission '${permission}' in the project '${projectName}' now`, + ); + }, + }); + } + }); } getProjectUsersByRole( @@ -143,14 +196,14 @@ export class ProjectUserSettingsComponent implements OnInit { } openAddUserDialog() { - this.matDialog.open(AddUserToProjectDialogComponent, { + this.dialog.open(AddUserToProjectDialogComponent, { data: { project: this.project }, }); } openAuditLogDialog() { this.projectService.project$.pipe(take(1)).subscribe((project) => { - this.matDialog.open(ProjectAuditLogComponent, { + this.dialog.open(ProjectAuditLogComponent, { data: { projectSlug: project?.slug, }, diff --git a/frontend/src/app/settings/core/user-settings/user-settings.component.ts b/frontend/src/app/settings/core/user-settings/user-settings.component.ts index a2763d153..de3aa2d9a 100644 --- a/frontend/src/app/settings/core/user-settings/user-settings.component.ts +++ b/frontend/src/app/settings/core/user-settings/user-settings.component.ts @@ -12,9 +12,15 @@ import { ValidatorFn, Validators, } from '@angular/forms'; +import { MatDialog } from '@angular/material/dialog'; import { MatLegacyPaginator as MatPaginator } from '@angular/material/legacy-paginator'; import { MatLegacyTableDataSource as MatTableDataSource } from '@angular/material/legacy-table'; import { HistoryEvent } from 'src/app/events/service/events.service'; +import { ConfirmationDialogComponent } from 'src/app/general/confirmation-dialog/confirmation-dialog.component'; +import { + InputDialogComponent, + InputDialogResult, +} from 'src/app/helpers/input-dialog/input-dialog.component'; import { ToastService } from 'src/app/helpers/toast/toast.service'; import { ProjectUserService } from 'src/app/projects/project-detail/project-users/service/project-user.service'; import { @@ -57,6 +63,7 @@ export class UserSettingsComponent implements OnInit, AfterViewInit { public userService: UserService, public projectUserService: ProjectUserService, private toastService: ToastService, + private dialog: MatDialog, ) {} ngOnInit(): void { @@ -81,88 +88,103 @@ export class UserSettingsComponent implements OnInit, AfterViewInit { } createUser() { - const reason = this.getReason(); - if (!reason) { + if (!this.createUserFormGroup.valid) { return; } - if (this.createUserFormGroup.valid) { - const username = this.createUserFormGroup.value.username!; - - this.userService.createUser(username, 'user', reason).subscribe({ - next: () => { - this.toastService.showSuccess( - 'User created', - `The user ${username} has been created.`, - ); - this.getUsers(); - }, - }); - } + const username = this.createUserFormGroup.value.username!; + + const dialogRef = this.dialog.open(InputDialogComponent, { + data: { + title: 'Create User', + text: `Do you really want to create the user '${username}? Please provide a reason.'`, + }, + }); + + dialogRef.afterClosed().subscribe((result: InputDialogResult) => { + if (result.success && result.text) { + this.userService.createUser(username, 'user', result.text).subscribe({ + next: () => { + this.toastService.showSuccess( + 'User created', + `The user ${username} has been created.`, + ); + this.getUsers(); + }, + }); + } + }); } upgradeToAdministrator(user: User) { - const reason = this.getReason(); - if (!reason) { - return; - } - - this.userService.updateRoleOfUser(user, 'administrator', reason).subscribe({ - next: () => { - this.toastService.showSuccess( - 'Role of user updated', - user.name + ' has now the role administrator', - ); - this.getUsers(); - }, - error: () => { - this.toastService.showError( - 'Update of role failed', - 'The role of ' + user.name + ' has not been updated', - ); + const dialogRef = this.dialog.open(InputDialogComponent, { + data: { + title: 'Upgrade to Administrator Role', + text: `Do you really want to upgrade ${user.name} to Administrator? Please provide a reason.'`, }, }); + + dialogRef.afterClosed().subscribe((result: InputDialogResult) => { + if (result.success && result.text) { + this.userService + .updateRoleOfUser(user, 'administrator', result.text) + .subscribe({ + next: () => { + this.toastService.showSuccess( + 'Role of user updated', + user.name + ' has now the role administrator', + ); + this.getUsers(); + }, + }); + } + }); } downgradeToUser(user: User) { - const reason = this.getReason(); - if (!reason) { - return; - } - - this.userService.updateRoleOfUser(user, 'user', reason).subscribe({ - next: () => { - this.toastService.showSuccess( - 'Role of user updated', - user.name + ' has now the role user', - ); - this.getUsers(); - }, - error: () => { - this.toastService.showError( - 'Update of role failed', - 'The role of ' + user.name + ' has not been updated', - ); + const dialogRef = this.dialog.open(InputDialogComponent, { + data: { + title: 'Downgrade to User Role', + text: `Do you really want to downgrade ${user.name} to User? Please provide a reason.'`, }, }); + + dialogRef.afterClosed().subscribe((result: InputDialogResult) => { + if (result.success && result.text) { + this.userService.updateRoleOfUser(user, 'user', result.text).subscribe({ + next: () => { + this.toastService.showSuccess( + 'Role of user updated', + user.name + ' has now the role user', + ); + this.getUsers(); + }, + }); + } + }); } deleteUser(user: User) { - this.userService.deleteUser(user).subscribe({ - next: () => { - this.toastService.showSuccess( - 'User deleted', - user.name + ' has been deleted', - ); - this.getUsers(); - }, - error: () => { - this.toastService.showError( - 'User deletion failed', - user.name + ' has not been deleted', - ); + const dialogRef = this.dialog.open(ConfirmationDialogComponent, { + data: { + title: 'Delete User', + text: `Do you really want to delete the user ${user.name}?`, }, }); + + dialogRef.afterClosed().subscribe((result: boolean) => { + if (result) { + this.userService.deleteUser(user).subscribe({ + next: () => { + this.toastService.showSuccess( + 'User deleted', + user.name + ' has been deleted', + ); + this.getUsers(); + }, + }); + } + }); } getUsers() { @@ -193,13 +215,4 @@ export class UserSettingsComponent implements OnInit, AfterViewInit { }, }); } - - getReason(): string | undefined { - const reason = window.prompt('Please enter a reason!'); - if (!reason) { - this.toastService.showError('Reason missing', 'You must enter a reason!'); - return; - } - return reason; - } } From 2447015b4e163ba397cdffddf6459bc576372301 Mon Sep 17 00:00:00 2001 From: dominik003 Date: Mon, 30 Oct 2023 11:52:40 +0100 Subject: [PATCH 2/2] refactor: Move confirm dialog to helper directory --- frontend/src/app/app.module.ts | 2 +- .../confirmation-dialog/confirmation-dialog.component.html | 0 .../confirmation-dialog/confirmation-dialog.component.ts | 0 .../models/model-description/model-description.component.ts | 2 +- .../git/manage-git-model/manage-git-model.component.ts | 2 +- .../t4c/manage-t4c-model/manage-t4c-model.component.ts | 2 +- .../project-metadata/project-metadata.component.ts | 2 +- .../app/settings/core/user-settings/user-settings.component.ts | 2 +- 8 files changed, 6 insertions(+), 6 deletions(-) rename frontend/src/app/{general => helpers}/confirmation-dialog/confirmation-dialog.component.html (100%) rename frontend/src/app/{general => helpers}/confirmation-dialog/confirmation-dialog.component.ts (100%) diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 79f11f684..f01be1e91 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -55,7 +55,6 @@ import { AuthInterceptor } from './general/auth/http-interceptor/auth.intercepto import { LogoutComponent } from './general/auth/logout/logout/logout.component'; import { LogoutRedirectComponent } from './general/auth/logout/logout-redirect/logout-redirect.component'; import { BreadcrumbsComponent } from './general/breadcrumbs/breadcrumbs.component'; -import { ConfirmationDialogComponent } from './general/confirmation-dialog/confirmation-dialog.component'; import { ErrorHandlingInterceptor } from './general/error-handling/error-handling.interceptor'; import { FooterComponent } from './general/footer/footer.component'; import { LegalComponent } from './general/footer/legal/legal.component'; @@ -63,6 +62,7 @@ import { HeaderComponent } from './general/header/header.component'; import { VersionComponent } from './general/metadata/version/version.component'; import { NavBarMenuComponent } from './general/nav-bar-menu/nav-bar-menu.component'; import { NoticeComponent } from './general/notice/notice.component'; +import { ConfirmationDialogComponent } from './helpers/confirmation-dialog/confirmation-dialog.component'; import { DisplayValueComponent } from './helpers/display-value/display-value.component'; import { InputDialogComponent } from './helpers/input-dialog/input-dialog.component'; import { MatIconComponent } from './helpers/mat-icon/mat-icon.component'; diff --git a/frontend/src/app/general/confirmation-dialog/confirmation-dialog.component.html b/frontend/src/app/helpers/confirmation-dialog/confirmation-dialog.component.html similarity index 100% rename from frontend/src/app/general/confirmation-dialog/confirmation-dialog.component.html rename to frontend/src/app/helpers/confirmation-dialog/confirmation-dialog.component.html diff --git a/frontend/src/app/general/confirmation-dialog/confirmation-dialog.component.ts b/frontend/src/app/helpers/confirmation-dialog/confirmation-dialog.component.ts similarity index 100% rename from frontend/src/app/general/confirmation-dialog/confirmation-dialog.component.ts rename to frontend/src/app/helpers/confirmation-dialog/confirmation-dialog.component.ts diff --git a/frontend/src/app/projects/models/model-description/model-description.component.ts b/frontend/src/app/projects/models/model-description/model-description.component.ts index d186cc4c0..7372110b0 100644 --- a/frontend/src/app/projects/models/model-description/model-description.component.ts +++ b/frontend/src/app/projects/models/model-description/model-description.component.ts @@ -9,7 +9,7 @@ import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { combineLatest, filter, switchMap, tap } from 'rxjs'; -import { ConfirmationDialogComponent } from 'src/app/general/confirmation-dialog/confirmation-dialog.component'; +import { ConfirmationDialogComponent } from 'src/app/helpers/confirmation-dialog/confirmation-dialog.component'; import { ToastService } from 'src/app/helpers/toast/toast.service'; import { ModelService } from 'src/app/projects/models/service/model.service'; import { diff --git a/frontend/src/app/projects/models/model-source/git/manage-git-model/manage-git-model.component.ts b/frontend/src/app/projects/models/model-source/git/manage-git-model/manage-git-model.component.ts index d3422bd90..ce97910ff 100644 --- a/frontend/src/app/projects/models/model-source/git/manage-git-model/manage-git-model.component.ts +++ b/frontend/src/app/projects/models/model-source/git/manage-git-model/manage-git-model.component.ts @@ -23,7 +23,7 @@ import { ActivatedRoute, Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { filter, map, Observable, of } from 'rxjs'; import { BreadcrumbsService } from 'src/app/general/breadcrumbs/breadcrumbs.service'; -import { ConfirmationDialogComponent } from 'src/app/general/confirmation-dialog/confirmation-dialog.component'; +import { ConfirmationDialogComponent } from 'src/app/helpers/confirmation-dialog/confirmation-dialog.component'; import { ToastService } from 'src/app/helpers/toast/toast.service'; import { absoluteOrRelativeValidators, diff --git a/frontend/src/app/projects/models/model-source/t4c/manage-t4c-model/manage-t4c-model.component.ts b/frontend/src/app/projects/models/model-source/t4c/manage-t4c-model/manage-t4c-model.component.ts index fd27329a3..f6013e888 100644 --- a/frontend/src/app/projects/models/model-source/t4c/manage-t4c-model/manage-t4c-model.component.ts +++ b/frontend/src/app/projects/models/model-source/t4c/manage-t4c-model/manage-t4c-model.component.ts @@ -16,7 +16,7 @@ import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { combineLatest, filter } from 'rxjs'; -import { ConfirmationDialogComponent } from 'src/app/general/confirmation-dialog/confirmation-dialog.component'; +import { ConfirmationDialogComponent } from 'src/app/helpers/confirmation-dialog/confirmation-dialog.component'; import { ToastService } from 'src/app/helpers/toast/toast.service'; import { SubmitT4CModel, diff --git a/frontend/src/app/projects/project-detail/project-metadata/project-metadata.component.ts b/frontend/src/app/projects/project-detail/project-metadata/project-metadata.component.ts index ae463549d..515d3dc5c 100644 --- a/frontend/src/app/projects/project-detail/project-metadata/project-metadata.component.ts +++ b/frontend/src/app/projects/project-detail/project-metadata/project-metadata.component.ts @@ -8,7 +8,7 @@ import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { filter } from 'rxjs'; -import { ConfirmationDialogComponent } from 'src/app/general/confirmation-dialog/confirmation-dialog.component'; +import { ConfirmationDialogComponent } from 'src/app/helpers/confirmation-dialog/confirmation-dialog.component'; import { ToastService } from 'src/app/helpers/toast/toast.service'; import { ModelService } from 'src/app/projects/models/service/model.service'; import { ProjectUserService } from 'src/app/projects/project-detail/project-users/service/project-user.service'; diff --git a/frontend/src/app/settings/core/user-settings/user-settings.component.ts b/frontend/src/app/settings/core/user-settings/user-settings.component.ts index de3aa2d9a..6f627f490 100644 --- a/frontend/src/app/settings/core/user-settings/user-settings.component.ts +++ b/frontend/src/app/settings/core/user-settings/user-settings.component.ts @@ -16,7 +16,7 @@ import { MatDialog } from '@angular/material/dialog'; import { MatLegacyPaginator as MatPaginator } from '@angular/material/legacy-paginator'; import { MatLegacyTableDataSource as MatTableDataSource } from '@angular/material/legacy-table'; import { HistoryEvent } from 'src/app/events/service/events.service'; -import { ConfirmationDialogComponent } from 'src/app/general/confirmation-dialog/confirmation-dialog.component'; +import { ConfirmationDialogComponent } from 'src/app/helpers/confirmation-dialog/confirmation-dialog.component'; import { InputDialogComponent, InputDialogResult,