RED-9580 - added getOne method for stats service to call new users stats endpoint and updated data from "delete user dialog" with new backend data
This commit is contained in:
parent
0f16644944
commit
af7a45d739
@ -82,8 +82,7 @@ export class AdminDialogService extends DialogService<DialogType> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async deleteUsers(userIds: string[], cb?: () => Promise<void> | void): Promise<void> {
|
async deleteUsers(userIds: string[], cb?: () => Promise<void> | void): Promise<void> {
|
||||||
// const result = await firstValueFrom(this._userStatsService.getFor(userIds));
|
const userStats = await firstValueFrom(this._userStatsService.getOne(userIds[0]));
|
||||||
// console.log('result: ', result);
|
|
||||||
|
|
||||||
const data: IConfirmationDialogData = {
|
const data: IConfirmationDialogData = {
|
||||||
title: _('confirm-delete-users.title'),
|
title: _('confirm-delete-users.title'),
|
||||||
@ -91,7 +90,11 @@ export class AdminDialogService extends DialogService<DialogType> {
|
|||||||
confirmationText: _('confirm-delete-users.delete'),
|
confirmationText: _('confirm-delete-users.delete'),
|
||||||
denyText: _('confirm-delete-users.cancel'),
|
denyText: _('confirm-delete-users.cancel'),
|
||||||
titleColor: TitleColors.WARN,
|
titleColor: TitleColors.WARN,
|
||||||
translateParams: { usersCount: 1, dossiersCount: this._getUsersDossiersCount(userIds) },
|
translateParams: {
|
||||||
|
usersCount: 1,
|
||||||
|
dossiersCount: userStats.numberOfDossierOwnerships,
|
||||||
|
documentsCount: userStats.numberOfAssignedFiles,
|
||||||
|
},
|
||||||
checkboxes: [
|
checkboxes: [
|
||||||
{ value: false, label: _('confirm-delete-users.impacted-dossiers') },
|
{ value: false, label: _('confirm-delete-users.impacted-dossiers') },
|
||||||
{ value: false, label: _('confirm-delete-users.impacted-documents') },
|
{ value: false, label: _('confirm-delete-users.impacted-documents') },
|
||||||
|
|||||||
@ -642,7 +642,7 @@
|
|||||||
"confirm-delete-users": {
|
"confirm-delete-users": {
|
||||||
"cancel": "Keep {usersCount, plural, one{user} other{users}}",
|
"cancel": "Keep {usersCount, plural, one{user} other{users}}",
|
||||||
"delete": "Delete {usersCount, plural, one{user} other{users}}",
|
"delete": "Delete {usersCount, plural, one{user} other{users}}",
|
||||||
"impacted-documents": "All documents pending review from the {usersCount, plural, one{user} other{users}} will be impacted",
|
"impacted-documents": "{documentsCount} {documentsCount, plural, one{document} other{documents}} will be impacted",
|
||||||
"impacted-dossiers": "{dossiersCount} {dossiersCount, plural, one{dossier} other{dossiers}} will be impacted",
|
"impacted-dossiers": "{dossiersCount} {dossiersCount, plural, one{dossier} other{dossiers}} will be impacted",
|
||||||
"title": "Delete {usersCount, plural, one{user} other{users}} from workspace",
|
"title": "Delete {usersCount, plural, one{user} other{users}} from workspace",
|
||||||
"toast-error": "Please confirm that you understand the consequences of this action.",
|
"toast-error": "Please confirm that you understand the consequences of this action.",
|
||||||
|
|||||||
@ -642,7 +642,7 @@
|
|||||||
"confirm-delete-users": {
|
"confirm-delete-users": {
|
||||||
"cancel": "Keep {usersCount, plural, one{user} other{users}}",
|
"cancel": "Keep {usersCount, plural, one{user} other{users}}",
|
||||||
"delete": "Delete {usersCount, plural, one{user} other{users}}",
|
"delete": "Delete {usersCount, plural, one{user} other{users}}",
|
||||||
"impacted-documents": "All documents pending review from the {usersCount, plural, one{user} other{users}} will be impacted",
|
"impacted-documents": "{documentsCount} {documentsCount, plural, one{document} other{documents}} will be impacted",
|
||||||
"impacted-dossiers": "{dossiersCount} {dossiersCount, plural, one{dossier} other{dossiers}} will be impacted",
|
"impacted-dossiers": "{dossiersCount} {dossiersCount, plural, one{dossier} other{dossiers}} will be impacted",
|
||||||
"title": "Delete {usersCount, plural, one{user} other{users}} from workspace",
|
"title": "Delete {usersCount, plural, one{user} other{users}} from workspace",
|
||||||
"toast-error": "Please confirm that you understand the consequences of this action.",
|
"toast-error": "Please confirm that you understand the consequences of this action.",
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 58382ddfeed1d6d4d61f03abd1bbb0dd840afa94
|
Subproject commit fc8be33dc6d33642ae207b6ae4c17a6ec254d11a
|
||||||
Loading…
x
Reference in New Issue
Block a user