arco-support-request 0.0.57 → 0.0.58

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.
@@ -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();
@@ -8005,7 +8050,7 @@
8005
8050
  }
8006
8051
  };
8007
8052
  EntityDynamicFieldComponent.prototype.generateDropDownFields = function () {
8008
- var e_1, _a;
8053
+ var e_1, _b;
8009
8054
  var _this = this;
8010
8055
  var _loop_1 = function (iterator) {
8011
8056
  if (iterator.DataType == E_DataType.dropdown) {
@@ -8015,11 +8060,16 @@
8015
8060
  if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
8016
8061
  var url = jsonItem.api.url;
8017
8062
  _this.entityTypeSetup.getDyamicUrl(url).subscribe(function (ress) {
8063
+ var _a;
8018
8064
  var res = ress;
8019
- if (ress.entities)
8065
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.entities))
8020
8066
  res = ress.entities;
8021
- if (ress.Data)
8067
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data))
8022
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;
8023
8073
  if (res && Array.isArray(res) && res.length > 0) {
8024
8074
  obx.next(res.map(function (x) { return Object.assign({
8025
8075
  Id: x[jsonItem.api.valueField],
@@ -8055,15 +8105,15 @@
8055
8105
  };
8056
8106
  var this_1 = this;
8057
8107
  try {
8058
- for (var _b = __values(this.fieldsList), _c = _b.next(); !_c.done; _c = _b.next()) {
8059
- var iterator = _c.value;
8108
+ for (var _c = __values(this.fieldsList), _d = _c.next(); !_d.done; _d = _c.next()) {
8109
+ var iterator = _d.value;
8060
8110
  _loop_1(iterator);
8061
8111
  }
8062
8112
  }
8063
8113
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
8064
8114
  finally {
8065
8115
  try {
8066
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
8116
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
8067
8117
  }
8068
8118
  finally { if (e_1) throw e_1.error; }
8069
8119
  }
@@ -8196,13 +8246,16 @@
8196
8246
  }
8197
8247
  _this.entityTypeSetup.dynamicAPi(jsonItem.rest, _formvalue_1, searchCriteria, SearchText, restData_1.Havecriteria)
8198
8248
  .subscribe(function (ress) {
8249
+ var _a;
8199
8250
  var res = ress;
8200
- if (ress.entities)
8251
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.entities))
8201
8252
  res = ress.entities;
8202
- if (ress.Data)
8253
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data))
8203
8254
  res = ress.Data;
8204
- if (ress.templates)
8255
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.templates))
8205
8256
  res = ress.templates;
8257
+ 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))
8258
+ res = ress.Data.Data;
8206
8259
  if (RequestorField) {
8207
8260
  var _Sitem = res.filter(function (x) { return x[restData_1.valueField] == _this.RequestorFieldValue; });
8208
8261
  _this.fieldsList.map(function (x) {
@@ -8227,11 +8280,16 @@
8227
8280
  else if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
8228
8281
  var url = jsonItem.api.url;
8229
8282
  _this.entityTypeSetup.getDyamicUrl(url).subscribe(function (ress) {
8283
+ var _a;
8230
8284
  var res = ress;
8231
- if (ress.entities)
8285
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.entities))
8232
8286
  res = ress.entities;
8233
- if (ress.Data)
8287
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data))
8234
8288
  res = ress.Data;
8289
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.templates))
8290
+ res = ress.templates;
8291
+ 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))
8292
+ res = ress.Data.Data;
8235
8293
  if (res && Array.isArray(res) && res.length > 0) {
8236
8294
  obx.next(res.map(function (x) { return Object.assign({
8237
8295
  Id: x[jsonItem.api.valueField],
@@ -8496,11 +8554,16 @@
8496
8554
  _this.entityTypeSetup
8497
8555
  .dynamicAPi(jsonItem.rest, _formvalue_2)
8498
8556
  .subscribe(function (ress) {
8557
+ var _a;
8499
8558
  var res = ress;
8500
- if (ress.entities)
8559
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.entities))
8501
8560
  res = ress.entities;
8502
- if (ress.Data)
8561
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data))
8503
8562
  res = ress.Data;
8563
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.templates))
8564
+ res = ress.templates;
8565
+ 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))
8566
+ res = ress.Data.Data;
8504
8567
  if (res && Array.isArray(res) && res.length > 0) {
8505
8568
  obx.next(res.map(function (x) { return Object.assign({
8506
8569
  Id: x[jsonItem.rest.valueField],
@@ -8521,11 +8584,16 @@
8521
8584
  else if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
8522
8585
  var url = jsonItem.api.url;
8523
8586
  _this.entityTypeSetup.getDyamicUrl(url).subscribe(function (ress) {
8587
+ var _a;
8524
8588
  var res = ress;
8525
- if (ress.entities)
8589
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.entities))
8526
8590
  res = ress.entities;
8527
- if (ress.Data)
8591
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data))
8528
8592
  res = ress.Data;
8593
+ if (ress && (ress === null || ress === void 0 ? void 0 : ress.templates))
8594
+ res = ress.templates;
8595
+ 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))
8596
+ res = ress.Data.Data;
8529
8597
  if (res && Array.isArray(res) && res.length > 0) {
8530
8598
  obx.next(res.map(function (x) { return Object.assign({
8531
8599
  Id: x[jsonItem.api.valueField],
@@ -8616,10 +8684,10 @@
8616
8684
  this.getShortCodeCannedResponse(item);
8617
8685
  };
8618
8686
  EntityDynamicFieldComponent.prototype.getListFieldData = function () {
8619
- var e_2, _a;
8687
+ var e_2, _b;
8620
8688
  try {
8621
- for (var _b = __values(this.fieldsList), _c = _b.next(); !_c.done; _c = _b.next()) {
8622
- var field = _c.value;
8689
+ for (var _c = __values(this.fieldsList), _d = _c.next(); !_d.done; _d = _c.next()) {
8690
+ var field = _d.value;
8623
8691
  if (field.DataType == E_DataType.List) {
8624
8692
  this.FiedlListData$[field.Description] = [];
8625
8693
  var fieldVal = this.pageForm.form && this.pageForm.form.get(field.Description).value;
@@ -8635,7 +8703,7 @@
8635
8703
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
8636
8704
  finally {
8637
8705
  try {
8638
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
8706
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
8639
8707
  }
8640
8708
  finally { if (e_2) throw e_2.error; }
8641
8709
  }