ntk-cms-api 1.2.109 → 1.2.111

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.
@@ -519,12 +519,19 @@
519
519
  this.AccessWatchFields = {};
520
520
  this.AccessSearchFields = {};
521
521
  access.fieldsInfo.filter(function (item) {
522
- _this.AccessAddFields[item.fieldName.toLowerCase()] = item.accessAddField;
523
- _this.AccessEditFields[item.fieldName.toLowerCase()] = item.accessEditField;
524
- _this.AccessWatchFields[item.fieldName.toLowerCase()] = item.accessWatchField;
525
- _this.AccessSearchFields[item.fieldName.toLowerCase()] = item.accessSearchField;
522
+ _this.AccessAddFields[_this.toLowerCaseFirstChar(item.fieldName)] = item.accessAddField;
523
+ _this.AccessEditFields[_this.toLowerCaseFirstChar(item.fieldName)] = item.accessEditField;
524
+ _this.AccessWatchFields[_this.toLowerCaseFirstChar(item.fieldName)] = item.accessWatchField;
525
+ _this.AccessSearchFields[_this.toLowerCaseFirstChar(item.fieldName)] = item.accessSearchField;
526
526
  });
527
527
  };
528
+ AccessHelper.prototype.toLowerCaseFirstChar = function (str) {
529
+ if (!str || str.length == 0)
530
+ return '';
531
+ if (str.length == 1)
532
+ return str.toLowerCase();
533
+ return str[0].toLowerCase() + str.slice(1);
534
+ };
528
535
  return AccessHelper;
529
536
  }());
530
537