@churchillliving/se-ui-toolkit 6.53.251 → 6.53.253

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.
@@ -2538,9 +2538,9 @@
2538
2538
  GridService.prototype.getAllowSaveRowlist = function (rowsData, columns) {
2539
2539
  var _this = this;
2540
2540
  if (rowsData === void 0) { rowsData = []; }
2541
+ rowsData = this.setDataFields(rowsData);
2541
2542
  columns.forEach(function (column) {
2542
2543
  if (column.allowSave === false) {
2543
- rowsData = _this.setDataFields(rowsData);
2544
2544
  rowsData.forEach(function (row) {
2545
2545
  var _a;
2546
2546
  var obj = Object.keys(row);
@@ -2555,17 +2555,32 @@
2555
2555
  row = _this.setRowValue(row);
2556
2556
  });
2557
2557
  }
2558
+ else if (column.formatter && column.type === exports.EGridColumnType.BOOLEAN) {
2559
+ rowsData.forEach(function (row) {
2560
+ var value = row[column.field.toLowerCase()];
2561
+ if (column.formatter === exports.EGridFormatter.CHAR) {
2562
+ row[column.field.toLowerCase()] = value === true || (value === null || value === void 0 ? void 0 : value.toString()) === 'Y' || (value === null || value === void 0 ? void 0 : value.toString()) === '1' ? 'Y' : 'N';
2563
+ }
2564
+ else if (column.formatter === exports.EGridFormatter.NUMERIC) {
2565
+ row[column.field.toLowerCase()] = value === true || (value === null || value === void 0 ? void 0 : value.toString()) === 'Y' || (value === null || value === void 0 ? void 0 : value.toString()) === '1' ? '1' : '0';
2566
+ }
2567
+ else if (column.formatter === exports.EGridFormatter.BOOLEAN) {
2568
+ row[column.field.toLowerCase()] = value === true || (value === null || value === void 0 ? void 0 : value.toString()) === 'Y' || (value === null || value === void 0 ? void 0 : value.toString()) === '1' ? true : false;
2569
+ }
2570
+ });
2571
+ }
2558
2572
  });
2559
2573
  return rowsData;
2560
2574
  };
2561
2575
  // get allowSave true || undefine row
2562
2576
  GridService.prototype.getAllowSaveRow = function (rowInfo, columns) {
2563
- var _this = this;
2564
2577
  if (rowInfo === void 0) { rowInfo = {}; }
2565
2578
  var row = Object.assign({}, rowInfo);
2579
+ row = objConvertToLower(row);
2580
+ console.log('rowsss: ', row);
2581
+ row = this.setRowValue(row);
2566
2582
  columns.forEach(function (column) {
2567
2583
  if (column.allowSave == false) {
2568
- row = _this.setRowValue(row);
2569
2584
  var keys = Object.keys(row);
2570
2585
  keys.forEach(function (x) {
2571
2586
  if (x.includes('_obj') && typeof row[x] === 'object') {
@@ -2577,8 +2592,19 @@
2577
2592
  delete row[key];
2578
2593
  }
2579
2594
  }
2595
+ else if (column.formatter && column.type === exports.EGridColumnType.BOOLEAN) {
2596
+ var value = row[column.field.toLowerCase()];
2597
+ if (column.formatter === exports.EGridFormatter.CHAR) {
2598
+ row[column.field.toLowerCase()] = value === true || (value === null || value === void 0 ? void 0 : value.toString()) === 'Y' || (value === null || value === void 0 ? void 0 : value.toString()) === '1' ? 'Y' : 'N';
2599
+ }
2600
+ else if (column.formatter === exports.EGridFormatter.NUMERIC) {
2601
+ row[column.field.toLowerCase()] = value === true || (value === null || value === void 0 ? void 0 : value.toString()) === 'Y' || (value === null || value === void 0 ? void 0 : value.toString()) === '1' ? '1' : '0';
2602
+ }
2603
+ else if (column.formatter === exports.EGridFormatter.BOOLEAN) {
2604
+ row[column.field.toLowerCase()] = value === true || (value === null || value === void 0 ? void 0 : value.toString()) === 'Y' || (value === null || value === void 0 ? void 0 : value.toString()) === '1' ? true : false;
2605
+ }
2606
+ }
2580
2607
  });
2581
- row = this.setRowValue(row);
2582
2608
  return row;
2583
2609
  };
2584
2610
  // add simple grid column without