@optimiser/common 1.0.420 → 1.0.422
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/dist/lib/utility.js +15 -9
- package/package.json +1 -1
package/dist/lib/utility.js
CHANGED
|
@@ -397,7 +397,7 @@ function GetPageFieldData(pageName, db, mdb, msp_d, next, callback) {
|
|
|
397
397
|
g++;
|
|
398
398
|
return [3 /*break*/, 1];
|
|
399
399
|
case 5:
|
|
400
|
-
if (pageData.Fields && pageData.Type == "ObjectGrid") {
|
|
400
|
+
if (pageData.Fields && (pageData.Type == "ObjectGrid" || pageData.Type == "ListView")) { //[Rishi: QPC-10454] Enable for ListView
|
|
401
401
|
idObject = {
|
|
402
402
|
Name: "_id",
|
|
403
403
|
Schema: { Name: "_id", DisplayName: "ID", ApiName: "ID", UIDataType: "objectid" },
|
|
@@ -409,14 +409,16 @@ function GetPageFieldData(pageName, db, mdb, msp_d, next, callback) {
|
|
|
409
409
|
pageData.Fields.splice(0, 0, idObject);
|
|
410
410
|
//Code added by Brijesh on 25Apr2022, condition added for objectschema =PromoCodeTransaction and grouped then not condition
|
|
411
411
|
//By Kashish : To handle System Info Fields in Grid
|
|
412
|
-
if (
|
|
413
|
-
pageData.Fields.
|
|
414
|
-
|
|
415
|
-
pageData.Fields.
|
|
416
|
-
|
|
417
|
-
pageData.Fields.
|
|
418
|
-
|
|
419
|
-
pageData.Fields.
|
|
412
|
+
if (pageData.HasSystemField !== false) {
|
|
413
|
+
if (!pageData.Fields.find(function (x) { return x.Name == 'CreatedBy'; }) && !['CompanySessionLogList', 'CompanyTransactionLogsList'].includes(pageData.PageName) && ["Session", "PromoCodeTransaction"].includes(pageData.ObjectName) == false)
|
|
414
|
+
pageData.Fields.push(createdByObj);
|
|
415
|
+
if (!pageData.Fields.find(function (x) { return x.Name == 'CreatedDate'; }) && !['CompanySessionLogList', 'CompanyTransactionLogsList'].includes(pageData.PageName) && ["Session", "PromoCodeTransaction"].includes(pageData.ObjectName) == false)
|
|
416
|
+
pageData.Fields.push(createdDateObj);
|
|
417
|
+
if (!pageData.Fields.find(function (x) { return x.Name == 'ModifiedBy'; }) && !['CompanySessionLogList', 'CompanyTransactionLogsList'].includes(pageData.PageName) && ["Session", "PromoCodeTransaction"].includes(pageData.ObjectName) == false)
|
|
418
|
+
pageData.Fields.push(modByObj);
|
|
419
|
+
if (!pageData.Fields.find(function (x) { return x.Name == 'ModifiedDate'; }) && !['CompanySessionLogList', 'CompanyTransactionLogsList'].includes(pageData.PageName) && ["Session", "PromoCodeTransaction"].includes(pageData.ObjectName) == false)
|
|
420
|
+
pageData.Fields.push(modDateObj);
|
|
421
|
+
}
|
|
420
422
|
}
|
|
421
423
|
if (pageData.Fields && pageData.Type == "ObjectDetail") {
|
|
422
424
|
idObject_1 = {
|
|
@@ -2364,6 +2366,10 @@ function FilterConditions(condition, match, fields) {
|
|
|
2364
2366
|
}
|
|
2365
2367
|
}
|
|
2366
2368
|
break;
|
|
2369
|
+
case "text":
|
|
2370
|
+
case "textarea":
|
|
2371
|
+
obj.Value = obj.Value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // [Rishi: QPC-10169] Escape string special characters
|
|
2372
|
+
break;
|
|
2367
2373
|
}
|
|
2368
2374
|
}
|
|
2369
2375
|
// Or Condition code in NOT_CONTAINS filter was added by Shahzaib for QPC-6368
|