diff --git a/ui-ngx/src/app/modules/home/pages/user/user.component.html b/ui-ngx/src/app/modules/home/pages/user/user.component.html index 63154139e3..424cdd8f05 100644 --- a/ui-ngx/src/app/modules/home/pages/user/user.component.html +++ b/ui-ngx/src/app/modules/home/pages/user/user.component.html @@ -53,6 +53,17 @@ [fxShow]="!hideDelete() && !isEdit"> {{'user.delete' | translate }} +
+ +
diff --git a/ui-ngx/src/app/modules/home/pages/user/user.component.ts b/ui-ngx/src/app/modules/home/pages/user/user.component.ts index 7187731b5c..2d3b210829 100644 --- a/ui-ngx/src/app/modules/home/pages/user/user.component.ts +++ b/ui-ngx/src/app/modules/home/pages/user/user.component.ts @@ -25,6 +25,8 @@ import { map } from 'rxjs/operators'; import { Authority } from '@shared/models/authority.enum'; import { isDefinedAndNotNull, isUndefined } from '@core/utils'; import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; +import { ActionNotificationShow } from '@app/core/notification/notification.actions'; +import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'tb-user', @@ -44,7 +46,8 @@ export class UserComponent extends EntityComponent { @Optional() @Inject('entity') protected entityValue: User, @Optional() @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig, public fb: FormBuilder, - protected cd: ChangeDetectorRef) { + protected cd: ChangeDetectorRef, + protected translate: TranslateService) { super(store, fb, entityValue, entitiesTableConfigValue, cd); } @@ -100,4 +103,16 @@ export class UserComponent extends EntityComponent { isDefinedAndNotNull(entity.additionalInfo.homeDashboardHideToolbar) ? entity.additionalInfo.homeDashboardHideToolbar : true}}); } + onUserIdCopied($event) { + this.store.dispatch(new ActionNotificationShow( + { + message: this.translate.instant('user.idCopiedMessage'), + type: 'success', + duration: 750, + verticalPosition: 'bottom', + horizontalPosition: 'right' + } + )) + } + } diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index eb7c483a1a..e23d5508df 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -2808,7 +2808,9 @@ "disable-account": "Disable User Account", "enable-account": "Enable User Account", "enable-account-message": "User account was successfully enabled!", - "disable-account-message": "User account was successfully disabled!" + "disable-account-message": "User account was successfully disabled!", + "copyId": "Copy user Id", + "idCopiedMessage": "User Id has been copied to clipboard" }, "value": { "type": "Value type", diff --git a/ui-ngx/src/assets/locale/locale.constant-ru_RU.json b/ui-ngx/src/assets/locale/locale.constant-ru_RU.json index 9ba75064db..5916860fb0 100644 --- a/ui-ngx/src/assets/locale/locale.constant-ru_RU.json +++ b/ui-ngx/src/assets/locale/locale.constant-ru_RU.json @@ -1510,7 +1510,9 @@ "disable-account": "Отключить учетную запись пользователя", "enable-account": "Включить учетную запись пользователя", "enable-account-message": "Учетная запись пользователя была успешно включена!", - "disable-account-message": "Учетная запись пользователя была успешно отключена!" + "disable-account-message": "Учетная запись пользователя была успешно отключена!", + "copyId": "Копировать ИД пользователя", + "idCopiedMessage": "ИД пользователя скопирован в буфер обмена" }, "value": { "type": "Тип значения", diff --git a/ui-ngx/src/assets/locale/locale.constant-uk_UA.json b/ui-ngx/src/assets/locale/locale.constant-uk_UA.json index 23bb56cf29..20615d34e3 100644 --- a/ui-ngx/src/assets/locale/locale.constant-uk_UA.json +++ b/ui-ngx/src/assets/locale/locale.constant-uk_UA.json @@ -2078,7 +2078,9 @@ "disable-account": "Вимкнути обліковий запис користувача", "enable-account": "Увімкнути обліковий запис користувача", "enable-account-message": "Обліковий запис користувача успішно увімкнено!", - "disabled-account-message": "Обліковий запис користувача успішно вимкнено!" + "disabled-account-message": "Обліковий запис користувача успішно вимкнено!", + "copyId": "Копіювати Id користувача", + "idCopiedMessage": "Id користувача було скопійовано в буфер обміну" }, "value": { "type": "Тип значення",