From 609736386bfa70bd29dbaf1ca34cd08581d58f37 Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Sat, 14 Nov 2020 21:22:38 +0100 Subject: [PATCH] Finishing user operations for angular app --- .../archiva-web/src/app/app-routing.module.ts | 2 + .../src/app/modules/user/user.module.ts | 4 +- .../manage-users-add.component.html | 2 +- .../manage-users-add.component.ts | 16 +--- .../user/users/manage-users-base.component.ts | 19 ++++ .../manage-users-delete.component.html | 35 ++++++++ .../manage-users-delete.component.scss | 18 ++++ .../manage-users-delete.component.spec.ts | 43 +++++++++ .../manage-users-delete.component.ts | 71 +++++++++++++++ .../manage-users-edit.component.html | 8 +- .../manage-users-edit.component.ts | 89 ++++++++++++------- .../manage-users-list.component.html | 5 ++ .../app/services/archiva-request.service.ts | 8 ++ .../src/app/services/user.service.ts | 10 +++ .../main/archiva-web/src/assets/i18n/en.json | 10 +++ 15 files changed, 287 insertions(+), 53 deletions(-) create mode 100644 archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-delete/manage-users-delete.component.html create mode 100644 archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-delete/manage-users-delete.component.scss create mode 100644 archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-delete/manage-users-delete.component.spec.ts create mode 100644 archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-delete/manage-users-delete.component.ts diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app-routing.module.ts b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app-routing.module.ts index 084b0c133..186a69853 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app-routing.module.ts +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app-routing.module.ts @@ -34,6 +34,7 @@ import {ManageUsersListComponent} from "./modules/user/users/manage-users-list/m import {ManageUsersAddComponent} from "./modules/user/users/manage-users-add/manage-users-add.component"; import {ManageUsersEditComponent} from "./modules/user/users/manage-users-edit/manage-users-edit.component"; import {RoutingGuardService as Guard} from "./services/routing-guard.service"; +import {ManageUsersDeleteComponent} from "./modules/user/users/manage-users-delete/manage-users-delete.component"; /** * You can use Guard (RoutingGuardService) for permission checking. The service needs data with one parameter 'perm', @@ -57,6 +58,7 @@ const routes: Routes = [ {path: 'add', component: ManageUsersAddComponent}, {path: 'edit/:userid', component: ManageUsersEditComponent}, {path: 'edit', redirectTo:'edit/guest' }, + {path: 'delete/:userid', component: ManageUsersDeleteComponent}, {path: '', redirectTo:'list', pathMatch:'full'} ] }, diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/user.module.ts b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/user.module.ts index 1ca65cc2a..9897c1f1d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/user.module.ts +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/user.module.ts @@ -24,6 +24,7 @@ import {ManageUsersAddComponent} from "./users/manage-users-add/manage-users-add import {ManageUsersEditComponent} from "./users/manage-users-edit/manage-users-edit.component"; import {SharedModule} from "../shared/shared.module"; import {FormsModule, ReactiveFormsModule} from "@angular/forms"; +import { ManageUsersDeleteComponent } from './users/manage-users-delete/manage-users-delete.component'; @@ -32,7 +33,8 @@ import {FormsModule, ReactiveFormsModule} from "@angular/forms"; ManageUsersComponent, ManageUsersListComponent, ManageUsersAddComponent, - ManageUsersEditComponent + ManageUsersEditComponent, + ManageUsersDeleteComponent ], exports: [ ManageUsersComponent, diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-add/manage-users-add.component.html b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-add/manage-users-add.component.html index 13b764cf6..4f95595af 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-add/manage-users-add.component.html +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-add/manage-users-add.component.html @@ -89,7 +89,7 @@ [attr.disabled]="userForm.valid?null:true">{{'users.add.submit'|translate}}