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.
@@ -5460,7 +5460,7 @@ class GrcObjectContainerComponent {
5460
5460
  }
5461
5461
  //TODO: implement this
5462
5462
  onTextChange(event) {
5463
- this.grcPayload.name = event;
5463
+ this.grcPayload.name = event.trim();
5464
5464
  this.openedPopup = '';
5465
5465
  this.grcNameValidationError = '';
5466
5466
  this.isDuplicateName = false;
@@ -5791,8 +5791,9 @@ class GrcObjectContainerComponent {
5791
5791
  this.updateGRCObject();
5792
5792
  return;
5793
5793
  }
5794
- this.grcPayload.owners = this.getOwnersExceptDefault(this.grcPayload.owners);
5795
- this.apiService.addGRCObject(this.grcPayload).subscribe({
5794
+ let PAYLOAD = JSON.parse(JSON.stringify(this.grcPayload));
5795
+ PAYLOAD.owners = this.getOwnersExceptDefault(PAYLOAD.owners);
5796
+ this.apiService.addGRCObject(PAYLOAD).subscribe({
5796
5797
  next: (data) => {
5797
5798
  this.showSmiley = true;
5798
5799
  this.setMoreOptionsOnSubmit();
@@ -5802,7 +5803,7 @@ class GrcObjectContainerComponent {
5802
5803
  error: (error) => {
5803
5804
  this.isLoading = false;
5804
5805
  console.error('error', error, error.status);
5805
- if (error.status === 409) {
5806
+ if (error.status === 409 || error.status === 403) {
5806
5807
  this.isDuplicateName = true;
5807
5808
  this.setMoreOptionsOnSubmit();
5808
5809
  this.mapUserList({
@@ -5936,8 +5937,9 @@ class GrcObjectContainerComponent {
5936
5937
  return riskCategoryPayload;
5937
5938
  }
5938
5939
  updateGRCObject() {
5939
- this.grcPayload.owners = this.getOwnersExceptDefault(this.grcPayload.owners);
5940
- this.apiService.updateGRCObject(this.grcPayload, this.ID).subscribe({
5940
+ let PAYLOAD = JSON.parse(JSON.stringify(this.grcPayload));
5941
+ PAYLOAD.owners = this.getOwnersExceptDefault(PAYLOAD.owners);
5942
+ this.apiService.updateGRCObject(PAYLOAD, this.ID).subscribe({
5941
5943
  next: (data) => {
5942
5944
  this.showSmiley = true;
5943
5945
  this.setMoreOptionsOnSubmit();