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
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLUludGVyZmFjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FyY28tc3VwcG9ydC1yZXF1ZXN0L3NyYy9saWIvdGVtcGxhdGVzL2ludGVyZmFjZV9lbnVtL2NvbW1vbi1JbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XHJcbiAgRV9BY3Rpb25UeXBlLFxyXG4gIEVfRGF0YVR5cGUsXHJcbiAgRV9GaWVsZFR5cGUsXHJcbiAgRV9Gb3JtU3RhdHVz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amVjdE5hbWU/OnN0cmluZztcclxuXHJcbn1cclxuXHJcbmV4cG9ydCBpbnRlcmZhY2UgSU5hbWVWYWwge1xyXG4gIE5hbWU6IHN0cmluZztcclxuICBWYWx1ZTogc3RyaW5nO1xyXG59XHJcbmV4cG9ydCBpbnRlcmZhY2UgSU5hbWVUeXBlVmFsIHtcclxuICBOYW1lOiBzdHJpbmc7XHJcbiAgVHlwZT86IHN0cmluZztcclxuICBWYWx1ZTogc3RyaW5nO1xyXG4gIElzTnVsbGFibGU/OmJvb2xlYW47XHJcbiAgSXNDcml0ZXJpYUZpZWxkPzpib29sZWFuO1xyXG59XHJcbiJdfQ==
|
|
@@ -2492,6 +2492,7 @@ class EntityTypeSetupService {
|
|
|
2492
2492
|
let params = this.setparameter(restData.QueryStrings, FormValues, SearchText, isHavecriteria);
|
|
2493
2493
|
let parameter = this.getArraycolumn(params);
|
|
2494
2494
|
let _url = restData.URL + parameter;
|
|
2495
|
+
// searchCriteria = this.setCriteriaField(restData.QueryStrings,FormValues,searchCriteria)
|
|
2495
2496
|
switch (restData.Method) {
|
|
2496
2497
|
case 'GET': {
|
|
2497
2498
|
return this.http.get(_url, {
|
|
@@ -2524,6 +2525,7 @@ class EntityTypeSetupService {
|
|
|
2524
2525
|
Name: element.Name,
|
|
2525
2526
|
Value: FormValues[element.Value],
|
|
2526
2527
|
};
|
|
2528
|
+
// if(!element.IsCriteriaField)
|
|
2527
2529
|
params.push(temp);
|
|
2528
2530
|
}
|
|
2529
2531
|
else if (element.Type == 'SearchValue') {
|
|
@@ -2566,6 +2568,49 @@ class EntityTypeSetupService {
|
|
|
2566
2568
|
const url = EntityTypeSetUp.getAllEntityTypeSetup();
|
|
2567
2569
|
return this.http.get(url);
|
|
2568
2570
|
}
|
|
2571
|
+
setCriteriaField(parameters, FormValues, searchCriteria) {
|
|
2572
|
+
let criteria = null;
|
|
2573
|
+
parameters.forEach((element) => {
|
|
2574
|
+
if (element.IsCriteriaField && element.Type != 'SearchValue') {
|
|
2575
|
+
debugger;
|
|
2576
|
+
if (searchCriteria && searchCriteria.Where) {
|
|
2577
|
+
let filterobj = {
|
|
2578
|
+
Field: element.Name,
|
|
2579
|
+
Operator: 'Contains',
|
|
2580
|
+
TableAlias: '',
|
|
2581
|
+
Value: FormValues[element.Value],
|
|
2582
|
+
};
|
|
2583
|
+
if (filterobj.Value)
|
|
2584
|
+
searchCriteria.Where.push(filterobj);
|
|
2585
|
+
criteria = searchCriteria;
|
|
2586
|
+
}
|
|
2587
|
+
else {
|
|
2588
|
+
if (!searchCriteria) {
|
|
2589
|
+
let SortingField = { field: null, direction: null };
|
|
2590
|
+
searchCriteria = {
|
|
2591
|
+
Pagging: {
|
|
2592
|
+
PageNo: 1,
|
|
2593
|
+
PageSize: 100,
|
|
2594
|
+
},
|
|
2595
|
+
Where: [],
|
|
2596
|
+
SortOrder: SortingField,
|
|
2597
|
+
};
|
|
2598
|
+
}
|
|
2599
|
+
searchCriteria.Where = [];
|
|
2600
|
+
let filterobj = {
|
|
2601
|
+
Field: element.Name,
|
|
2602
|
+
Operator: 'Contains',
|
|
2603
|
+
TableAlias: '',
|
|
2604
|
+
Value: FormValues[element.Value],
|
|
2605
|
+
};
|
|
2606
|
+
if (filterobj.Value)
|
|
2607
|
+
searchCriteria.Where.push(filterobj);
|
|
2608
|
+
criteria = searchCriteria;
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
});
|
|
2612
|
+
return criteria;
|
|
2613
|
+
}
|
|
2569
2614
|
// ------------------ Favorites --------------
|
|
2570
2615
|
favoriteAndRecent() {
|
|
2571
2616
|
const url = Favorites.favoriteandrecent();
|
|
@@ -6235,7 +6280,188 @@ function isNotNullNotUndefined(value) {
|
|
|
6235
6280
|
return true;
|
|
6236
6281
|
}
|
|
6237
6282
|
|
|
6238
|
-
|
|
6283
|
+
function registerHandlebarHelperMethods(handlebars) {
|
|
6284
|
+
handlebars.registerHelper('isNotNullAndNotUndefined', function (value) {
|
|
6285
|
+
if (value == null || value == undefined)
|
|
6286
|
+
return false;
|
|
6287
|
+
else
|
|
6288
|
+
return true;
|
|
6289
|
+
});
|
|
6290
|
+
handlebars.registerHelper('MoneyPipe', function (value, prefix = '$', count = 2) {
|
|
6291
|
+
if (isNaN(parseFloat(value))) {
|
|
6292
|
+
return null;
|
|
6293
|
+
}
|
|
6294
|
+
else
|
|
6295
|
+
return `${prefix}${parseFloat(value).toFixed(count)}`; // $2312.00
|
|
6296
|
+
});
|
|
6297
|
+
handlebars.registerHelper('BoolPile', function (value) {
|
|
6298
|
+
return value == true ? "YES" : "NO";
|
|
6299
|
+
});
|
|
6300
|
+
handlebars.registerHelper('NillPipe', function (value, cond) {
|
|
6301
|
+
if (value) {
|
|
6302
|
+
return value;
|
|
6303
|
+
}
|
|
6304
|
+
else {
|
|
6305
|
+
if (cond == "0") {
|
|
6306
|
+
return "0";
|
|
6307
|
+
}
|
|
6308
|
+
else
|
|
6309
|
+
return "NIL";
|
|
6310
|
+
}
|
|
6311
|
+
});
|
|
6312
|
+
/* #region Date */
|
|
6313
|
+
handlebars.registerHelper('TodayDatePipe', function (formate) {
|
|
6314
|
+
let date = new Date();
|
|
6315
|
+
switch (formate) {
|
|
6316
|
+
case "DATE":
|
|
6317
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6318
|
+
case "DATE_TIME":
|
|
6319
|
+
return new Date(date).toLocaleString(); // "11/3/2020, 11:09:23 AM"
|
|
6320
|
+
case "DATE_TIME_FULL":
|
|
6321
|
+
return new Date(date).toString(); // "Tue Nov 03 2020 11:09:10 GMT+0530 (India Standard Time)"
|
|
6322
|
+
case "TIME":
|
|
6323
|
+
return new Date(date).toLocaleTimeString(); // "11:15:39 AM"
|
|
6324
|
+
case "TIME_FULL":
|
|
6325
|
+
return new Date(date).toTimeString(); // "11:15:26 GMT+0530 (India Standard Time)"
|
|
6326
|
+
default:
|
|
6327
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6328
|
+
}
|
|
6329
|
+
});
|
|
6330
|
+
handlebars.registerHelper('DatePipe', function (date, formate) {
|
|
6331
|
+
if (date) {
|
|
6332
|
+
switch (formate) {
|
|
6333
|
+
case "DATE":
|
|
6334
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6335
|
+
case "DATE_TIME":
|
|
6336
|
+
return new Date(date).toLocaleString(); // "11/3/2020, 11:09:23 AM"
|
|
6337
|
+
case "DATE_TIME_FULL":
|
|
6338
|
+
return new Date(date).toString(); // "Tue Nov 03 2020 11:09:10 GMT+0530 (India Standard Time)"
|
|
6339
|
+
case "TIME":
|
|
6340
|
+
return new Date(date).toLocaleTimeString(); // "11:15:39 AM"
|
|
6341
|
+
case "TIME_FULL":
|
|
6342
|
+
return new Date(date).toTimeString(); // "11:15:26 GMT+0530 (India Standard Time)"
|
|
6343
|
+
default:
|
|
6344
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6345
|
+
}
|
|
6346
|
+
}
|
|
6347
|
+
else {
|
|
6348
|
+
return date;
|
|
6349
|
+
}
|
|
6350
|
+
});
|
|
6351
|
+
handlebars.registerHelper('AddtionalDatePipe', function (curdate, day, formate) {
|
|
6352
|
+
if (curdate && day) {
|
|
6353
|
+
var date = new Date(curdate);
|
|
6354
|
+
date.setDate(date.getDate() + parseInt(day));
|
|
6355
|
+
if (formate) {
|
|
6356
|
+
switch (formate) {
|
|
6357
|
+
case "DATE":
|
|
6358
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6359
|
+
case "DATE_TIME":
|
|
6360
|
+
return new Date(date).toLocaleString(); // "11/3/2020, 11:09:23 AM"
|
|
6361
|
+
case "DATE_TIME_FULL":
|
|
6362
|
+
return new Date(date).toString(); // "Tue Nov 03 2020 11:09:10 GMT+0530 (India Standard Time)"
|
|
6363
|
+
case "TIME":
|
|
6364
|
+
return new Date(date).toLocaleTimeString(); // "11:15:39 AM"
|
|
6365
|
+
case "TIME_FULL":
|
|
6366
|
+
return new Date(date).toTimeString(); // "11:15:26 GMT+0530 (India Standard Time)"
|
|
6367
|
+
default:
|
|
6368
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6369
|
+
}
|
|
6370
|
+
}
|
|
6371
|
+
else {
|
|
6372
|
+
return date;
|
|
6373
|
+
}
|
|
6374
|
+
}
|
|
6375
|
+
else {
|
|
6376
|
+
return date;
|
|
6377
|
+
}
|
|
6378
|
+
});
|
|
6379
|
+
handlebars.registerHelper('SubDatePipe', function (curdate, day, formate) {
|
|
6380
|
+
if (curdate && day) {
|
|
6381
|
+
var date = new Date(curdate);
|
|
6382
|
+
date.setDate(date.getDate() - parseInt(day));
|
|
6383
|
+
if (formate) {
|
|
6384
|
+
switch (formate) {
|
|
6385
|
+
case "DATE":
|
|
6386
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6387
|
+
case "DATE_TIME":
|
|
6388
|
+
return new Date(date).toLocaleString(); // "11/3/2020, 11:09:23 AM"
|
|
6389
|
+
case "DATE_TIME_FULL":
|
|
6390
|
+
return new Date(date).toString(); // "Tue Nov 03 2020 11:09:10 GMT+0530 (India Standard Time)"
|
|
6391
|
+
case "TIME":
|
|
6392
|
+
return new Date(date).toLocaleTimeString(); // "11:15:39 AM"
|
|
6393
|
+
case "TIME_FULL":
|
|
6394
|
+
return new Date(date).toTimeString(); // "11:15:26 GMT+0530 (India Standard Time)"
|
|
6395
|
+
default:
|
|
6396
|
+
return new Date(date).toLocaleDateString(); // "11/3/2020"
|
|
6397
|
+
}
|
|
6398
|
+
}
|
|
6399
|
+
else {
|
|
6400
|
+
return date;
|
|
6401
|
+
}
|
|
6402
|
+
}
|
|
6403
|
+
else {
|
|
6404
|
+
return date;
|
|
6405
|
+
}
|
|
6406
|
+
});
|
|
6407
|
+
/* #endregion */
|
|
6408
|
+
/* #region Arithmetic */
|
|
6409
|
+
handlebars.registerHelper('Addition', function (value, value2) {
|
|
6410
|
+
let val = value + value2;
|
|
6411
|
+
return val;
|
|
6412
|
+
});
|
|
6413
|
+
handlebars.registerHelper('Subtraction', function (value, value2) {
|
|
6414
|
+
let val = value - value2;
|
|
6415
|
+
return val;
|
|
6416
|
+
});
|
|
6417
|
+
handlebars.registerHelper('Multiplication', function (value, value2) {
|
|
6418
|
+
if (isNaN(value) && isNaN(value2)) {
|
|
6419
|
+
let val = value * value2;
|
|
6420
|
+
return val;
|
|
6421
|
+
}
|
|
6422
|
+
else {
|
|
6423
|
+
return "";
|
|
6424
|
+
}
|
|
6425
|
+
});
|
|
6426
|
+
handlebars.registerHelper('Division', function (value, value2) {
|
|
6427
|
+
if (isNaN(value) && isNaN(value2)) {
|
|
6428
|
+
let val = value / value2;
|
|
6429
|
+
return val;
|
|
6430
|
+
}
|
|
6431
|
+
else {
|
|
6432
|
+
return "";
|
|
6433
|
+
}
|
|
6434
|
+
});
|
|
6435
|
+
handlebars.registerHelper('Remainder', function (value, value2) {
|
|
6436
|
+
if (isNaN(value) && isNaN(value2)) {
|
|
6437
|
+
let val = value % value2;
|
|
6438
|
+
return val;
|
|
6439
|
+
}
|
|
6440
|
+
else {
|
|
6441
|
+
return "";
|
|
6442
|
+
}
|
|
6443
|
+
});
|
|
6444
|
+
handlebars.registerHelper('lengthGreaterThen0', function (value) {
|
|
6445
|
+
if (value && Array.isArray(value) && value.length > 0)
|
|
6446
|
+
return true;
|
|
6447
|
+
else
|
|
6448
|
+
return false;
|
|
6449
|
+
});
|
|
6450
|
+
handlebars.registerHelper('isNullOrUndefined', function (value) {
|
|
6451
|
+
if (value == null || value == undefined)
|
|
6452
|
+
return true;
|
|
6453
|
+
else
|
|
6454
|
+
return false;
|
|
6455
|
+
});
|
|
6456
|
+
handlebars.registerHelper('isEqual', function (value, value2) {
|
|
6457
|
+
return value == value2 ? true : false;
|
|
6458
|
+
});
|
|
6459
|
+
/* #endregion */
|
|
6460
|
+
handlebars.registerHelper('SetFieldByLang', function (Lang, value, value2) {
|
|
6461
|
+
return Lang == "Ar" ? value2 : value;
|
|
6462
|
+
});
|
|
6463
|
+
}
|
|
6464
|
+
|
|
6239
6465
|
class EntityDynamicViewComponent {
|
|
6240
6466
|
constructor(entityTypeSetup, router, fb, route, globalService) {
|
|
6241
6467
|
this.entityTypeSetup = entityTypeSetup;
|
|
@@ -6269,9 +6495,8 @@ class EntityDynamicViewComponent {
|
|
|
6269
6495
|
this.translatePipe = new TranslatePipe(this.globalService);
|
|
6270
6496
|
}
|
|
6271
6497
|
ngOnInit() {
|
|
6272
|
-
debugger;
|
|
6273
6498
|
this._handlebars = handlebars;
|
|
6274
|
-
|
|
6499
|
+
registerHandlebarHelperMethods(this._handlebars);
|
|
6275
6500
|
this.getEntityForm();
|
|
6276
6501
|
}
|
|
6277
6502
|
closePopup() {
|
|
@@ -6877,9 +7102,6 @@ class EntityDynamicViewComponent {
|
|
|
6877
7102
|
});
|
|
6878
7103
|
}
|
|
6879
7104
|
hanbleBarHtml(_code, data) {
|
|
6880
|
-
debugger;
|
|
6881
|
-
// registerHandlebarHelperMethods();
|
|
6882
|
-
// debugger;
|
|
6883
7105
|
if (!data || (typeof data != 'object'))
|
|
6884
7106
|
data = {};
|
|
6885
7107
|
data.Local = localStorage;
|
|
@@ -7023,7 +7245,6 @@ EntityDynamicViewComponent.propDecorators = {
|
|
|
7023
7245
|
ParameterData: [{ type: Input }]
|
|
7024
7246
|
};
|
|
7025
7247
|
function registerHandlebarHelperMethodsNew(handlebarObj) {
|
|
7026
|
-
debugger;
|
|
7027
7248
|
console.log("registerHandlebarHelperMethodsNew");
|
|
7028
7249
|
handlebarObj.registerHelper('isNotNullAndNotUndefined', function (value) {
|
|
7029
7250
|
if (value == null || value == undefined)
|
|
@@ -7073,7 +7294,6 @@ function registerHandlebarHelperMethodsNew(handlebarObj) {
|
|
|
7073
7294
|
}
|
|
7074
7295
|
});
|
|
7075
7296
|
handlebarObj.registerHelper('AddtionalDatePipe', function (curdate, day, formate) {
|
|
7076
|
-
debugger;
|
|
7077
7297
|
if (curdate && day) {
|
|
7078
7298
|
var date = new Date(curdate);
|
|
7079
7299
|
date.setDate(date.getDate() + parseInt(day));
|
|
@@ -7132,7 +7352,6 @@ function registerHandlebarHelperMethodsNew(handlebarObj) {
|
|
|
7132
7352
|
/* #endregion */
|
|
7133
7353
|
/* #region Arithmetic */
|
|
7134
7354
|
handlebarObj.registerHelper('Addition', function (value, value2) {
|
|
7135
|
-
debugger;
|
|
7136
7355
|
let val = value + value2;
|
|
7137
7356
|
return val;
|
|
7138
7357
|
});
|
|
@@ -7180,12 +7399,10 @@ function registerHandlebarHelperMethodsNew(handlebarObj) {
|
|
|
7180
7399
|
return false;
|
|
7181
7400
|
});
|
|
7182
7401
|
handlebarObj.registerHelper('isEqual', function (value, value2) {
|
|
7183
|
-
debugger;
|
|
7184
7402
|
return value == value2 ? true : false;
|
|
7185
7403
|
});
|
|
7186
7404
|
/* #endregion */
|
|
7187
7405
|
handlebarObj.registerHelper('SetFieldByLang', function (Lang, value, value2) {
|
|
7188
|
-
debugger;
|
|
7189
7406
|
return Lang == "Ar" ? value2 : value;
|
|
7190
7407
|
});
|
|
7191
7408
|
}
|
|
@@ -7354,11 +7571,16 @@ class EntityDynamicFieldComponent {
|
|
|
7354
7571
|
if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
|
|
7355
7572
|
const url = jsonItem.api.url;
|
|
7356
7573
|
this.entityTypeSetup.getDyamicUrl(url).subscribe((ress) => {
|
|
7574
|
+
var _a;
|
|
7357
7575
|
let res = ress;
|
|
7358
|
-
if (ress.entities)
|
|
7576
|
+
if (ress && (ress === null || ress === void 0 ? void 0 : ress.entities))
|
|
7359
7577
|
res = ress.entities;
|
|
7360
|
-
if (ress.Data)
|
|
7578
|
+
if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data))
|
|
7361
7579
|
res = ress.Data;
|
|
7580
|
+
if (ress && (ress === null || ress === void 0 ? void 0 : ress.templates))
|
|
7581
|
+
res = ress.templates;
|
|
7582
|
+
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))
|
|
7583
|
+
res = ress.Data.Data;
|
|
7362
7584
|
if (res && Array.isArray(res) && res.length > 0) {
|
|
7363
7585
|
obx.next(res.map((x) => Object.assign({
|
|
7364
7586
|
Id: x[jsonItem.api.valueField],
|
|
@@ -7520,12 +7742,30 @@ class EntityDynamicFieldComponent {
|
|
|
7520
7742
|
this.entityTypeSetup.dynamicAPi(jsonItem.rest, _formvalue, searchCriteria, SearchText, restData.Havecriteria)
|
|
7521
7743
|
.subscribe((ress) => {
|
|
7522
7744
|
let res = ress;
|
|
7523
|
-
if (
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7745
|
+
if (restData.ResponseView) {
|
|
7746
|
+
let _rview = restData.ResponseView.split(".");
|
|
7747
|
+
_rview.forEach(x => {
|
|
7748
|
+
if (ress) {
|
|
7749
|
+
ress = ress[x];
|
|
7750
|
+
res = ress;
|
|
7751
|
+
}
|
|
7752
|
+
else
|
|
7753
|
+
res = "";
|
|
7754
|
+
});
|
|
7755
|
+
}
|
|
7756
|
+
else {
|
|
7757
|
+
if (ress.Data) {
|
|
7758
|
+
res = ress.Data;
|
|
7759
|
+
if (res.Data)
|
|
7760
|
+
res = res.Data;
|
|
7761
|
+
}
|
|
7762
|
+
if (ress.content)
|
|
7763
|
+
res = ress.content;
|
|
7764
|
+
if (ress.entities)
|
|
7765
|
+
res = ress.entities;
|
|
7766
|
+
if (ress.templates)
|
|
7767
|
+
res = ress.templates;
|
|
7768
|
+
}
|
|
7529
7769
|
if (RequestorField) {
|
|
7530
7770
|
let _Sitem = res.filter((x) => x[restData.valueField] == this.RequestorFieldValue);
|
|
7531
7771
|
this.fieldsList.map((x) => {
|
|
@@ -7551,10 +7791,30 @@ class EntityDynamicFieldComponent {
|
|
|
7551
7791
|
const url = jsonItem.api.url;
|
|
7552
7792
|
this.entityTypeSetup.getDyamicUrl(url).subscribe((ress) => {
|
|
7553
7793
|
let res = ress;
|
|
7554
|
-
if (
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7794
|
+
if (jsonItem.api && jsonItem.api.ResponseView) {
|
|
7795
|
+
let _rview = jsonItem.api.ResponseView.split(".");
|
|
7796
|
+
_rview.forEach(x => {
|
|
7797
|
+
if (ress) {
|
|
7798
|
+
ress = ress[x];
|
|
7799
|
+
res = ress;
|
|
7800
|
+
}
|
|
7801
|
+
else
|
|
7802
|
+
res = "";
|
|
7803
|
+
});
|
|
7804
|
+
}
|
|
7805
|
+
else {
|
|
7806
|
+
if (ress.Data) {
|
|
7807
|
+
res = ress.Data;
|
|
7808
|
+
if (res.Data)
|
|
7809
|
+
res = res.Data;
|
|
7810
|
+
}
|
|
7811
|
+
if (ress.content)
|
|
7812
|
+
res = ress.content;
|
|
7813
|
+
if (ress.entities)
|
|
7814
|
+
res = ress.entities;
|
|
7815
|
+
if (ress.templates)
|
|
7816
|
+
res = ress.templates;
|
|
7817
|
+
}
|
|
7558
7818
|
if (res && Array.isArray(res) && res.length > 0) {
|
|
7559
7819
|
obx.next(res.map((x) => Object.assign({
|
|
7560
7820
|
Id: x[jsonItem.api.valueField],
|
|
@@ -7812,14 +8072,33 @@ class EntityDynamicFieldComponent {
|
|
|
7812
8072
|
if (!isDepandancyvalue) {
|
|
7813
8073
|
return;
|
|
7814
8074
|
}
|
|
7815
|
-
this.entityTypeSetup
|
|
7816
|
-
.dynamicAPi(jsonItem.rest, _formvalue)
|
|
8075
|
+
this.entityTypeSetup.dynamicAPi(jsonItem.rest, _formvalue)
|
|
7817
8076
|
.subscribe((ress) => {
|
|
7818
8077
|
let res = ress;
|
|
7819
|
-
if (
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
8078
|
+
if (restData.ResponseView) {
|
|
8079
|
+
let _rview = restData.ResponseView.split(".");
|
|
8080
|
+
_rview.forEach(x => {
|
|
8081
|
+
if (ress) {
|
|
8082
|
+
ress = ress[x];
|
|
8083
|
+
res = ress;
|
|
8084
|
+
}
|
|
8085
|
+
else
|
|
8086
|
+
res = "";
|
|
8087
|
+
});
|
|
8088
|
+
}
|
|
8089
|
+
else {
|
|
8090
|
+
if (ress.Data) {
|
|
8091
|
+
res = ress.Data;
|
|
8092
|
+
if (res.Data)
|
|
8093
|
+
res = res.Data;
|
|
8094
|
+
}
|
|
8095
|
+
if (ress.content)
|
|
8096
|
+
res = ress.content;
|
|
8097
|
+
if (ress.entities)
|
|
8098
|
+
res = ress.entities;
|
|
8099
|
+
if (ress.templates)
|
|
8100
|
+
res = ress.templates;
|
|
8101
|
+
}
|
|
7823
8102
|
if (res && Array.isArray(res) && res.length > 0) {
|
|
7824
8103
|
obx.next(res.map((x) => Object.assign({
|
|
7825
8104
|
Id: x[jsonItem.rest.valueField],
|
|
@@ -7841,10 +8120,30 @@ class EntityDynamicFieldComponent {
|
|
|
7841
8120
|
const url = jsonItem.api.url;
|
|
7842
8121
|
this.entityTypeSetup.getDyamicUrl(url).subscribe((ress) => {
|
|
7843
8122
|
let res = ress;
|
|
7844
|
-
if (
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
8123
|
+
if (jsonItem.api && jsonItem.api.ResponseView) {
|
|
8124
|
+
let _rview = jsonItem.api.ResponseView.split(".");
|
|
8125
|
+
_rview.forEach(x => {
|
|
8126
|
+
if (ress) {
|
|
8127
|
+
ress = ress[x];
|
|
8128
|
+
res = ress;
|
|
8129
|
+
}
|
|
8130
|
+
else
|
|
8131
|
+
res = "";
|
|
8132
|
+
});
|
|
8133
|
+
}
|
|
8134
|
+
else {
|
|
8135
|
+
if (ress.Data) {
|
|
8136
|
+
res = ress.Data;
|
|
8137
|
+
if (res.Data)
|
|
8138
|
+
res = res.Data;
|
|
8139
|
+
}
|
|
8140
|
+
if (ress.content)
|
|
8141
|
+
res = ress.content;
|
|
8142
|
+
if (ress.entities)
|
|
8143
|
+
res = ress.entities;
|
|
8144
|
+
if (ress.templates)
|
|
8145
|
+
res = ress.templates;
|
|
8146
|
+
}
|
|
7848
8147
|
if (res && Array.isArray(res) && res.length > 0) {
|
|
7849
8148
|
obx.next(res.map((x) => Object.assign({
|
|
7850
8149
|
Id: x[jsonItem.api.valueField],
|