vcomply-workflow-engine 3.2.0 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5507,7 +5507,7 @@ class GrcObjectContainerComponent {
5507
5507
  }
5508
5508
  //TODO: implement this
5509
5509
  onTextChange(event) {
5510
- this.grcPayload.name = event;
5510
+ this.grcPayload.name = event.trim();
5511
5511
  this.openedPopup = '';
5512
5512
  this.grcNameValidationError = '';
5513
5513
  this.isDuplicateName = false;
@@ -5846,8 +5846,9 @@ class GrcObjectContainerComponent {
5846
5846
  this.updateGRCObject();
5847
5847
  return;
5848
5848
  }
5849
- this.grcPayload.owners = this.getOwnersExceptDefault(this.grcPayload.owners);
5850
- this.apiService.addGRCObject(this.grcPayload).subscribe({
5849
+ let PAYLOAD = JSON.parse(JSON.stringify(this.grcPayload));
5850
+ PAYLOAD.owners = this.getOwnersExceptDefault(PAYLOAD.owners);
5851
+ this.apiService.addGRCObject(PAYLOAD).subscribe({
5851
5852
  next: (data) => {
5852
5853
  this.showSmiley = true;
5853
5854
  this.setMoreOptionsOnSubmit();
@@ -5857,7 +5858,7 @@ class GrcObjectContainerComponent {
5857
5858
  error: (error) => {
5858
5859
  this.isLoading = false;
5859
5860
  console.error('error', error, error.status);
5860
- if (error.status === 409) {
5861
+ if (error.status === 409 || error.status === 403) {
5861
5862
  this.isDuplicateName = true;
5862
5863
  this.setMoreOptionsOnSubmit();
5863
5864
  this.mapUserList({
@@ -5995,8 +5996,9 @@ class GrcObjectContainerComponent {
5995
5996
  return riskCategoryPayload;
5996
5997
  }
5997
5998
  updateGRCObject() {
5998
- this.grcPayload.owners = this.getOwnersExceptDefault(this.grcPayload.owners);
5999
- this.apiService.updateGRCObject(this.grcPayload, this.ID).subscribe({
5999
+ let PAYLOAD = JSON.parse(JSON.stringify(this.grcPayload));
6000
+ PAYLOAD.owners = this.getOwnersExceptDefault(PAYLOAD.owners);
6001
+ this.apiService.updateGRCObject(PAYLOAD, this.ID).subscribe({
6000
6002
  next: (data) => {
6001
6003
  this.showSmiley = true;
6002
6004
  this.setMoreOptionsOnSubmit();