SUPPORT-9634: fix process

This commit is contained in:
adel.ka 2025-12-01 17:06:33 +03:00
parent 4988cbaecf
commit 4592b8abc1

View file

@ -49,6 +49,7 @@ export class UserManagementService extends Behavior {
private rpc: UserApplicationListRpcService; private rpc: UserApplicationListRpcService;
private authService: AuthorizationService; private authService: AuthorizationService;
private statusUpdateService: StatusUpdateService; private statusUpdateService: StatusUpdateService;
private formJson;
initialize() { initialize() {
super.initialize(); super.initialize();
@ -65,20 +66,19 @@ export class UserManagementService extends Behavior {
return; return;
} }
const kind = this.applicationKind.getValue(); const kind = this.applicationKind.getValue();
const formJson = this.collectData(); const appNumber = this.formJson['appNumber'];
const appNumber = formJson['appNumber']; const accountId = this.formJson['accountId'];
const accountId = formJson['accountId']; const personId = this.formJson['idPerson'];
const personId = formJson['idPerson']; const login = this.formJson['login'];
const login = formJson['login'];
let request; let request;
switch (kind) { switch (kind) {
case ApplicationKind.CREATE_USER: case ApplicationKind.CREATE_USER:
let createData = new CreateAccountData(); let createData = new CreateAccountData();
createData.account = this.populateDto(new Account(), formJson); createData.account = this.populateDto(new Account(), this.formJson);
createData.person = this.populateDto(new Person(), formJson); createData.person = this.populateDto(new Person(), this.formJson);
let roles = new Roles(); let roles = new Roles();
roles.add = formJson['rolesList'].map(id => { roles.add = this.formJson['rolesList'].map(id => {
let role = new Role(); let role = new Role();
role.id = id; role.id = id;
return role; return role;
@ -93,8 +93,8 @@ export class UserManagementService extends Behavior {
let editPersonData = new EditPersonData(); let editPersonData = new EditPersonData();
editPersonData.accountId = accountId; editPersonData.accountId = accountId;
editPersonData.personId = personId; editPersonData.personId = personId;
editPersonData.organizationId = formJson['idDomain']; editPersonData.organizationId = this.formJson['idDomain'];
editPersonData.personData = this.populateDto(new Person(), formJson); editPersonData.personData = this.populateDto(new Person(), this.formJson);
request = new ProcessRequest<EditPersonData>(); request = new ProcessRequest<EditPersonData>();
request.data = editPersonData; request.data = editPersonData;
request.processKey = ProcessKey.EDIT_PERSON; request.processKey = ProcessKey.EDIT_PERSON;
@ -102,7 +102,7 @@ export class UserManagementService extends Behavior {
break; break;
case ApplicationKind.EDIT_USER_ACCOUNT: case ApplicationKind.EDIT_USER_ACCOUNT:
let editAccountData = new EditAccountData(); let editAccountData = new EditAccountData();
let account = this.populateDto(new Account(), formJson); let account = this.populateDto(new Account(), this.formJson);
editAccountData.account = account; editAccountData.account = account;
editAccountData.accountId = accountId; editAccountData.accountId = accountId;
request = new ProcessRequest<EditAccountData>(); request = new ProcessRequest<EditAccountData>();
@ -112,7 +112,7 @@ export class UserManagementService extends Behavior {
break; break;
case ApplicationKind.EDIT_USER_ROLES: case ApplicationKind.EDIT_USER_ROLES:
let editRolesAccount = new EditRolesAccount(); let editRolesAccount = new EditRolesAccount();
let rolesList = formJson['rolesList']; let rolesList = this.formJson['rolesList'];
editRolesAccount.accountId = accountId; editRolesAccount.accountId = accountId;
let roles2 = new Roles(); let roles2 = new Roles();
roles2.add = rolesList.map(id => { roles2.add = rolesList.map(id => {
@ -144,7 +144,7 @@ export class UserManagementService extends Behavior {
break; break;
case ApplicationKind.UNBLOCK_USER: case ApplicationKind.UNBLOCK_USER:
let unblockingData = new UnblockingData(); let unblockingData = new UnblockingData();
let blockedRegion = formJson['blockedRegion']; let blockedRegion = this.formJson['blockedRegion'];
switch (blockedRegion) { switch (blockedRegion) {
case BlockedRegion.ACCOUNT: case BlockedRegion.ACCOUNT:
@ -187,6 +187,7 @@ export class UserManagementService extends Behavior {
@Visible() @Visible()
public allowSendToErvu(): void { public allowSendToErvu(): void {
this.formJson = this.collectData();
this.sendToErvu = true; this.sendToErvu = true;
} }