arco-support-request 0.0.88 → 0.0.90
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/arco-support-request.metadata.json +1 -1
- package/bundles/arco-support-request.umd.js +177 -104
- package/bundles/arco-support-request.umd.js.map +1 -1
- package/bundles/arco-support-request.umd.min.js +1 -1
- package/bundles/arco-support-request.umd.min.js.map +1 -1
- package/esm2015/lib/core/global.service.js +45 -15
- package/esm2015/lib/core/handlebar-helper-register.js +30 -1
- package/esm2015/lib/entity-type-setup/activities-create/activities-create.component.js +4 -2
- package/esm2015/lib/entity-type-setup/activities-view/activities-view.component.js +4 -1
- package/esm2015/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.js +7 -1
- package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.js +23 -3
- package/esm2015/lib/entity-type-setup/service/entity-type-setup.service.js +29 -6
- package/esm2015/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.js +3 -2
- package/esm2015/lib/support-request/case-list/case-list.component.js +13 -24
- package/esm2015/lib/support-request/request-flow/request-flow.component.js +10 -20
- package/esm2015/lib/support-request/self-service-flow/self-service-flow.component.js +3 -5
- package/esm2015/lib/support-request/support-request-create/support-request-create.component.js +5 -2
- package/esm2015/lib/support-request/support-request-details/support-request-details.component.js +10 -38
- package/esm2015/lib/templates/grid/grid-service.service.js +13 -1
- package/esm2015/lib/templates/interface_enum/common-Interface.js +1 -1
- package/fesm2015/arco-support-request.js +173 -100
- package/fesm2015/arco-support-request.js.map +1 -1
- package/lib/entity-type-setup/service/entity-type-setup.service.d.ts +2 -1
- package/lib/support-request/case-list/case-list.component.d.ts +1 -1
- package/lib/templates/grid/grid-service.service.d.ts +1 -0
- package/lib/templates/interface_enum/common-Interface.d.ts +1 -0
- package/package.json +1 -1
|
@@ -430,6 +430,18 @@ function GenerateCriteriaForExport(criteria) {
|
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
432
|
return temparr;
|
|
433
|
+
}
|
|
434
|
+
function GetFormattedDateWithTime(_date) {
|
|
435
|
+
var todayTime = new Date(_date);
|
|
436
|
+
let month = (todayTime.getMonth() + 1);
|
|
437
|
+
month = month > 9 ? month : "0" + month;
|
|
438
|
+
var day = todayTime.getDate() > 9 ? todayTime.getDate() : "0" + todayTime.getDate();
|
|
439
|
+
var year = todayTime.getFullYear();
|
|
440
|
+
var Hours = todayTime.getHours() > 9 ? todayTime.getHours() : "0" + todayTime.getHours();
|
|
441
|
+
var min = todayTime.getMinutes() > 9 ? todayTime.getMinutes() : "0" + todayTime.getMinutes();
|
|
442
|
+
var sec = todayTime.getSeconds() > 9 ? todayTime.getSeconds() : "0" + todayTime.getSeconds();
|
|
443
|
+
return year + '-' + month + '-' + day + "T" + Hours + ":" + min + ":" + sec + ".000Z";
|
|
444
|
+
// "2022-01-23T09:04:45.904Z"
|
|
433
445
|
}
|
|
434
446
|
|
|
435
447
|
const JWT = {
|
|
@@ -2198,20 +2210,50 @@ GlobalService.ctorParameters = () => [
|
|
|
2198
2210
|
{ type: HttpClient }
|
|
2199
2211
|
];
|
|
2200
2212
|
function errorMessageType(error) {
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
error
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2213
|
+
var _a, _b, _c, _d, _e;
|
|
2214
|
+
try {
|
|
2215
|
+
if (error &&
|
|
2216
|
+
error.error &&
|
|
2217
|
+
error.error.Errors &&
|
|
2218
|
+
error.error.Errors.length > 0)
|
|
2219
|
+
return error.error.Errors.map((x) => x.ErrorMessage).join('\n');
|
|
2220
|
+
else if (error && error.error && error.error.Message)
|
|
2221
|
+
return error.error.Message;
|
|
2222
|
+
else if (typeof error.error == 'string')
|
|
2223
|
+
return error.error;
|
|
2224
|
+
else if (((_a = error.error) === null || _a === void 0 ? void 0 : _a.status) == false) {
|
|
2225
|
+
try {
|
|
2226
|
+
let msg = JSON.parse((_b = error.error) === null || _b === void 0 ? void 0 : _b.msg);
|
|
2227
|
+
if (msg && msg.msg) {
|
|
2228
|
+
msg = msg.msg;
|
|
2229
|
+
}
|
|
2230
|
+
else {
|
|
2231
|
+
msg = (_c = error.error) === null || _c === void 0 ? void 0 : _c.msg;
|
|
2232
|
+
}
|
|
2233
|
+
return msg;
|
|
2234
|
+
}
|
|
2235
|
+
catch (err) {
|
|
2236
|
+
let msg = ((_d = error.error) === null || _d === void 0 ? void 0 : _d.msg);
|
|
2237
|
+
if (msg && msg.msg) {
|
|
2238
|
+
msg = msg.msg;
|
|
2239
|
+
}
|
|
2240
|
+
else {
|
|
2241
|
+
msg = (_e = error.error) === null || _e === void 0 ? void 0 : _e.msg;
|
|
2242
|
+
}
|
|
2243
|
+
return msg;
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2246
|
+
else if (typeof error.error == "object") {
|
|
2247
|
+
return JSON.stringify(error.error);
|
|
2248
|
+
}
|
|
2249
|
+
else if (error.message)
|
|
2250
|
+
return error.message;
|
|
2251
|
+
else {
|
|
2252
|
+
console.log(error);
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
catch (err) {
|
|
2256
|
+
return "Error,Contact system admin";
|
|
2215
2257
|
}
|
|
2216
2258
|
}
|
|
2217
2259
|
|
|
@@ -2755,30 +2797,46 @@ class EntityTypeSetupService {
|
|
|
2755
2797
|
dynamicAPi(restData, FormValues, searchCriteria, SearchText, isHavecriteria) {
|
|
2756
2798
|
// alert('get service');
|
|
2757
2799
|
let params = this.setparameter(restData.QueryStrings, FormValues, SearchText, isHavecriteria);
|
|
2800
|
+
let headers = this.setHeaders(restData.Headers, FormValues);
|
|
2758
2801
|
let parameter = this.getArraycolumn(params);
|
|
2759
2802
|
let _url = restData.URL + parameter;
|
|
2760
2803
|
// searchCriteria = this.setCriteriaField(restData.QueryStrings,FormValues,searchCriteria)
|
|
2804
|
+
let _responseType = restData.ResponseType ? restData.ResponseType : 'json';
|
|
2761
2805
|
switch (restData.Method) {
|
|
2762
2806
|
case 'GET': {
|
|
2763
2807
|
return this.http.get(_url, {
|
|
2764
2808
|
params: CriteriaBuilder(searchCriteria),
|
|
2809
|
+
responseType: _responseType,
|
|
2810
|
+
headers: headers
|
|
2765
2811
|
});
|
|
2766
2812
|
break;
|
|
2767
2813
|
}
|
|
2768
2814
|
case 'POST': {
|
|
2769
|
-
return this.http.post(_url, restData.Body
|
|
2815
|
+
return this.http.post(_url, restData.Body, {
|
|
2816
|
+
responseType: _responseType,
|
|
2817
|
+
headers: headers
|
|
2818
|
+
});
|
|
2770
2819
|
break;
|
|
2771
2820
|
}
|
|
2772
2821
|
case 'PUT': {
|
|
2773
|
-
return this.http.put(_url, restData.Body
|
|
2822
|
+
return this.http.put(_url, restData.Body, {
|
|
2823
|
+
responseType: _responseType,
|
|
2824
|
+
headers: headers
|
|
2825
|
+
});
|
|
2774
2826
|
break;
|
|
2775
2827
|
}
|
|
2776
2828
|
case 'DELETE': {
|
|
2777
|
-
return this.http.delete(_url
|
|
2829
|
+
return this.http.delete(_url, {
|
|
2830
|
+
responseType: _responseType,
|
|
2831
|
+
headers: headers
|
|
2832
|
+
});
|
|
2778
2833
|
break;
|
|
2779
2834
|
}
|
|
2780
2835
|
default: {
|
|
2781
|
-
return this.http.get(_url
|
|
2836
|
+
return this.http.get(_url, {
|
|
2837
|
+
responseType: _responseType,
|
|
2838
|
+
headers: headers
|
|
2839
|
+
});
|
|
2782
2840
|
}
|
|
2783
2841
|
}
|
|
2784
2842
|
}
|
|
@@ -2825,6 +2883,13 @@ class EntityTypeSetupService {
|
|
|
2825
2883
|
else
|
|
2826
2884
|
return '';
|
|
2827
2885
|
}
|
|
2886
|
+
setHeaders(header, FormValues) {
|
|
2887
|
+
let headers = new HttpHeaders();
|
|
2888
|
+
header.forEach((element) => {
|
|
2889
|
+
headers = headers.set(element.Name, element.Type == 'FieldValue' ? FormValues[element.Value] : element.Value);
|
|
2890
|
+
});
|
|
2891
|
+
return headers;
|
|
2892
|
+
}
|
|
2828
2893
|
getDyamicUrl(url) {
|
|
2829
2894
|
let _url = `${environment.ServerUrl}/${url}`;
|
|
2830
2895
|
return this.http.get(_url);
|
|
@@ -4874,9 +4939,7 @@ class CaseListComponent {
|
|
|
4874
4939
|
this.getPageCount();
|
|
4875
4940
|
}, (error) => {
|
|
4876
4941
|
console.log(error);
|
|
4877
|
-
Swal.fire(
|
|
4878
|
-
title: this.translatePipe.transform(error.error),
|
|
4879
|
-
});
|
|
4942
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
4880
4943
|
});
|
|
4881
4944
|
}
|
|
4882
4945
|
loadGrid(data, TotalRecord) {
|
|
@@ -4929,6 +4992,7 @@ class CaseListComponent {
|
|
|
4929
4992
|
}
|
|
4930
4993
|
}, (error) => {
|
|
4931
4994
|
console.log(error);
|
|
4995
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
4932
4996
|
});
|
|
4933
4997
|
}
|
|
4934
4998
|
getActiveEntityForm() {
|
|
@@ -4937,6 +5001,7 @@ class CaseListComponent {
|
|
|
4937
5001
|
this.getFormList();
|
|
4938
5002
|
}, (error) => {
|
|
4939
5003
|
console.log(error);
|
|
5004
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
4940
5005
|
});
|
|
4941
5006
|
}
|
|
4942
5007
|
getFormList() {
|
|
@@ -4977,6 +5042,7 @@ class CaseListComponent {
|
|
|
4977
5042
|
closePopupCreateView(Type, Data) {
|
|
4978
5043
|
this.CreateItemId = null;
|
|
4979
5044
|
this.isShowCreateRequest = false;
|
|
5045
|
+
this.openDetailsPopup(Data, true);
|
|
4980
5046
|
}
|
|
4981
5047
|
getPaginationListData(pageNo, pageSize) {
|
|
4982
5048
|
this.pageNo = pageNo;
|
|
@@ -4991,11 +5057,14 @@ class CaseListComponent {
|
|
|
4991
5057
|
getPageCount() {
|
|
4992
5058
|
this.pageCount = Math.ceil(this.totalRecordCount / this.pageSize);
|
|
4993
5059
|
}
|
|
4994
|
-
openDetailsPopup(data) {
|
|
5060
|
+
openDetailsPopup(data, afterCreate) {
|
|
4995
5061
|
this.isDetails = true;
|
|
4996
5062
|
this.CaseId = data.CaseId;
|
|
4997
5063
|
this.detailsRecId = data.RecId; // RefRecId is the main recid
|
|
4998
5064
|
this.detailsEntityTypeRecId = data.EntityTypeRecId;
|
|
5065
|
+
if (afterCreate) {
|
|
5066
|
+
this.detailsEntityTypeRecId = ((data === null || data === void 0 ? void 0 : data.EntityTypeId) ? data.EntityTypeId : this.EntityTypeId);
|
|
5067
|
+
}
|
|
4999
5068
|
this.supportService.IsShowBackBtn = true;
|
|
5000
5069
|
this.displayPopupDetailView = true;
|
|
5001
5070
|
}
|
|
@@ -5064,9 +5133,8 @@ class CaseListComponent {
|
|
|
5064
5133
|
this.selectStage(this.StatusAndStageList[0]);
|
|
5065
5134
|
console.log(res.Data);
|
|
5066
5135
|
}, (error) => {
|
|
5067
|
-
var _a;
|
|
5068
5136
|
console.log(error);
|
|
5069
|
-
Swal.fire(
|
|
5137
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
5070
5138
|
});
|
|
5071
5139
|
}
|
|
5072
5140
|
selectStage(item) {
|
|
@@ -5088,7 +5156,7 @@ class CaseListComponent {
|
|
|
5088
5156
|
this.wfActionData = res;
|
|
5089
5157
|
console.log(res);
|
|
5090
5158
|
}, (error) => {
|
|
5091
|
-
|
|
5159
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
5092
5160
|
});
|
|
5093
5161
|
}
|
|
5094
5162
|
getStatusField(data) {
|
|
@@ -5138,21 +5206,7 @@ class CaseListComponent {
|
|
|
5138
5206
|
this.getListDatas(this.Searchcriteria);
|
|
5139
5207
|
console.log(res);
|
|
5140
5208
|
}, (error) => {
|
|
5141
|
-
|
|
5142
|
-
error.error;
|
|
5143
|
-
if (((_a = error.error) === null || _a === void 0 ? void 0 : _a.status) == false) {
|
|
5144
|
-
let msg = JSON.parse((_b = error.error) === null || _b === void 0 ? void 0 : _b.msg);
|
|
5145
|
-
if (msg && msg.msg) {
|
|
5146
|
-
msg = msg.msg;
|
|
5147
|
-
}
|
|
5148
|
-
else {
|
|
5149
|
-
msg = (_c = error.error) === null || _c === void 0 ? void 0 : _c.msg;
|
|
5150
|
-
}
|
|
5151
|
-
Swal.fire(this.translatePipe.transform(msg));
|
|
5152
|
-
}
|
|
5153
|
-
else {
|
|
5154
|
-
Swal.fire(this.translatePipe.transform(error.ExceptionMessage), this.translatePipe.transform(error.message));
|
|
5155
|
-
}
|
|
5209
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
5156
5210
|
});
|
|
5157
5211
|
}
|
|
5158
5212
|
slider(direction, Id) {
|
|
@@ -5378,6 +5432,7 @@ class SupportRequestDetailsComponent {
|
|
|
5378
5432
|
this.EntityFormId = res.RecId;
|
|
5379
5433
|
}, (error) => {
|
|
5380
5434
|
console.log(error);
|
|
5435
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
5381
5436
|
});
|
|
5382
5437
|
}
|
|
5383
5438
|
getWorkflowActionComments(comments, updateFileds, updateFieldsObject) {
|
|
@@ -5388,21 +5443,7 @@ class SupportRequestDetailsComponent {
|
|
|
5388
5443
|
this.getTaskDetails();
|
|
5389
5444
|
console.log(res);
|
|
5390
5445
|
}, (error) => {
|
|
5391
|
-
|
|
5392
|
-
error.error;
|
|
5393
|
-
if (((_a = error.error) === null || _a === void 0 ? void 0 : _a.status) == false) {
|
|
5394
|
-
let msg = JSON.parse((_b = error.error) === null || _b === void 0 ? void 0 : _b.msg);
|
|
5395
|
-
if (msg && msg.msg) {
|
|
5396
|
-
msg = msg.msg;
|
|
5397
|
-
}
|
|
5398
|
-
else {
|
|
5399
|
-
msg = (_c = error.error) === null || _c === void 0 ? void 0 : _c.msg;
|
|
5400
|
-
}
|
|
5401
|
-
Swal.fire(this.translatePipe.transform(msg));
|
|
5402
|
-
}
|
|
5403
|
-
else {
|
|
5404
|
-
Swal.fire(this.translatePipe.transform(error.ExceptionMessage), this.translatePipe.transform(error.message));
|
|
5405
|
-
}
|
|
5446
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
5406
5447
|
});
|
|
5407
5448
|
}
|
|
5408
5449
|
getComments() {
|
|
@@ -5413,11 +5454,7 @@ class SupportRequestDetailsComponent {
|
|
|
5413
5454
|
this.commentsData = x.Data;
|
|
5414
5455
|
this.commentsDataCount = x.TotalCount;
|
|
5415
5456
|
}, (error) => {
|
|
5416
|
-
|
|
5417
|
-
Swal.fire({
|
|
5418
|
-
title: this.translatePipe.transform(error.error),
|
|
5419
|
-
});
|
|
5420
|
-
// error.error
|
|
5457
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
5421
5458
|
});
|
|
5422
5459
|
}
|
|
5423
5460
|
}
|
|
@@ -5494,9 +5531,8 @@ class SupportRequestDetailsComponent {
|
|
|
5494
5531
|
let showPendingIndex = this.StatusAndStageList.findIndex(x => x.OrderId == 0);
|
|
5495
5532
|
this.StatusAndStageList.splice(showPendingIndex, 1);
|
|
5496
5533
|
}, (error) => {
|
|
5497
|
-
var _a;
|
|
5498
5534
|
console.log(error);
|
|
5499
|
-
Swal.fire(
|
|
5535
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
5500
5536
|
});
|
|
5501
5537
|
}
|
|
5502
5538
|
selectProcess(item) {
|
|
@@ -5541,7 +5577,7 @@ class SupportRequestDetailsComponent {
|
|
|
5541
5577
|
console.log('Activity', res.Data);
|
|
5542
5578
|
});
|
|
5543
5579
|
(error) => {
|
|
5544
|
-
|
|
5580
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
5545
5581
|
};
|
|
5546
5582
|
}
|
|
5547
5583
|
setTimeline() {
|
|
@@ -5597,10 +5633,9 @@ class SupportRequestDetailsComponent {
|
|
|
5597
5633
|
console.log(res);
|
|
5598
5634
|
this.loadGrid(res.Data, res.TotalCount);
|
|
5599
5635
|
}, (error) => {
|
|
5600
|
-
var _a;
|
|
5601
5636
|
console.log(error);
|
|
5602
5637
|
this.loadGrid([], 0);
|
|
5603
|
-
Swal.fire(
|
|
5638
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
5604
5639
|
});
|
|
5605
5640
|
}
|
|
5606
5641
|
}
|
|
@@ -5648,7 +5683,7 @@ class SupportRequestDetailsComponent {
|
|
|
5648
5683
|
this.wfStageAction = res;
|
|
5649
5684
|
console.log(res);
|
|
5650
5685
|
}, (error) => {
|
|
5651
|
-
|
|
5686
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
5652
5687
|
});
|
|
5653
5688
|
}
|
|
5654
5689
|
getStatusField(data) {
|
|
@@ -5714,12 +5749,7 @@ class SupportRequestDetailsComponent {
|
|
|
5714
5749
|
this.closeModelPopup();
|
|
5715
5750
|
this.taskService.showCommentPopup = false;
|
|
5716
5751
|
this.taskService.close();
|
|
5717
|
-
|
|
5718
|
-
Swal.fire({
|
|
5719
|
-
title: this.translatePipe.transform(error.error),
|
|
5720
|
-
});
|
|
5721
|
-
// alert("err");
|
|
5722
|
-
// error.error
|
|
5752
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
5723
5753
|
});
|
|
5724
5754
|
}
|
|
5725
5755
|
getAssignmentByRefRecIdList(Criteria) {
|
|
@@ -5731,11 +5761,7 @@ class SupportRequestDetailsComponent {
|
|
|
5731
5761
|
this.loadGrid(x.Data, x.TotalCount);
|
|
5732
5762
|
this.globalService.dataLoader = false;
|
|
5733
5763
|
}, (error) => {
|
|
5734
|
-
|
|
5735
|
-
// error.error
|
|
5736
|
-
Swal.fire({
|
|
5737
|
-
title: this.translatePipe.transform(error.error),
|
|
5738
|
-
});
|
|
5764
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
5739
5765
|
});
|
|
5740
5766
|
}
|
|
5741
5767
|
}
|
|
@@ -6111,6 +6137,7 @@ class SupportRequestCreateComponent {
|
|
|
6111
6137
|
this.EntityFormId = res.RecId;
|
|
6112
6138
|
}, (error) => {
|
|
6113
6139
|
console.log(error);
|
|
6140
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
6114
6141
|
});
|
|
6115
6142
|
}
|
|
6116
6143
|
getAssignedDocumentList() {
|
|
@@ -6178,6 +6205,7 @@ class SupportRequestCreateComponent {
|
|
|
6178
6205
|
this.supportService.displayListPopUp = true;
|
|
6179
6206
|
}, (error) => {
|
|
6180
6207
|
console.log(error);
|
|
6208
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
6181
6209
|
});
|
|
6182
6210
|
}
|
|
6183
6211
|
else {
|
|
@@ -6253,6 +6281,7 @@ class SupportRequestCreateComponent {
|
|
|
6253
6281
|
// })
|
|
6254
6282
|
}, (error) => {
|
|
6255
6283
|
console.log(error);
|
|
6284
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
6256
6285
|
});
|
|
6257
6286
|
}
|
|
6258
6287
|
}
|
|
@@ -6575,9 +6604,7 @@ class RequestFlowComponent {
|
|
|
6575
6604
|
});
|
|
6576
6605
|
}, (error) => {
|
|
6577
6606
|
console.log(error);
|
|
6578
|
-
Swal.fire(
|
|
6579
|
-
title: this.translatePipe.transform(error.error),
|
|
6580
|
-
});
|
|
6607
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
6581
6608
|
});
|
|
6582
6609
|
}
|
|
6583
6610
|
getIssueGroupRequesterMappingByRequesterType() {
|
|
@@ -6593,9 +6620,7 @@ class RequestFlowComponent {
|
|
|
6593
6620
|
});
|
|
6594
6621
|
}, (error) => {
|
|
6595
6622
|
console.log(error);
|
|
6596
|
-
Swal.fire(
|
|
6597
|
-
title: this.translatePipe.transform(error.error),
|
|
6598
|
-
});
|
|
6623
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
6599
6624
|
});
|
|
6600
6625
|
}
|
|
6601
6626
|
getDropDownForIssueSubGroup() {
|
|
@@ -6608,9 +6633,7 @@ class RequestFlowComponent {
|
|
|
6608
6633
|
this.IssueSubGroupDDL = res;
|
|
6609
6634
|
}, (error) => {
|
|
6610
6635
|
console.log(error);
|
|
6611
|
-
Swal.fire(
|
|
6612
|
-
title: this.translatePipe.transform(error.error),
|
|
6613
|
-
});
|
|
6636
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
6614
6637
|
});
|
|
6615
6638
|
}
|
|
6616
6639
|
}
|
|
@@ -6650,9 +6673,7 @@ class RequestFlowComponent {
|
|
|
6650
6673
|
//this.getCaseType();
|
|
6651
6674
|
}, (error) => {
|
|
6652
6675
|
console.log(error);
|
|
6653
|
-
Swal.fire(
|
|
6654
|
-
title: this.translatePipe.transform(error.error),
|
|
6655
|
-
});
|
|
6676
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
6656
6677
|
});
|
|
6657
6678
|
}
|
|
6658
6679
|
getIssuebyissuerequester() {
|
|
@@ -6674,9 +6695,7 @@ class RequestFlowComponent {
|
|
|
6674
6695
|
}
|
|
6675
6696
|
}, (error) => {
|
|
6676
6697
|
console.log(error);
|
|
6677
|
-
Swal.fire(
|
|
6678
|
-
title: this.translatePipe.transform(error.error),
|
|
6679
|
-
});
|
|
6698
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
6680
6699
|
// this.caseTypeList = [{ RecId: 43, Description: 'Vacation Request' }];
|
|
6681
6700
|
});
|
|
6682
6701
|
}
|
|
@@ -6739,9 +6758,7 @@ class RequestFlowComponent {
|
|
|
6739
6758
|
this.getPageCount();
|
|
6740
6759
|
}, (error) => {
|
|
6741
6760
|
console.log(error);
|
|
6742
|
-
Swal.fire(
|
|
6743
|
-
title: this.translatePipe.transform(error.error),
|
|
6744
|
-
});
|
|
6761
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
6745
6762
|
});
|
|
6746
6763
|
}
|
|
6747
6764
|
getStatusListCount() {
|
|
@@ -6828,6 +6845,7 @@ class RequestFlowComponent {
|
|
|
6828
6845
|
// this.openIssueGroup();
|
|
6829
6846
|
}, (error) => {
|
|
6830
6847
|
console.log(error);
|
|
6848
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
6831
6849
|
});
|
|
6832
6850
|
}
|
|
6833
6851
|
closeModel() {
|
|
@@ -6997,6 +7015,7 @@ class RequestFlowComponent {
|
|
|
6997
7015
|
this.RequesterField = this.SupportRequestUser.FieldTypeIdEn;
|
|
6998
7016
|
}, (error) => {
|
|
6999
7017
|
console.log(error);
|
|
7018
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
7000
7019
|
});
|
|
7001
7020
|
}
|
|
7002
7021
|
}
|
|
@@ -7312,6 +7331,35 @@ function registerHandlebarHelperMethods(handlebars) {
|
|
|
7312
7331
|
handlebars.registerHelper('SetFieldByLang', function (Lang, value, value2) {
|
|
7313
7332
|
return Lang == "Ar" ? value2 : value;
|
|
7314
7333
|
});
|
|
7334
|
+
handlebars.registerHelper('DateToStringPipe', function (date, formate) {
|
|
7335
|
+
if (date) {
|
|
7336
|
+
debugger;
|
|
7337
|
+
let _date = new Date(date);
|
|
7338
|
+
let _day = _date.getDate() < 10 ? ("0" + _date.getDate()) : _date.getDate();
|
|
7339
|
+
let _mon = _date.getMonth() + 1;
|
|
7340
|
+
let _month = _mon < 10 ? ("0" + _mon) : _mon;
|
|
7341
|
+
let _year = _date.getFullYear();
|
|
7342
|
+
switch (formate) {
|
|
7343
|
+
case "dd/mm/yyyy":
|
|
7344
|
+
return [_day, _month, _year].join('/');
|
|
7345
|
+
case "dd-mm-yyyy":
|
|
7346
|
+
return [_day, _month, _year].join('-');
|
|
7347
|
+
case "mm/dd/yyyy":
|
|
7348
|
+
return [_month, _day, _year].join('/');
|
|
7349
|
+
case "mm-dd-yyyy":
|
|
7350
|
+
return [_month, _day, _year].join('-');
|
|
7351
|
+
case "yyyy/mm/dd":
|
|
7352
|
+
return [_year, _month, _day].join('/');
|
|
7353
|
+
case "yyyy-mm-dd":
|
|
7354
|
+
return [_year, _month, _day].join('-');
|
|
7355
|
+
default:
|
|
7356
|
+
return [_month, _day, _year].join('/'); // "mm/dd/yyyy"
|
|
7357
|
+
}
|
|
7358
|
+
}
|
|
7359
|
+
else {
|
|
7360
|
+
return date;
|
|
7361
|
+
}
|
|
7362
|
+
});
|
|
7315
7363
|
}
|
|
7316
7364
|
|
|
7317
7365
|
// import { TranslatePipe } from 'src/app/Pipe/translate.pipe';
|
|
@@ -7405,6 +7453,7 @@ class EntityDynamicViewComponent {
|
|
|
7405
7453
|
this.getFieldListByEntityType(this.EntityTypeForm.EntityTypeId);
|
|
7406
7454
|
}, (error) => {
|
|
7407
7455
|
console.log(error);
|
|
7456
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
7408
7457
|
});
|
|
7409
7458
|
}
|
|
7410
7459
|
getFieldListByEntityType(EntityTypeId) {
|
|
@@ -7415,6 +7464,7 @@ class EntityDynamicViewComponent {
|
|
|
7415
7464
|
// this.TempFieldValidators();
|
|
7416
7465
|
}, (error) => {
|
|
7417
7466
|
console.log(error);
|
|
7467
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
7418
7468
|
});
|
|
7419
7469
|
}
|
|
7420
7470
|
getAllDefaultEntityTypeForm(EntityTypeId) {
|
|
@@ -7432,6 +7482,7 @@ class EntityDynamicViewComponent {
|
|
|
7432
7482
|
Swal.fire({
|
|
7433
7483
|
title: this.translatePipe.transform('Template form not found'),
|
|
7434
7484
|
});
|
|
7485
|
+
Swal.fire(errorMessageType(error), this.translatePipe.transform('Template form not found'), 'error');
|
|
7435
7486
|
console.log(error);
|
|
7436
7487
|
});
|
|
7437
7488
|
}
|
|
@@ -7965,6 +8016,11 @@ class EntityDynamicViewComponent {
|
|
|
7965
8016
|
let RestData = JSON.parse(_EntityTypeForm.DataSource);
|
|
7966
8017
|
let _hanbleBardata = {};
|
|
7967
8018
|
_hanbleBardata.FormData = this._PageForm.form.value;
|
|
8019
|
+
for (let key in _hanbleBardata.FormData) {
|
|
8020
|
+
if (Object.prototype.toString.call(_hanbleBardata.FormData[key]) === '[object Date]') {
|
|
8021
|
+
_hanbleBardata.FormData[key] = GetFormattedDateWithTime(_hanbleBardata.FormData[key]);
|
|
8022
|
+
}
|
|
8023
|
+
}
|
|
7968
8024
|
RestData.URL = this.hanbleBarHtml(RestData.URL, _hanbleBardata);
|
|
7969
8025
|
RestData.Body = this.hanbleBarHtml(RestData.Body, _hanbleBardata);
|
|
7970
8026
|
RestData.QueryStrings = RestData.QueryStrings.map(x => {
|
|
@@ -7989,11 +8045,21 @@ class EntityDynamicViewComponent {
|
|
|
7989
8045
|
if (Fields) {
|
|
7990
8046
|
let _Fields = JSON.parse(JSON.parse(Fields));
|
|
7991
8047
|
_Fields.forEach(x => {
|
|
7992
|
-
let
|
|
8048
|
+
let _valuedata = RestData.ResponseType == "text" ? _data : _data[x.Value];
|
|
8049
|
+
let _value = _valuedata;
|
|
7993
8050
|
let currentfield = this.EntityFieldList.filter(y => y.Description == x.Field)[0];
|
|
7994
8051
|
if (currentfield.DataType == E_DataType.date || currentfield.DataType == E_DataType.dateTime) {
|
|
7995
8052
|
_value = new Date(_data[x.Value]);
|
|
7996
8053
|
}
|
|
8054
|
+
let _handleData = this._PageForm.form.value;
|
|
8055
|
+
for (let key in _handleData) {
|
|
8056
|
+
if (Object.prototype.toString.call(_handleData[key]) === '[object Date]') {
|
|
8057
|
+
_handleData[key] = GetFormattedDateWithTime(_handleData[key]);
|
|
8058
|
+
}
|
|
8059
|
+
}
|
|
8060
|
+
_handleData.data = _data;
|
|
8061
|
+
_handleData.currentLang = this.globalService.CurrentLanguage;
|
|
8062
|
+
_value = this.hanbleBarHtml(_value, _handleData);
|
|
7997
8063
|
this._PageForm.form.get(x.Field).setValue(_value, { entitySelf: true });
|
|
7998
8064
|
});
|
|
7999
8065
|
}
|
|
@@ -8011,11 +8077,12 @@ class EntityDynamicViewComponent {
|
|
|
8011
8077
|
}
|
|
8012
8078
|
}, (error) => {
|
|
8013
8079
|
console.log(error);
|
|
8014
|
-
Swal.fire(errorMessageType(error));
|
|
8080
|
+
Swal.fire(errorMessageType(error), this.translatePipe.transform(''), 'error');
|
|
8015
8081
|
});
|
|
8016
8082
|
}
|
|
8017
8083
|
}, (error) => {
|
|
8018
8084
|
console.log(error);
|
|
8085
|
+
Swal.fire(errorMessageType(error), this.translatePipe.transform(''), 'error');
|
|
8019
8086
|
});
|
|
8020
8087
|
}
|
|
8021
8088
|
getAllRules(EntityTypeId) {
|
|
@@ -9408,6 +9475,7 @@ class DynamicDetailsViewComponent {
|
|
|
9408
9475
|
this.EntityTypeDetail = res;
|
|
9409
9476
|
}, (error) => {
|
|
9410
9477
|
console.log(error);
|
|
9478
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
9411
9479
|
});
|
|
9412
9480
|
}
|
|
9413
9481
|
saveDesignForm() {
|
|
@@ -9438,6 +9506,7 @@ class DynamicDetailsViewComponent {
|
|
|
9438
9506
|
// this._PageForm.form = this.getFieldFormGroup();
|
|
9439
9507
|
}, (error) => {
|
|
9440
9508
|
console.log(error);
|
|
9509
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
9441
9510
|
});
|
|
9442
9511
|
}
|
|
9443
9512
|
getEntityForm() {
|
|
@@ -9468,6 +9537,7 @@ class DynamicDetailsViewComponent {
|
|
|
9468
9537
|
}
|
|
9469
9538
|
}, (error) => {
|
|
9470
9539
|
console.log(error);
|
|
9540
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
9471
9541
|
});
|
|
9472
9542
|
}
|
|
9473
9543
|
addRow() {
|
|
@@ -9675,6 +9745,7 @@ class DynamicDetailsViewComponent {
|
|
|
9675
9745
|
}
|
|
9676
9746
|
}, (error) => {
|
|
9677
9747
|
console.log(error);
|
|
9748
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
9678
9749
|
});
|
|
9679
9750
|
}
|
|
9680
9751
|
getFieldFormValue(field) {
|
|
@@ -9765,6 +9836,7 @@ class ActivitiesCreateComponent {
|
|
|
9765
9836
|
this.EntityFormId = res.RecId;
|
|
9766
9837
|
}, (error) => {
|
|
9767
9838
|
console.log(error);
|
|
9839
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
9768
9840
|
});
|
|
9769
9841
|
}
|
|
9770
9842
|
closeCreatePage() {
|
|
@@ -9812,6 +9884,7 @@ class ActivitiesCreateComponent {
|
|
|
9812
9884
|
this.closeActivityCreate.emit({ Type: "Create" });
|
|
9813
9885
|
}, (error) => {
|
|
9814
9886
|
console.log(error);
|
|
9887
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
9815
9888
|
});
|
|
9816
9889
|
}
|
|
9817
9890
|
emitTicketCreateForm(CreateData, pageForm) {
|
|
@@ -9862,6 +9935,7 @@ class ActivitiesViewComponent {
|
|
|
9862
9935
|
this.EntityFormId = res.RecId;
|
|
9863
9936
|
}, (error) => {
|
|
9864
9937
|
console.log(error);
|
|
9938
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
9865
9939
|
});
|
|
9866
9940
|
}
|
|
9867
9941
|
emitTicketCreateForm(CreateData, pageForm) {
|
|
@@ -10005,9 +10079,7 @@ class SelfServiceFlowComponent {
|
|
|
10005
10079
|
});
|
|
10006
10080
|
}, (error) => {
|
|
10007
10081
|
console.log(error);
|
|
10008
|
-
Swal.fire(
|
|
10009
|
-
title: this.translatePipe.transform(error.error),
|
|
10010
|
-
});
|
|
10082
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
10011
10083
|
});
|
|
10012
10084
|
}
|
|
10013
10085
|
selectCase(item) {
|
|
@@ -10324,6 +10396,7 @@ class WorkflowDynamicPopupComponent {
|
|
|
10324
10396
|
this.EntityFormId = res.RecId;
|
|
10325
10397
|
}, (error) => {
|
|
10326
10398
|
console.log(error);
|
|
10399
|
+
Swal.fire(errorMessageType(error), "", 'error');
|
|
10327
10400
|
});
|
|
10328
10401
|
}
|
|
10329
10402
|
}
|