[oform] Add clone method for field master

This commit is contained in:
KirillovIlya
2022-12-01 16:30:29 +03:00
parent f6c07aa139
commit fcb0d9ba55
2 changed files with 16 additions and 1 deletions

View File

@ -55,6 +55,22 @@
{
this.Field = logicField;
};
CFieldMaster.prototype.clone = function()
{
let fm = new CFieldMaster(true);
for (let index = 0, count = this.Users.length; index < count; ++index)
{
fm.addUser(this.Users[index]);
}
for (let index = 0, count = this.Signers.length; index < count; ++index)
{
fm.addSigner(this.Signers[index]);
}
return fm;
};
CFieldMaster.prototype.setFieldId = function(fieldId)
{
if (fieldId === this.FieldId)

View File

@ -140,7 +140,6 @@
if (fields.length > 0)
{
// TODO: При удалении все поля переназначить на заданную роль
let delegateUserMaster, delegateFieldGroup;
if (-1 === delegateIndex || delegateIndex === roleIndex)
{