Revert "TSK-614 BUG Update accesItemsClone onReset access items form."

This reverts commit 97133761fd.
This commit is contained in:
Martin Rojas Miguel Angel 2018-07-04 15:45:40 +02:00 committed by Holger Hagen
parent 7c79bca35c
commit 9f2aa0a03f
2 changed files with 1 additions and 12 deletions

View File

@ -129,14 +129,4 @@ describe('AccessItemsComponent', () => {
new AlertModel(AlertType.SUCCESS, `Workbasket ${component.workbasket.key} Access items were saved successfully`));
});
it('should keep accessItemsClone length to previous value after clearing the form.', () => {
expect(component.accessItemsClone.length).toBe(2);
component.remove(1);
expect(component.accessItemsClone.length).toBe(1);
component.clear();
expect(component.accessItemsClone.length).toBe(2);
});
});

View File

@ -130,10 +130,9 @@ export class AccessItemsComponent implements OnChanges, OnDestroy {
}
clear() {
this.alertService.triggerAlert(new AlertModel(AlertType.INFO, 'Reset edited fields'))
this.AccessItemsForm.reset();
this.setAccessItemsGroups(this.accessItemsResetClone);
this.accessItemsClone = this.cloneAccessItems(this.accessItemsResetClone);
this.alertService.triggerAlert(new AlertModel(AlertType.INFO, 'Reset edited fields'))
}
remove(index: number) {