Revert "TSK-614 BUG Update accesItemsClone onReset access items form."
This reverts commit 97133761fd
.
This commit is contained in:
parent
7c79bca35c
commit
9f2aa0a03f
|
@ -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);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue