vcomply-workflow-engine 2.6.92 → 2.6.94
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.
- package/bundles/vcomply-workflow-engine.umd.js +35 -38
- package/bundles/vcomply-workflow-engine.umd.js.map +1 -1
- package/esm2015/lib/workflow-risk/workflow-risk.component.js +33 -37
- package/esm2015/lib/workflow-services/add-risk.service.js +3 -3
- package/fesm2015/vcomply-workflow-engine.js +34 -38
- package/fesm2015/vcomply-workflow-engine.js.map +1 -1
- package/package.json +1 -1
|
@@ -1729,7 +1729,7 @@
|
|
|
1729
1729
|
AddRiskService.prototype.addRisk = function (payload) {
|
|
1730
1730
|
var headers = new i1.HttpHeaders().set('token', this.authService.getAuthorizationToken());
|
|
1731
1731
|
return this.http
|
|
1732
|
-
.post(this.env.
|
|
1732
|
+
.post(this.env.risk + 'risk/CreateRisk', payload, { headers: headers })
|
|
1733
1733
|
.pipe(operators.retry(2));
|
|
1734
1734
|
};
|
|
1735
1735
|
AddRiskService.prototype.addBulkRisk = function (payload) {
|
|
@@ -1745,7 +1745,7 @@
|
|
|
1745
1745
|
AddRiskService.prototype.updateRisk = function (riskId, payload) {
|
|
1746
1746
|
var headers = new i1.HttpHeaders().set('token', this.authService.getAuthorizationToken());
|
|
1747
1747
|
return this.http
|
|
1748
|
-
.post(this.env.
|
|
1748
|
+
.post(this.env.risk + 'risk/CreateRisk&RiskId=' + riskId, payload, { headers: headers })
|
|
1749
1749
|
.pipe(operators.retry(2));
|
|
1750
1750
|
};
|
|
1751
1751
|
return AddRiskService;
|
|
@@ -2400,6 +2400,7 @@
|
|
|
2400
2400
|
}
|
|
2401
2401
|
};
|
|
2402
2402
|
WorkflowRiskComponent.prototype.createRisk = function (riskForm) {
|
|
2403
|
+
var _this = this;
|
|
2403
2404
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2404
2405
|
this.loader = true;
|
|
2405
2406
|
this.uiKitService.isLoader = false;
|
|
@@ -2439,42 +2440,38 @@
|
|
|
2439
2440
|
risk_label: (riskForm === null || riskForm === void 0 ? void 0 : riskForm.addRiskLabel) ? riskForm === null || riskForm === void 0 ? void 0 : riskForm.riskLabelValue : 1,
|
|
2440
2441
|
};
|
|
2441
2442
|
console.log("payloadpayloadpayloadpayload", payload);
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
// this.snackBar.show('OOPS! Something went wrong and the page could not be loaded. Could you please try one more time?', 'alert');
|
|
2475
|
-
// }
|
|
2476
|
-
// );
|
|
2477
|
-
// }
|
|
2443
|
+
if (this.mode == 'CREATE') {
|
|
2444
|
+
this.riskService.addRisk(payload).subscribe(function (res) {
|
|
2445
|
+
console.log(res);
|
|
2446
|
+
_this.riskData = res;
|
|
2447
|
+
_this.riskId = res._id;
|
|
2448
|
+
_this.loader = false;
|
|
2449
|
+
_this.uiKitService.isLoader = false;
|
|
2450
|
+
_this.showSmiley = true;
|
|
2451
|
+
_this.uiKitService.isSmileyOn = true;
|
|
2452
|
+
// this.resetForm();
|
|
2453
|
+
}, function (err) {
|
|
2454
|
+
console.log(err);
|
|
2455
|
+
_this.loader = false;
|
|
2456
|
+
_this.uiKitService.isLoader = false;
|
|
2457
|
+
_this.snackBar.show('OOPS! Something went wrong and the page could not be loaded. Could you please try one more time?', 'alert');
|
|
2458
|
+
});
|
|
2459
|
+
}
|
|
2460
|
+
if (this.mode == 'EDIT' && this.openedFrom !== 'MOVE_TO_REGISTER') {
|
|
2461
|
+
this.smileyMessage = "The risk has been modified.";
|
|
2462
|
+
this.riskService.updateRisk(this.riskId, payload).subscribe(function (res) {
|
|
2463
|
+
_this.riskData = res;
|
|
2464
|
+
_this.showSmiley = true;
|
|
2465
|
+
_this.uiKitService.isSmileyOn = true;
|
|
2466
|
+
_this.loader = false;
|
|
2467
|
+
_this.uiKitService.isLoader = false;
|
|
2468
|
+
}, function (err) {
|
|
2469
|
+
console.log(err);
|
|
2470
|
+
_this.loader = false;
|
|
2471
|
+
_this.uiKitService.isLoader = false;
|
|
2472
|
+
_this.snackBar.show('OOPS! Something went wrong and the page could not be loaded. Could you please try one more time?', 'alert');
|
|
2473
|
+
});
|
|
2474
|
+
}
|
|
2478
2475
|
if (this.openedFrom === 'MOVE_TO_REGISTER') {
|
|
2479
2476
|
this.closeWorkflow.emit({ evt: { action: 'MOVE_TO_REGISTER', payload: payload }, confirm: false });
|
|
2480
2477
|
}
|