arco-support-request 0.0.56 → 0.0.59
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 +344 -43
- 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/handlebar-helper-register.js +182 -0
- package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.js +105 -23
- package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.js +3 -12
- package/esm2015/lib/entity-type-setup/service/entity-type-setup.service.js +46 -1
- package/esm2015/lib/templates/interface_enum/common-Interface.js +1 -1
- package/fesm2015/arco-support-request.js +332 -33
- package/fesm2015/arco-support-request.js.map +1 -1
- package/lib/core/handlebar-helper-register.d.ts +1 -0
- package/lib/entity-type-setup/service/entity-type-setup.service.d.ts +1 -0
- package/lib/templates/interface_enum/common-Interface.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2844,6 +2844,7 @@
|
|
|
2844
2844
|
var params = this.setparameter(restData.QueryStrings, FormValues, SearchText, isHavecriteria);
|
|
2845
2845
|
var parameter = this.getArraycolumn(params);
|
|
2846
2846
|
var _url = restData.URL + parameter;
|
|
2847
|
+
// searchCriteria = this.setCriteriaField(restData.QueryStrings,FormValues,searchCriteria)
|
|
2847
2848
|
switch (restData.Method) {
|
|
2848
2849
|
case 'GET': {
|
|
2849
2850
|
return this.http.get(_url, {
|
|
@@ -2876,6 +2877,7 @@
|
|
|
2876
2877
|
Name: element.Name,
|
|
2877
2878
|
Value: FormValues[element.Value],
|
|
2878
2879
|
};
|
|
2880
|
+
// if(!element.IsCriteriaField)
|
|
2879
2881
|
params.push(temp);
|
|
2880
2882
|
}
|
|
2881
2883
|
else if (element.Type == 'SearchValue') {
|
|
@@ -2919,6 +2921,49 @@
|
|
|
2919
2921
|
var url = EntityTypeSetUp.getAllEntityTypeSetup();
|
|
2920
2922
|
return this.http.get(url);
|
|
2921
2923
|
};
|
|
2924
|
+
EntityTypeSetupService.prototype.setCriteriaField = function (parameters, FormValues, searchCriteria) {
|
|
2925
|
+
var criteria = null;
|
|
2926
|
+
parameters.forEach(function (element) {
|
|
2927
|
+
if (element.IsCriteriaField && element.Type != 'SearchValue') {
|
|
2928
|
+
debugger;
|
|
2929
|
+
if (searchCriteria && searchCriteria.Where) {
|
|
2930
|
+
var filterobj = {
|
|
2931
|
+
Field: element.Name,
|
|
2932
|
+
Operator: 'Contains',
|
|
2933
|
+
TableAlias: '',
|
|
2934
|
+
Value: FormValues[element.Value],
|
|
2935
|
+
};
|
|
2936
|
+
if (filterobj.Value)
|
|
2937
|
+
searchCriteria.Where.push(filterobj);
|
|
2938
|
+
criteria = searchCriteria;
|
|
2939
|
+
}
|
|
2940
|
+
else {
|
|
2941
|
+
if (!searchCriteria) {
|
|
2942
|
+
var SortingField = { field: null, direction: null };
|
|
2943
|
+
searchCriteria = {
|
|
2944
|
+
Pagging: {
|
|
2945
|
+
PageNo: 1,
|
|
2946
|
+
PageSize: 100,
|
|
2947
|
+
},
|
|
2948
|
+
Where: [],
|
|
2949
|
+
SortOrder: SortingField,
|
|
2950
|
+
};
|
|
2951
|
+
}
|
|
2952
|
+
searchCriteria.Where = [];
|
|
2953
|
+
var filterobj = {
|
|
2954
|
+
Field: element.Name,
|
|
2955
|
+
Operator: 'Contains',
|
|
2956
|
+
TableAlias: '',
|
|
2957
|
+
Value: FormValues[element.Value],
|
|
2958
|
+
};
|
|
2959
|
+
if (filterobj.Value)
|
|
2960
|
+
searchCriteria.Where.push(filterobj);
|
|
2961
|
+
criteria = searchCriteria;
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
});
|
|
2965
|
+
return criteria;
|
|
2966
|
+
};
|
|
2922
2967
|
// ------------------ Favorites --------------
|
|
2923
2968
|
EntityTypeSetupService.prototype.favoriteAndRecent = function () {
|
|
2924
2969
|
var url = Favorites.favoriteandrecent();
|
|
@@ -6661,7 +6706,190 @@
|
|
|
6661
6706
|
return true;
|
|
6662
6707
|
}
|
|
6663
6708
|
|
|
6664
|
-
|
|
6709
|
+
function registerHandlebarHelperMethods(handlebars) {
|
|
6710
|
+
handlebars.registerHelper('isNotNullAndNotUndefined', function (value) {
|
|
6711
|
+
if (value == null || value == undefined)
|
|
6712
|
+
return false;
|
|
6713
|
+
else
|
|
6714
|
+
return true;
|
|
6715
|
+
});
|
|
6716
|
+
handlebars.registerHelper('MoneyPipe', function (value, prefix, count) {
|
|
6717
|
+
if (prefix === void 0) { prefix = '$'; }
|
|
6718
|
+
if (count === void 0) { count = 2; }
|
|
6719
|
+
if (isNaN(parseFloat(value))) {
|
|
6720
|
+
return null;
|
|
6721
|
+
}
|
|
6722
|
+
else
|
|
6723
|
+
return "" + prefix + parseFloat(value).toFixed(count); // $2312.00
|
|
6724
|
+
});
|
|
6725
|
+
handlebars.registerHelper('BoolPile', function (value) {
|
|
6726
|
+
return value == true ? "YES" : "NO";
|
|
6727
|
+
});
|
|
6728
|
+
handlebars.registerHelper('NillPipe', function (value, cond) {
|
|
6729
|
+
if (value) {
|
|
6730
|
+
return value;
|
|
6731
|
+
}
|
|
6732
|
+
else {
|
|
6733
|
+
if (cond == "0") {
|
|
6734
|
+
return "0";
|
|
6735
|
+
}
|
|
6736
|
+
else
|
|
6737
|
+
return "NIL";
|
|
6738
|
+
}
|
|
6739
|
+
});
|
|
6740
|
+
/* #region Date */
|
|
6741
|
+
handlebars.registerHelper('TodayDatePipe', function (formate) {
|
|
6742
|
+
var date = new Date();
|
|
6743
|
+
switch (formate) {
|
|
6744
|
+
case "DATE":
|
|
6745
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6746
|
+
case "DATE_TIME":
|
|
6747
|
+
return new Date(date).toLocaleString(); // "11/3/2020, 11:09:23 AM"
|
|
6748
|
+
case "DATE_TIME_FULL":
|
|
6749
|
+
return new Date(date).toString(); // "Tue Nov 03 2020 11:09:10 GMT+0530 (India Standard Time)"
|
|
6750
|
+
case "TIME":
|
|
6751
|
+
return new Date(date).toLocaleTimeString(); // "11:15:39 AM"
|
|
6752
|
+
case "TIME_FULL":
|
|
6753
|
+
return new Date(date).toTimeString(); // "11:15:26 GMT+0530 (India Standard Time)"
|
|
6754
|
+
default:
|
|
6755
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6756
|
+
}
|
|
6757
|
+
});
|
|
6758
|
+
handlebars.registerHelper('DatePipe', function (date, formate) {
|
|
6759
|
+
if (date) {
|
|
6760
|
+
switch (formate) {
|
|
6761
|
+
case "DATE":
|
|
6762
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6763
|
+
case "DATE_TIME":
|
|
6764
|
+
return new Date(date).toLocaleString(); // "11/3/2020, 11:09:23 AM"
|
|
6765
|
+
case "DATE_TIME_FULL":
|
|
6766
|
+
return new Date(date).toString(); // "Tue Nov 03 2020 11:09:10 GMT+0530 (India Standard Time)"
|
|
6767
|
+
case "TIME":
|
|
6768
|
+
return new Date(date).toLocaleTimeString(); // "11:15:39 AM"
|
|
6769
|
+
case "TIME_FULL":
|
|
6770
|
+
return new Date(date).toTimeString(); // "11:15:26 GMT+0530 (India Standard Time)"
|
|
6771
|
+
default:
|
|
6772
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6773
|
+
}
|
|
6774
|
+
}
|
|
6775
|
+
else {
|
|
6776
|
+
return date;
|
|
6777
|
+
}
|
|
6778
|
+
});
|
|
6779
|
+
handlebars.registerHelper('AddtionalDatePipe', function (curdate, day, formate) {
|
|
6780
|
+
if (curdate && day) {
|
|
6781
|
+
var date = new Date(curdate);
|
|
6782
|
+
date.setDate(date.getDate() + parseInt(day));
|
|
6783
|
+
if (formate) {
|
|
6784
|
+
switch (formate) {
|
|
6785
|
+
case "DATE":
|
|
6786
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6787
|
+
case "DATE_TIME":
|
|
6788
|
+
return new Date(date).toLocaleString(); // "11/3/2020, 11:09:23 AM"
|
|
6789
|
+
case "DATE_TIME_FULL":
|
|
6790
|
+
return new Date(date).toString(); // "Tue Nov 03 2020 11:09:10 GMT+0530 (India Standard Time)"
|
|
6791
|
+
case "TIME":
|
|
6792
|
+
return new Date(date).toLocaleTimeString(); // "11:15:39 AM"
|
|
6793
|
+
case "TIME_FULL":
|
|
6794
|
+
return new Date(date).toTimeString(); // "11:15:26 GMT+0530 (India Standard Time)"
|
|
6795
|
+
default:
|
|
6796
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6797
|
+
}
|
|
6798
|
+
}
|
|
6799
|
+
else {
|
|
6800
|
+
return date;
|
|
6801
|
+
}
|
|
6802
|
+
}
|
|
6803
|
+
else {
|
|
6804
|
+
return date;
|
|
6805
|
+
}
|
|
6806
|
+
});
|
|
6807
|
+
handlebars.registerHelper('SubDatePipe', function (curdate, day, formate) {
|
|
6808
|
+
if (curdate && day) {
|
|
6809
|
+
var date = new Date(curdate);
|
|
6810
|
+
date.setDate(date.getDate() - parseInt(day));
|
|
6811
|
+
if (formate) {
|
|
6812
|
+
switch (formate) {
|
|
6813
|
+
case "DATE":
|
|
6814
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6815
|
+
case "DATE_TIME":
|
|
6816
|
+
return new Date(date).toLocaleString(); // "11/3/2020, 11:09:23 AM"
|
|
6817
|
+
case "DATE_TIME_FULL":
|
|
6818
|
+
return new Date(date).toString(); // "Tue Nov 03 2020 11:09:10 GMT+0530 (India Standard Time)"
|
|
6819
|
+
case "TIME":
|
|
6820
|
+
return new Date(date).toLocaleTimeString(); // "11:15:39 AM"
|
|
6821
|
+
case "TIME_FULL":
|
|
6822
|
+
return new Date(date).toTimeString(); // "11:15:26 GMT+0530 (India Standard Time)"
|
|
6823
|
+
default:
|
|
6824
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6825
|
+
}
|
|
6826
|
+
}
|
|
6827
|
+
else {
|
|
6828
|
+
return date;
|
|
6829
|
+
}
|
|
6830
|
+
}
|
|
6831
|
+
else {
|
|
6832
|
+
return date;
|
|
6833
|
+
}
|
|
6834
|
+
});
|
|
6835
|
+
/* #endregion */
|
|
6836
|
+
/* #region Arithmetic */
|
|
6837
|
+
handlebars.registerHelper('Addition', function (value, value2) {
|
|
6838
|
+
var val = value + value2;
|
|
6839
|
+
return val;
|
|
6840
|
+
});
|
|
6841
|
+
handlebars.registerHelper('Subtraction', function (value, value2) {
|
|
6842
|
+
var val = value - value2;
|
|
6843
|
+
return val;
|
|
6844
|
+
});
|
|
6845
|
+
handlebars.registerHelper('Multiplication', function (value, value2) {
|
|
6846
|
+
if (isNaN(value) && isNaN(value2)) {
|
|
6847
|
+
var val = value * value2;
|
|
6848
|
+
return val;
|
|
6849
|
+
}
|
|
6850
|
+
else {
|
|
6851
|
+
return "";
|
|
6852
|
+
}
|
|
6853
|
+
});
|
|
6854
|
+
handlebars.registerHelper('Division', function (value, value2) {
|
|
6855
|
+
if (isNaN(value) && isNaN(value2)) {
|
|
6856
|
+
var val = value / value2;
|
|
6857
|
+
return val;
|
|
6858
|
+
}
|
|
6859
|
+
else {
|
|
6860
|
+
return "";
|
|
6861
|
+
}
|
|
6862
|
+
});
|
|
6863
|
+
handlebars.registerHelper('Remainder', function (value, value2) {
|
|
6864
|
+
if (isNaN(value) && isNaN(value2)) {
|
|
6865
|
+
var val = value % value2;
|
|
6866
|
+
return val;
|
|
6867
|
+
}
|
|
6868
|
+
else {
|
|
6869
|
+
return "";
|
|
6870
|
+
}
|
|
6871
|
+
});
|
|
6872
|
+
handlebars.registerHelper('lengthGreaterThen0', function (value) {
|
|
6873
|
+
if (value && Array.isArray(value) && value.length > 0)
|
|
6874
|
+
return true;
|
|
6875
|
+
else
|
|
6876
|
+
return false;
|
|
6877
|
+
});
|
|
6878
|
+
handlebars.registerHelper('isNullOrUndefined', function (value) {
|
|
6879
|
+
if (value == null || value == undefined)
|
|
6880
|
+
return true;
|
|
6881
|
+
else
|
|
6882
|
+
return false;
|
|
6883
|
+
});
|
|
6884
|
+
handlebars.registerHelper('isEqual', function (value, value2) {
|
|
6885
|
+
return value == value2 ? true : false;
|
|
6886
|
+
});
|
|
6887
|
+
/* #endregion */
|
|
6888
|
+
handlebars.registerHelper('SetFieldByLang', function (Lang, value, value2) {
|
|
6889
|
+
return Lang == "Ar" ? value2 : value;
|
|
6890
|
+
});
|
|
6891
|
+
}
|
|
6892
|
+
|
|
6665
6893
|
var EntityDynamicViewComponent = /** @class */ (function () {
|
|
6666
6894
|
function EntityDynamicViewComponent(entityTypeSetup, router, fb, route, globalService) {
|
|
6667
6895
|
this.entityTypeSetup = entityTypeSetup;
|
|
@@ -6695,9 +6923,8 @@
|
|
|
6695
6923
|
this.translatePipe = new TranslatePipe(this.globalService);
|
|
6696
6924
|
}
|
|
6697
6925
|
EntityDynamicViewComponent.prototype.ngOnInit = function () {
|
|
6698
|
-
debugger;
|
|
6699
6926
|
this._handlebars = handlebars__namespace;
|
|
6700
|
-
|
|
6927
|
+
registerHandlebarHelperMethods(this._handlebars);
|
|
6701
6928
|
this.getEntityForm();
|
|
6702
6929
|
};
|
|
6703
6930
|
EntityDynamicViewComponent.prototype.closePopup = function () {
|
|
@@ -7336,9 +7563,6 @@
|
|
|
7336
7563
|
});
|
|
7337
7564
|
};
|
|
7338
7565
|
EntityDynamicViewComponent.prototype.hanbleBarHtml = function (_code, data) {
|
|
7339
|
-
debugger;
|
|
7340
|
-
// registerHandlebarHelperMethods();
|
|
7341
|
-
// debugger;
|
|
7342
7566
|
if (!data || (typeof data != 'object'))
|
|
7343
7567
|
data = {};
|
|
7344
7568
|
data.Local = localStorage;
|
|
@@ -7487,7 +7711,6 @@
|
|
|
7487
7711
|
ParameterData: [{ type: i0.Input }]
|
|
7488
7712
|
};
|
|
7489
7713
|
function registerHandlebarHelperMethodsNew(handlebarObj) {
|
|
7490
|
-
debugger;
|
|
7491
7714
|
console.log("registerHandlebarHelperMethodsNew");
|
|
7492
7715
|
handlebarObj.registerHelper('isNotNullAndNotUndefined', function (value) {
|
|
7493
7716
|
if (value == null || value == undefined)
|
|
@@ -7539,7 +7762,6 @@
|
|
|
7539
7762
|
}
|
|
7540
7763
|
});
|
|
7541
7764
|
handlebarObj.registerHelper('AddtionalDatePipe', function (curdate, day, formate) {
|
|
7542
|
-
debugger;
|
|
7543
7765
|
if (curdate && day) {
|
|
7544
7766
|
var date = new Date(curdate);
|
|
7545
7767
|
date.setDate(date.getDate() + parseInt(day));
|
|
@@ -7598,7 +7820,6 @@
|
|
|
7598
7820
|
/* #endregion */
|
|
7599
7821
|
/* #region Arithmetic */
|
|
7600
7822
|
handlebarObj.registerHelper('Addition', function (value, value2) {
|
|
7601
|
-
debugger;
|
|
7602
7823
|
var val = value + value2;
|
|
7603
7824
|
return val;
|
|
7604
7825
|
});
|
|
@@ -7646,12 +7867,10 @@
|
|
|
7646
7867
|
return false;
|
|
7647
7868
|
});
|
|
7648
7869
|
handlebarObj.registerHelper('isEqual', function (value, value2) {
|
|
7649
|
-
debugger;
|
|
7650
7870
|
return value == value2 ? true : false;
|
|
7651
7871
|
});
|
|
7652
7872
|
/* #endregion */
|
|
7653
7873
|
handlebarObj.registerHelper('SetFieldByLang', function (Lang, value, value2) {
|
|
7654
|
-
debugger;
|
|
7655
7874
|
return Lang == "Ar" ? value2 : value;
|
|
7656
7875
|
});
|
|
7657
7876
|
}
|
|
@@ -7831,7 +8050,7 @@
|
|
|
7831
8050
|
}
|
|
7832
8051
|
};
|
|
7833
8052
|
EntityDynamicFieldComponent.prototype.generateDropDownFields = function () {
|
|
7834
|
-
var e_1,
|
|
8053
|
+
var e_1, _b;
|
|
7835
8054
|
var _this = this;
|
|
7836
8055
|
var _loop_1 = function (iterator) {
|
|
7837
8056
|
if (iterator.DataType == E_DataType.dropdown) {
|
|
@@ -7841,11 +8060,16 @@
|
|
|
7841
8060
|
if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
|
|
7842
8061
|
var url = jsonItem.api.url;
|
|
7843
8062
|
_this.entityTypeSetup.getDyamicUrl(url).subscribe(function (ress) {
|
|
8063
|
+
var _a;
|
|
7844
8064
|
var res = ress;
|
|
7845
|
-
if (ress.entities)
|
|
8065
|
+
if (ress && (ress === null || ress === void 0 ? void 0 : ress.entities))
|
|
7846
8066
|
res = ress.entities;
|
|
7847
|
-
if (ress.Data)
|
|
8067
|
+
if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data))
|
|
7848
8068
|
res = ress.Data;
|
|
8069
|
+
if (ress && (ress === null || ress === void 0 ? void 0 : ress.templates))
|
|
8070
|
+
res = ress.templates;
|
|
8071
|
+
if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data) && ((_a = ress === null || ress === void 0 ? void 0 : ress.Data) === null || _a === void 0 ? void 0 : _a.Data))
|
|
8072
|
+
res = ress.Data.Data;
|
|
7849
8073
|
if (res && Array.isArray(res) && res.length > 0) {
|
|
7850
8074
|
obx.next(res.map(function (x) { return Object.assign({
|
|
7851
8075
|
Id: x[jsonItem.api.valueField],
|
|
@@ -7881,15 +8105,15 @@
|
|
|
7881
8105
|
};
|
|
7882
8106
|
var this_1 = this;
|
|
7883
8107
|
try {
|
|
7884
|
-
for (var
|
|
7885
|
-
var iterator =
|
|
8108
|
+
for (var _c = __values(this.fieldsList), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
8109
|
+
var iterator = _d.value;
|
|
7886
8110
|
_loop_1(iterator);
|
|
7887
8111
|
}
|
|
7888
8112
|
}
|
|
7889
8113
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
7890
8114
|
finally {
|
|
7891
8115
|
try {
|
|
7892
|
-
if (
|
|
8116
|
+
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
7893
8117
|
}
|
|
7894
8118
|
finally { if (e_1) throw e_1.error; }
|
|
7895
8119
|
}
|
|
@@ -8023,12 +8247,30 @@
|
|
|
8023
8247
|
_this.entityTypeSetup.dynamicAPi(jsonItem.rest, _formvalue_1, searchCriteria, SearchText, restData_1.Havecriteria)
|
|
8024
8248
|
.subscribe(function (ress) {
|
|
8025
8249
|
var res = ress;
|
|
8026
|
-
if (
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8250
|
+
if (restData_1.ResponseView) {
|
|
8251
|
+
var _rview = restData_1.ResponseView.split(".");
|
|
8252
|
+
_rview.forEach(function (x) {
|
|
8253
|
+
if (ress) {
|
|
8254
|
+
ress = ress[x];
|
|
8255
|
+
res = ress;
|
|
8256
|
+
}
|
|
8257
|
+
else
|
|
8258
|
+
res = "";
|
|
8259
|
+
});
|
|
8260
|
+
}
|
|
8261
|
+
else {
|
|
8262
|
+
if (ress.Data) {
|
|
8263
|
+
res = ress.Data;
|
|
8264
|
+
if (res.Data)
|
|
8265
|
+
res = res.Data;
|
|
8266
|
+
}
|
|
8267
|
+
if (ress.content)
|
|
8268
|
+
res = ress.content;
|
|
8269
|
+
if (ress.entities)
|
|
8270
|
+
res = ress.entities;
|
|
8271
|
+
if (ress.templates)
|
|
8272
|
+
res = ress.templates;
|
|
8273
|
+
}
|
|
8032
8274
|
if (RequestorField) {
|
|
8033
8275
|
var _Sitem = res.filter(function (x) { return x[restData_1.valueField] == _this.RequestorFieldValue; });
|
|
8034
8276
|
_this.fieldsList.map(function (x) {
|
|
@@ -8054,10 +8296,30 @@
|
|
|
8054
8296
|
var url = jsonItem.api.url;
|
|
8055
8297
|
_this.entityTypeSetup.getDyamicUrl(url).subscribe(function (ress) {
|
|
8056
8298
|
var res = ress;
|
|
8057
|
-
if (
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8299
|
+
if (jsonItem.api && jsonItem.api.ResponseView) {
|
|
8300
|
+
var _rview = jsonItem.api.ResponseView.split(".");
|
|
8301
|
+
_rview.forEach(function (x) {
|
|
8302
|
+
if (ress) {
|
|
8303
|
+
ress = ress[x];
|
|
8304
|
+
res = ress;
|
|
8305
|
+
}
|
|
8306
|
+
else
|
|
8307
|
+
res = "";
|
|
8308
|
+
});
|
|
8309
|
+
}
|
|
8310
|
+
else {
|
|
8311
|
+
if (ress.Data) {
|
|
8312
|
+
res = ress.Data;
|
|
8313
|
+
if (res.Data)
|
|
8314
|
+
res = res.Data;
|
|
8315
|
+
}
|
|
8316
|
+
if (ress.content)
|
|
8317
|
+
res = ress.content;
|
|
8318
|
+
if (ress.entities)
|
|
8319
|
+
res = ress.entities;
|
|
8320
|
+
if (ress.templates)
|
|
8321
|
+
res = ress.templates;
|
|
8322
|
+
}
|
|
8061
8323
|
if (res && Array.isArray(res) && res.length > 0) {
|
|
8062
8324
|
obx.next(res.map(function (x) { return Object.assign({
|
|
8063
8325
|
Id: x[jsonItem.api.valueField],
|
|
@@ -8303,8 +8565,8 @@
|
|
|
8303
8565
|
if (jsonItem.isDynamic && jsonItem.rest && jsonItem.rest.URL) {
|
|
8304
8566
|
var isDepandancyvalue_2 = true;
|
|
8305
8567
|
var _formvalue_2 = _this.pageForm.form.value;
|
|
8306
|
-
var
|
|
8307
|
-
|
|
8568
|
+
var restData_2 = jsonItem.rest;
|
|
8569
|
+
restData_2.QueryStrings.forEach(function (query) {
|
|
8308
8570
|
if (query.Type == 'FieldValue') {
|
|
8309
8571
|
if (!_formvalue_2[query.Value]) {
|
|
8310
8572
|
// Swal.fire('please fill ' + query.Value, 'warning');
|
|
@@ -8319,14 +8581,33 @@
|
|
|
8319
8581
|
if (!isDepandancyvalue_2) {
|
|
8320
8582
|
return;
|
|
8321
8583
|
}
|
|
8322
|
-
_this.entityTypeSetup
|
|
8323
|
-
.dynamicAPi(jsonItem.rest, _formvalue_2)
|
|
8584
|
+
_this.entityTypeSetup.dynamicAPi(jsonItem.rest, _formvalue_2)
|
|
8324
8585
|
.subscribe(function (ress) {
|
|
8325
8586
|
var res = ress;
|
|
8326
|
-
if (
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8587
|
+
if (restData_2.ResponseView) {
|
|
8588
|
+
var _rview = restData_2.ResponseView.split(".");
|
|
8589
|
+
_rview.forEach(function (x) {
|
|
8590
|
+
if (ress) {
|
|
8591
|
+
ress = ress[x];
|
|
8592
|
+
res = ress;
|
|
8593
|
+
}
|
|
8594
|
+
else
|
|
8595
|
+
res = "";
|
|
8596
|
+
});
|
|
8597
|
+
}
|
|
8598
|
+
else {
|
|
8599
|
+
if (ress.Data) {
|
|
8600
|
+
res = ress.Data;
|
|
8601
|
+
if (res.Data)
|
|
8602
|
+
res = res.Data;
|
|
8603
|
+
}
|
|
8604
|
+
if (ress.content)
|
|
8605
|
+
res = ress.content;
|
|
8606
|
+
if (ress.entities)
|
|
8607
|
+
res = ress.entities;
|
|
8608
|
+
if (ress.templates)
|
|
8609
|
+
res = ress.templates;
|
|
8610
|
+
}
|
|
8330
8611
|
if (res && Array.isArray(res) && res.length > 0) {
|
|
8331
8612
|
obx.next(res.map(function (x) { return Object.assign({
|
|
8332
8613
|
Id: x[jsonItem.rest.valueField],
|
|
@@ -8348,10 +8629,30 @@
|
|
|
8348
8629
|
var url = jsonItem.api.url;
|
|
8349
8630
|
_this.entityTypeSetup.getDyamicUrl(url).subscribe(function (ress) {
|
|
8350
8631
|
var res = ress;
|
|
8351
|
-
if (
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
|
|
8632
|
+
if (jsonItem.api && jsonItem.api.ResponseView) {
|
|
8633
|
+
var _rview = jsonItem.api.ResponseView.split(".");
|
|
8634
|
+
_rview.forEach(function (x) {
|
|
8635
|
+
if (ress) {
|
|
8636
|
+
ress = ress[x];
|
|
8637
|
+
res = ress;
|
|
8638
|
+
}
|
|
8639
|
+
else
|
|
8640
|
+
res = "";
|
|
8641
|
+
});
|
|
8642
|
+
}
|
|
8643
|
+
else {
|
|
8644
|
+
if (ress.Data) {
|
|
8645
|
+
res = ress.Data;
|
|
8646
|
+
if (res.Data)
|
|
8647
|
+
res = res.Data;
|
|
8648
|
+
}
|
|
8649
|
+
if (ress.content)
|
|
8650
|
+
res = ress.content;
|
|
8651
|
+
if (ress.entities)
|
|
8652
|
+
res = ress.entities;
|
|
8653
|
+
if (ress.templates)
|
|
8654
|
+
res = ress.templates;
|
|
8655
|
+
}
|
|
8355
8656
|
if (res && Array.isArray(res) && res.length > 0) {
|
|
8356
8657
|
obx.next(res.map(function (x) { return Object.assign({
|
|
8357
8658
|
Id: x[jsonItem.api.valueField],
|
|
@@ -8442,10 +8743,10 @@
|
|
|
8442
8743
|
this.getShortCodeCannedResponse(item);
|
|
8443
8744
|
};
|
|
8444
8745
|
EntityDynamicFieldComponent.prototype.getListFieldData = function () {
|
|
8445
|
-
var e_2,
|
|
8746
|
+
var e_2, _b;
|
|
8446
8747
|
try {
|
|
8447
|
-
for (var
|
|
8448
|
-
var field =
|
|
8748
|
+
for (var _c = __values(this.fieldsList), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
8749
|
+
var field = _d.value;
|
|
8449
8750
|
if (field.DataType == E_DataType.List) {
|
|
8450
8751
|
this.FiedlListData$[field.Description] = [];
|
|
8451
8752
|
var fieldVal = this.pageForm.form && this.pageForm.form.get(field.Description).value;
|
|
@@ -8461,7 +8762,7 @@
|
|
|
8461
8762
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
8462
8763
|
finally {
|
|
8463
8764
|
try {
|
|
8464
|
-
if (
|
|
8765
|
+
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
8465
8766
|
}
|
|
8466
8767
|
finally { if (e_2) throw e_2.error; }
|
|
8467
8768
|
}
|