@optimiser/common 1.0.421 → 1.0.423
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 +12 -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 = {
|
|
@@ -5358,6 +5360,7 @@ function CheckConditionalField(field, record, action) {
|
|
|
5358
5360
|
break;
|
|
5359
5361
|
case "show-enabled-mandatory":
|
|
5360
5362
|
case "show-enabled-nonmandatory":
|
|
5363
|
+
case "show":
|
|
5361
5364
|
// Add this condition to exclude fields with UIDataType "location" for search address, as discussed with Shahzaib Sir.
|
|
5362
5365
|
if (fieldData && field.Schema.UIDataType !== "location") {
|
|
5363
5366
|
msg = ((field.DisplayName || field.Schema.DisplayName) || field.Name) + ' is a hidden field and should not contain value.';
|