nuxeo-development-framework 1.3.6 → 1.3.7

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.
@@ -7422,7 +7422,9 @@
7422
7422
  }, function (err) {
7423
7423
  _this.loading = false;
7424
7424
  _this.dialogRef.close(false);
7425
- _this.toastr.show('error', 'error', 'error');
7425
+ _this.toastr.show('error', 'error', err.ret.message ?
7426
+ "errors." + err.ret.code
7427
+ : 'genericError');
7426
7428
  });
7427
7429
  }
7428
7430
  else {
@@ -7434,7 +7436,9 @@
7434
7436
  _this.toastr.show('success', 'success', 'success');
7435
7437
  }, function (err) {
7436
7438
  _this.loading = false;
7437
- _this.toastr.show('error', 'error', 'error');
7439
+ _this.toastr.show('error', 'error', err.ret.message ?
7440
+ "errors." + err.ret.code
7441
+ : 'genericError');
7438
7442
  });
7439
7443
  }
7440
7444
  };
@@ -7467,7 +7471,9 @@
7467
7471
  _this.toastr.show('success', 'success', 'success');
7468
7472
  }, function (err) {
7469
7473
  _this.loading = false;
7470
- _this.toastr.show('error', 'error', 'error');
7474
+ _this.toastr.show('error', 'error', err.ret.message ?
7475
+ "errors." + err.ret.code
7476
+ : 'genericError');
7471
7477
  });
7472
7478
  };
7473
7479
  return DepartmentFormComponent;
@@ -10616,7 +10622,9 @@
10616
10622
  _this.toastr.show('success', _this.data.toastrTitle, _this.data.toastrMsg);
10617
10623
  }, function (error) {
10618
10624
  _this.calling = false;
10619
- _this.toastr.show('error', 'Error', 'genericError');
10625
+ _this.toastr.show('error', 'Error', error.ret.message ?
10626
+ "errors." + error.ret.code
10627
+ : 'genericError');
10620
10628
  });
10621
10629
  };
10622
10630
  return ConfirmCallerDialogComponent;
@@ -11329,7 +11337,9 @@
11329
11337
  }, function (error) {
11330
11338
  console.error(error);
11331
11339
  _this.toastr
11332
- .show('error', 'error', error.message)
11340
+ .show('error', 'error', error.ret.message ?
11341
+ "errors." + error.ret.code
11342
+ : 'genericError')
11333
11343
  .onShown.subscribe(function () { });
11334
11344
  });
11335
11345
  }
@@ -12573,7 +12583,9 @@
12573
12583
  this.documentConstants = DocumentsConstants;
12574
12584
  }
12575
12585
  DocumentsComponent.prototype.onError = function (error) {
12576
- this.toastr.show('error', 'error', error ? error : 'genericError');
12586
+ this.toastr.show('error', 'error', error.ret.message ?
12587
+ "errors." + error.ret.code
12588
+ : 'genericError');
12577
12589
  };
12578
12590
  DocumentsComponent.prototype.onSuccess = function (files) {
12579
12591
  this.toastr.show('success', 'success', 'documents.addSuccess');
@@ -18915,7 +18927,9 @@
18915
18927
  _this.corrrelationsvc.getUpdatedRelation.next();
18916
18928
  _this.toastr.show('success', 'success', 'Realation Successfuly added');
18917
18929
  }, function (err) {
18918
- _this.toastr.show('error', 'error', 'Failed to add relation');
18930
+ _this.toastr.show('error', 'error', err.ret.message ?
18931
+ "errors." + err.ret.code
18932
+ : 'genericError');
18919
18933
  });
18920
18934
  }
18921
18935
  });